- Main Page
- Related Pages
- Modules
- Files

- File List
- Globals

# hal_gw0.h

    00001
    00024 //includes for macros
    00025 #include "inc/hw_memmap.h"
    00026 #include "inc/hw_types.h"
    00027 #include "driverlib/gpio.h"
    00028
    00029 //general includes
    00030 #include "utils/uartstdio.h"
    00031 #define printf UARTprintf
    00032
    00033 void halInit();
    00034 void delayMs(unsigned int ms);
    00035 void halSpiInit();
    00036 void spiWrite(unsigned char *bytes, unsigned char numBytes);
    00037 void setZnpInterfaceToInputs(void);
    00038 void delayMs(unsigned int ms);
    00039 void toggleLed(unsigned char whichLed);
    00040 signed int setLed(unsigned char led);
    00041 void clearLeds();
    00042
    00043 //REQUIRED FOR ZNP LIBRARY:
    00044
    00045 //ZNP RST = PD5
    00046 //ZNP MRDY = CS = PD4
    00047 //ZNP SRDY = PD6
    00048 //PRECONDITIONS: GPIO PORTS HAVE BEEN ENABLED & PINS WERE CONFIGURED: PD4, PD5 as outputs; PD6 as input
    00049 #define RADIO_ON()                  ( GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_5, GPIO_PIN_5) )   //(P1OUT |= BIT2)
    00050 #define RADIO_OFF()                 ( GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_5, 0) )                    //(P1OUT &= ~BIT2)
    00051 #define SPI_SS_SET()                ( GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_4, 0) )    //(P5OUT &= ~BIT0)  //MRDY tied to CS in hardware
    00052 #define SPI_SS_CLEAR()              ( GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_4, GPIO_PIN_4) )                   //(P5OUT |= BIT0)
    00053 #define SRDY_IS_HIGH()              (GPIOPinRead(GPIO_PORTD_BASE, GPIO_PIN_6) & GPIO_PIN_6)     //(P1IN & BIT3)
    00054 #define SRDY_IS_LOW()               (~(GPIOPinRead(GPIO_PORTD_BASE, GPIO_PIN_6)) & GPIO_PIN_6)  //((~P1IN) & BIT3)
    00055

All Files Functions Variables Defines