forked from stancecoke/BMSBattery_S_controllers_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gpio.c
53 lines (45 loc) · 894 Bytes
/
gpio.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
46
47
48
49
50
51
52
53
/*
* BMSBattery S series motor controllers firmware
*
* Copyright (C) Casainho, 2017.
*
* Released under the GPL License, Version 3
*/
#include "stm8s.h"
#include "stm8s_gpio.h"
#include "gpio.h"
void gpio_init (void)
{
;
}
void debug_pin_init (void)
{
GPIO_Init(DEBUG__PORT,
DEBUG__PIN,
GPIO_MODE_OUT_PP_HIGH_FAST);
}
void debug_pin_set (void)
{
GPIO_WriteHigh(DEBUG__PORT, DEBUG__PIN);
}
void debug_pin_reset (void)
{
GPIO_WriteLow(DEBUG__PORT, DEBUG__PIN);
}
// added by DerBastler - Light
void light_pin_init (void)
{
GPIO_Init(LIGHT__PORT,
LIGHT__PIN,
GPIO_MODE_OUT_PP_HIGH_FAST);
}
// added by DerBastler - Light
void light_pin_set (void)
{
GPIO_WriteHigh(LIGHT__PORT, LIGHT__PIN);
}
// added by DerBastler - Light
void light_pin_reset (void)
{
GPIO_WriteLow(LIGHT__PORT, LIGHT__PIN);
}