Refactor F2/local before F3 merge (#220)

* add files from f3
* rollback lfs
* Move assets from LFS
* remove lfs from build

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
coreglitch
2020-11-06 14:31:59 +06:00
committed by GitHub
parent 841cae99ef
commit eb2679b982
106 changed files with 879 additions and 802 deletions

View File

@@ -40,4 +40,12 @@ void hal_pwm_stop(TIM_HandleTypeDef* tim, uint32_t channel) {
void hal_pwmn_stop(TIM_HandleTypeDef* tim, uint32_t channel) {
HAL_TIMEx_PWMN_Stop(tim, channel);
}
void irda_pwm_set(float value, float freq){
hal_pwm_set(value, freq, &IRDA_TIM, IRDA_CH);
}
void irda_pwm_stop(){
hal_pwm_stop(&IRDA_TIM, IRDA_CH);
}

View File

@@ -6,3 +6,6 @@ void hal_pwm_set(float value, float freq, TIM_HandleTypeDef* tim, uint32_t chann
void hal_pwmn_set(float value, float freq, TIM_HandleTypeDef* tim, uint32_t channel);
void hal_pwm_stop(TIM_HandleTypeDef* tim, uint32_t channel);
void hal_pwmn_stop(TIM_HandleTypeDef* tim, uint32_t channel);
void irda_pwm_set(float value, float freq);
void irda_pwm_stop();

View File

@@ -0,0 +1,30 @@
#include "main.h"
#include "flipper_v2.h"
#define DEBOUNCE_TICKS 10
const GpioPin input_gpio[GPIO_INPUT_PINS_COUNT] = {
{BUTTON_UP_GPIO_Port, BUTTON_UP_Pin},
{BUTTON_DOWN_GPIO_Port, BUTTON_DOWN_Pin},
{BUTTON_RIGHT_GPIO_Port, BUTTON_RIGHT_Pin},
{BUTTON_LEFT_GPIO_Port, BUTTON_LEFT_Pin},
{BUTTON_OK_GPIO_Port, BUTTON_OK_Pin},
{BUTTON_BACK_GPIO_Port, BUTTON_BACK_Pin},
{CHRG_GPIO_Port, CHRG_Pin}};
const bool input_invert[GPIO_INPUT_PINS_COUNT] = {
false, // {BUTTON_UP_GPIO_Port, BUTTON_UP_Pin},
false, // {BUTTON_DOWN_GPIO_Port, BUTTON_DOWN_Pin},
false, // {BUTTON_RIGHT_GPIO_Port, BUTTON_RIGHT_Pin},
false, // {BUTTON_LEFT_GPIO_Port, BUTTON_LEFT_Pin},
false, // {BUTTON_OK_GPIO_Port, BUTTON_OK_Pin},
false, // {BUTTON_BACK_GPIO_Port, BUTTON_BACK_Pin},
true, // {CHRG_GPIO_Port, CHRG_Pin}
};
const GpioPin led_gpio[3] = {
{LED_RED_GPIO_Port, LED_RED_Pin},
{LED_GREEN_GPIO_Port, LED_GREEN_Pin},
{LED_BLUE_GPIO_Port, LED_BLUE_Pin}};
const GpioPin backlight_gpio = {DISPLAY_BACKLIGHT_GPIO_Port, DISPLAY_BACKLIGHT_Pin};

View File

@@ -0,0 +1,12 @@
#pragma once
#include "main.h"
#include "flipper_v2.h"
#define DEBOUNCE_TICKS 10
#define GPIO_INPUT_PINS_COUNT 7
extern const GpioPin input_gpio[GPIO_INPUT_PINS_COUNT];
extern const bool input_invert[GPIO_INPUT_PINS_COUNT];
extern const GpioPin led_gpio[3];
extern const GpioPin backlight_gpio;