28 #ifndef SYSTEM_CORE_INC_DRIVERS_LED_OC_LED_H_ 29 #define SYSTEM_CORE_INC_DRIVERS_LED_OC_LED_H_ 32 #define DRIVER_NAME LED 43 #define _________________________________________TYPES_SECTION______________________________________________________________________________ 47 oC_LED_Index_Red = 0 ,
48 oC_LED_Index_Single = 0 ,
49 oC_LED_Index_Green = 1 ,
50 oC_LED_Index_Blue = 2 ,
51 oC_LED_Index_NumberOfElements
56 oC_LED_Mode_Red = (1<<oC_LED_Index_Red),
57 oC_LED_Mode_Green = (1<<oC_LED_Index_Green),
58 oC_LED_Mode_Blue = (1<<oC_LED_Index_Blue),
59 oC_LED_Mode_UsePWM = (1<<3),
60 oC_LED_Mode_RedActiveLow = (1<<4),
61 oC_LED_Mode_GreenActiveLow = (1<<5),
62 oC_LED_Mode_BlueActiveLow = (1<<6),
63 oC_LED_Mode_Single = oC_LED_Mode_Red,
64 oC_LED_Mode_SingleActiveLow = oC_LED_Mode_RedActiveLow,
65 oC_LED_Mode_RGB = oC_LED_Mode_Red | oC_LED_Mode_Green | oC_LED_Mode_Blue ,
66 oC_LED_Mode_RG = oC_LED_Mode_Red | oC_LED_Mode_Green ,
67 oC_LED_Mode_RB = oC_LED_Mode_Red | oC_LED_Mode_Blue ,
68 oC_LED_Mode_BG = oC_LED_Mode_Blue | oC_LED_Mode_Green ,
83 oC_Pins_t Pins[oC_LED_Index_NumberOfElements];
99 #undef _________________________________________TYPES_SECTION______________________________________________________________________________ 106 #define _________________________________________PROTOTYPES_SECTION_________________________________________________________________________ 110 extern oC_ErrorCode_t oC_LED_Write ( oC_LED_Context_t Context ,
const char * Buffer , uint32_t * Size , oC_Time_t Timeout );
111 extern oC_ErrorCode_t oC_LED_Ioctl ( oC_LED_Context_t Context , oC_Ioctl_Command_t Command ,
void * Data );
112 extern oC_ErrorCode_t oC_LED_SetColor ( oC_LED_Context_t Context , oC_Color_t Color );
113 extern oC_ErrorCode_t oC_LED_SetLight ( oC_LED_Context_t Context , oC_LED_Index_t LedIndex , uint8_t Light );
115 #undef _________________________________________PROTOTYPES_SECTION_________________________________________________________________________ oC_ErrorCode_t oC_LED_Configure(const oC_LED_Config_t *Config, oC_LED_Context_t *outContext)
configures LED pins to work
The file with interface for the GPIO driver.
oC_ErrorCode_t oC_LED_Unconfigure(const oC_LED_Config_t *Config, oC_LED_Context_t *outContext)
Restores default state on pins.
The file with interface for the color library.
The file with interface for driver creating.
struct Context_t * oC_LED_Context_t
The LED context structure.
LED driver configuration structure.