-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLed.c
45 lines (38 loc) · 1.49 KB
/
Led.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/******************************************************************************
*
* Module: Led
*
* File Name: Led.c
*
* Description: Source file for Led Module.
*
* Author: Mohamed Tarek
******************************************************************************/
#include "Port.h"
#include "Dio.h"
#include "Led.h"
/* LED Configurations Structure */
static Port_ConfigType g_LED_Config;
/*********************************************************************************************/
/*********************************************************************************************/
void LED_setOn(void)
{
Dio_WriteChannel(DioConf_LED1_CHANNEL_ID_INDEX,LED_ON); /* LED ON */
}
/*********************************************************************************************/
void LED_setOff(void)
{
Dio_WriteChannel(DioConf_LED1_CHANNEL_ID_INDEX,LED_OFF); /* LED OFF */
}
/*********************************************************************************************/
void LED_refreshOutput(void)
{
Dio_LevelType state = Dio_ReadChannel(DioConf_LED1_CHANNEL_ID_INDEX);
Dio_WriteChannel(DioConf_LED1_CHANNEL_ID_INDEX,state); /* re-write the same value */
}
/*********************************************************************************************/
void LED_toggle(void)
{
Dio_LevelType state = Dio_FlipChannel(DioConf_LED1_CHANNEL_ID_INDEX);
}
/*********************************************************************************************/