Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches
dev_led.h
Go to the documentation of this file.
1
14// This is a guard condition so that contents of this file are not included
15// more than once.
16#ifndef DEV_LED_H
17#define DEV_LED_H
18
19#include <xc.h> // include processor files - each processor file is guarded.
20#include <stdint.h> // include standard integer data types
21
22
31#define NUM_OF_LEDS 3
32
//
34
35
40//module API mapped to MCC custom labels
41#define LED_Board_Red_On LED_RED_SetHigh
42#define LED_Board_Red_Off LED_RED_SetLow
43#define LED_Board_Red_Toggle_State LED_RED_Toggle
44
45#define LED_Board_Green_On LED_GREEN_SetHigh
46#define LED_Board_Green_Off LED_GREEN_SetLow
47#define LED_Board_Green_Toggle_State LED_GREEN_Toggle
48
49#define LED_DP_PIM_on LED_DP_PIM_SetHigh
50#define LED_DP_PIM_off LED_DP_PIM_SetLow
51#define LED_DP_PIM_Toggle_State LED_DP_PIM_Toggle
52
// end of dev-led-porting-macros
54
55
60#define LED_PIM_RED 0 //labeling
61#define LED_BOARD_RED 1
62#define LED_BOARD_GREEN 2
63
64
65#define BLINK_100ms_INTERVAL 1 //blink is ticked from 100ms Task. Adjust if faster Tick rate is used
66#define BLINK_SLOW_INTERVAL (BLINK_100ms_INTERVAL*20) //( *100ms) 2 sec
67#define BLINK_FAST_INTERVAL (BLINK_100ms_INTERVAL*2) // 0.5
68#define BLINK_INTERVAL (BLINK_100ms_INTERVAL*5) // 0.5
69
// end of dev-led-enums-public
71
72
73
77void Dev_LED_Initialize(void);
78void Dev_LED_On(uint8_t led_id);
79void Dev_LED_Off(uint8_t led_id);
80void Dev_LED_Toggle(uint8_t led_id);
81void Dev_LED_Blink(uint8_t led_id);
82void Dev_LED_Blink_Slow(uint8_t led_id);
83void Dev_LED_Blink_Fast(uint8_t led_id);
84//void Dev_LED_Blink_Iter(uint8_t led_id, uint8_t count);
86
87
88#endif /* DEV_LED_H */
89
void Dev_LED_Initialize(void)
This function contains the LED initialization.
Definition dev_led.c:78
void Dev_LED_Blink_Slow(uint8_t led_id)
Set the LED in SLOW blinking mode.
Definition dev_led.c:192
void Dev_LED_Off(uint8_t led_id)
Switch off the LED.
Definition dev_led.c:118
void Dev_LED_On(uint8_t led_id)
Switch on the LED.
Definition dev_led.c:94
void Dev_LED_Blink_Fast(uint8_t led_id)
Set the LED in FAST blinking mode.
Definition dev_led.c:207
void Dev_LED_Toggle(uint8_t led_id)
Toggles the LED state.
Definition dev_led.c:142
void Dev_LED_Task_100ms()
This function needs to be called every 100ms and contains the code to update the status of the LEDs.
Definition dev_led.c:224
void Dev_LED_Blink(uint8_t led_id)
Set the LED in blinking mode.
Definition dev_led.c:161