Added support for power gating gpio

replace/9a94a85b67223056a9de96ec1f7d7b089868403a
Silvano Seva 2021-02-19 11:51:05 +01:00
rodzic 947d071f57
commit af6c78542a
8 zmienionych plików z 32 dodań i 0 usunięć

Wyświetl plik

@ -46,6 +46,9 @@
/* Battery type */
#define BAT_LIPO_2S
/* Power keep switch */
#define PWR_SW GPIOE,26
/* Display */
#define LCD_BKLIGHT GPIOC,4
#define LCD_CS GPIOC,8

Wyświetl plik

@ -46,6 +46,8 @@ void platform_init()
gpio_setMode(PTT_SW, INPUT);
gpio_setMode(PWR_SW, OUTPUT);
/*
* Configure backlight PWM: 58.5kHz, 8 bit resolution
*/
@ -102,6 +104,9 @@ void platform_terminate()
gpio_clearPin(GREEN_LED);
adc0_terminate();
/* Finally, remove power supply */
gpio_clearPin(PWR_SW, OUTPUT);
}
float platform_getVbat()

Wyświetl plik

@ -46,6 +46,9 @@
/* Battery type */
#define BAT_LIPO_2S
/* Power keep switch */
#define PWR_SW GPIOE,26
/* Display */
#define LCD_BKLIGHT GPIOC,4
#define LCD_CS GPIOC,8

Wyświetl plik

@ -46,6 +46,8 @@ void platform_init()
gpio_setMode(PTT_SW, INPUT);
gpio_setMode(PWR_SW, OUTPUT);
/*
* Configure backlight PWM: 58.5kHz, 8 bit resolution
*/
@ -102,6 +104,9 @@ void platform_terminate()
gpio_clearPin(GREEN_LED);
adc0_terminate();
/* Finally, remove power supply */
gpio_clearPin(PWR_SW, OUTPUT);
}
float platform_getVbat()

Wyświetl plik

@ -51,6 +51,9 @@
/* Battery type */
#define BAT_LIPO_2S
/* Power keep switch */
#define PWR_SW GPIOA,7
/* Display */
#define LCD_D0 GPIOD,14
#define LCD_D1 GPIOD,15

Wyświetl plik

@ -46,6 +46,8 @@ void platform_init()
gpio_setMode(PTT_SW, INPUT);
gpio_setMode(PWR_SW, OUTPUT);
/*
* Initialise ADC1, for vbat, RSSI, ...
* Configuration of corresponding GPIOs in analog input mode is done inside
@ -104,6 +106,9 @@ void platform_terminate()
nvm_terminate();
toneGen_terminate();
rtc_terminate();
/* Finally, remove power supply */
gpio_clearPin(PWR_SW, OUTPUT);
}
float platform_getVbat()

Wyświetl plik

@ -48,6 +48,9 @@
/* Battery type */
#define BAT_LIPO_2S
/* Power keep switch */
#define PWR_SW GPIOA,7
/* Display */
#define LCD_D0 GPIOD,14
#define LCD_D1 GPIOD,15

Wyświetl plik

@ -65,6 +65,8 @@ void platform_init()
gpio_setMode(PTT_SW, INPUT);
gpio_setMode(PWR_SW, OUTPUT);
/*
* Initialise ADC1, for vbat, RSSI, ...
* Configuration of corresponding GPIOs in analog input mode is done inside
@ -128,6 +130,9 @@ void platform_terminate()
adc1_terminate();
nvm_terminate();
rtc_terminate();
/* Finally, remove power supply */
gpio_clearPin(PWR_SW, OUTPUT);
}
float platform_getVbat()