displaypal.h

Go to the documentation of this file.
00001 /**************************************************************************/
00019 #ifndef _DISPLAY_PAL_H_
00020 #define _DISPLAY_PAL_H_
00021 
00022 #include "emstatus.h"
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 
00029 /*******************************************************************************
00030  ********************************  DEFINES  ************************************
00031  ******************************************************************************/
00032 
00034 #define PAL_EMSTATUS_OK                                  (0) 
00035 #define PAL_EMSTATUS_INVALID_PARAM (PAL_EMSTATUS_BASE   | 1) 
00036 #define PAL_EMSTATUS_REPEAT_FAILED (PAL_EMSTATUS_BASE   | 2) 
00041 /*******************************************************************************
00042  ********************************   ENUMS   ************************************
00043  ******************************************************************************/
00044 
00046 typedef enum
00047 {
00049   palGpioModePushPull
00050 } PAL_GpioMode_t;
00051 
00052 
00053 /*******************************************************************************
00054  **************************    FUNCTION PROTOTYPES    **************************
00055  ******************************************************************************/
00056 
00057 /**************************************************************************/
00065 EMSTATUS PAL_GpioInit (void);
00066 
00067 
00068 /**************************************************************************/
00076 EMSTATUS PAL_GpioShutdown (void);
00077 
00078 
00079 /***************************************************************************/
00098 EMSTATUS PAL_GpioPinModeSet(unsigned int   port,
00099                             unsigned int   pin,
00100                             PAL_GpioMode_t mode,
00101                             unsigned int   platformSpecific);
00102 
00103 
00104 /***************************************************************************/
00119 EMSTATUS PAL_GpioPinOutSet(unsigned int port, unsigned int pin);
00120 
00121 
00122 /***************************************************************************/
00137 EMSTATUS PAL_GpioPinOutClear(unsigned int port, unsigned int pin);
00138 
00139 
00140 /***************************************************************************/
00155 EMSTATUS PAL_GpioPinOutToggle(unsigned int port, unsigned int pin);
00156 
00157 
00158 /**************************************************************************/
00166 EMSTATUS PAL_GpioPinAutoToggle (unsigned int gpioPort,
00167                                 unsigned int gpioPin,
00168                                 unsigned int frequency);
00169 
00170 
00171 /**************************************************************************/
00179 EMSTATUS PAL_SpiInit (void);
00180 
00181 
00182 /**************************************************************************/
00190 EMSTATUS PAL_SpiShutdown (void);
00191 
00192 
00193 /**************************************************************************/
00201 EMSTATUS PAL_SpiTransmit (uint8_t* data, unsigned int len);
00202 
00203 
00204 /**************************************************************************/
00212 EMSTATUS PAL_TimerInit (void);
00213 
00214 
00215 /**************************************************************************/
00223 EMSTATUS PAL_TimerShutdown (void);
00224 
00225 
00226 /**************************************************************************/
00233 EMSTATUS PAL_TimerMicroSecondsDelay(unsigned int usecs);
00234 
00235 
00236 #ifdef PAL_TIMER_REPEAT_FUNCTION
00237 /**************************************************************************/
00247 EMSTATUS PAL_TimerRepeat (void(*pFunction)(void*),
00248                           void* argument,
00249                           unsigned int frequency);
00250 #endif
00251 
00252 #ifdef __cplusplus
00253 }
00254 #endif
00255 
00258 #endif /* _DISPLAY_PAL_H_ */