diff --git a/.gitattributes b/.gitattributes index 47fe4d76..8b137891 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1 @@ -*.pdf filter=lfs diff=lfs merge=lfs -text -*.gif filter=lfs diff=lfs merge=lfs -text -*.png filter=lfs diff=lfs merge=lfs -text -*.jpg filter=lfs diff=lfs merge=lfs -text -*.jpeg filter=lfs diff=lfs merge=lfs -text + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57c4a427..1c2a0d1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ jobs: uses: actions/checkout@v2 with: submodules: true - lfs: true - uses: satackey/action-docker-layer-caching@v0.0.8 continue-on-error: true diff --git a/applications/applications.h b/applications/applications.h index f06407fe..50098f73 100644 --- a/applications/applications.h +++ b/applications/applications.h @@ -46,6 +46,10 @@ const FlipperStartupApp FLIPPER_STARTUP[] = { {.app = input_task, .name = "input_task", .libs = {0}}, #endif +#ifdef APP_EXAMPLE_INPUT_DUMP + {.app = application_input_dump, .name = "input dump", .libs = {1, FURI_LIB{"input_task"}}}, +#endif + #ifdef APP_GUI {.app = backlight_control, .name = "backlight_control", .libs = {1, FURI_LIB{"input_task"}}}, {.app = gui_task, .name = "gui_task", .libs = {0}}, @@ -102,7 +106,7 @@ const FlipperStartupApp FLIPPER_STARTUP[] = { #endif #ifdef APP_SPEAKER_DEMO - {.app = coreglitch_demo_0, .name = "coreglitch_demo_0", .libs = ""}, + {.app = coreglitch_demo_0, .name = "coreglitch_demo_0", .libs = {0}}, #endif }; diff --git a/applications/backlight-control/backlight-control.c b/applications/backlight-control/backlight-control.c index 3ef42a90..16810c45 100644 --- a/applications/backlight-control/backlight-control.c +++ b/applications/backlight-control/backlight-control.c @@ -7,8 +7,15 @@ static void event_cb(const void* value, void* ctx) { const uint32_t BACKLIGHT_TIME = 10000; void backlight_control(void* p) { - // TODO use FURI - HAL_GPIO_WritePin(DISPLAY_BACKLIGHT_GPIO_Port, DISPLAY_BACKLIGHT_Pin, GPIO_PIN_SET); + // create pin + GpioPin backlight = backlight_gpio; + + // TODO open record + GpioPin* backlight_record = &backlight; + + // configure pin + gpio_init(backlight_record, GpioModeOutputPushPull); + gpio_write(backlight_record, true); StaticSemaphore_t event_descriptor; SemaphoreHandle_t update = xSemaphoreCreateCountingStatic(255, 0, &event_descriptor); @@ -24,9 +31,9 @@ void backlight_control(void* p) { while(1) { // wait for event if(xSemaphoreTake(update, BACKLIGHT_TIME) == pdTRUE) { - HAL_GPIO_WritePin(DISPLAY_BACKLIGHT_GPIO_Port, DISPLAY_BACKLIGHT_Pin, GPIO_PIN_SET); + gpio_write(backlight_record, true); } else { - HAL_GPIO_WritePin(DISPLAY_BACKLIGHT_GPIO_Port, DISPLAY_BACKLIGHT_Pin, GPIO_PIN_RESET); + gpio_write(backlight_record, false); } } } \ No newline at end of file diff --git a/applications/cc1101-workaround/cc1101.cpp b/applications/cc1101-workaround/cc1101.cpp index 1feae6b1..0f064a74 100644 --- a/applications/cc1101-workaround/cc1101.cpp +++ b/applications/cc1101-workaround/cc1101.cpp @@ -1,5 +1,6 @@ #include "flipper_v2.h" #include "cc1101-workaround/cc1101.h" +#include "spi.h" // ****************************************************************************** #define WRITE_BURST 0x40 @@ -27,34 +28,14 @@ CC1101::CC1101(GpioPin* ss_pin) { //****************************************************************************** //SpiInit /******************************************************************************/ -extern SPI_HandleTypeDef hspi3; +extern SPI_HandleTypeDef SPI_R; void CC1101::SpiInit(void) { //initialize spi pins //Enable spi master, MSB, SPI mode 0, FOSC/4 SpiMode(0); - if(HAL_SPI_DeInit(&hspi3) != HAL_OK) { - Error_Handler(); - } - - hspi3.Init.Mode = SPI_MODE_MASTER; - hspi3.Init.Direction = SPI_DIRECTION_2LINES; - hspi3.Init.DataSize = SPI_DATASIZE_8BIT; - hspi3.Init.CLKPolarity = SPI_POLARITY_LOW; - hspi3.Init.CLKPhase = SPI_PHASE_1EDGE; - hspi3.Init.NSS = SPI_NSS_SOFT; - hspi3.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64; - hspi3.Init.FirstBit = SPI_FIRSTBIT_MSB; - hspi3.Init.TIMode = SPI_TIMODE_DISABLE; - hspi3.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; - hspi3.Init.CRCPolynomial = 7; - hspi3.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; - hspi3.Init.NSSPMode = SPI_NSS_PULSE_DISABLE; - - if(HAL_SPI_Init(&hspi3) != HAL_OK) { - Error_Handler(); - } + CC1101_SPI_Reconfigure(); } void CC1101::SpiEnd(void) { @@ -99,7 +80,7 @@ uint8_t CC1101::SpiTransfer(uint8_t value) { uint8_t buf[1] = {value}; uint8_t rxbuf[1] = {0}; - HAL_SPI_TransmitReceive(&hspi3, buf, rxbuf, 1, HAL_MAX_DELAY); + HAL_SPI_TransmitReceive(&SPI_R, buf, rxbuf, 1, HAL_MAX_DELAY); return rxbuf[0]; } diff --git a/applications/coreglitch_demo_0/coreglitch_demo_0.c b/applications/coreglitch_demo_0/coreglitch_demo_0.c index d5f04900..12e1ebd1 100644 --- a/applications/coreglitch_demo_0/coreglitch_demo_0.c +++ b/applications/coreglitch_demo_0/coreglitch_demo_0.c @@ -1,7 +1,7 @@ #include "flipper.h" #include "u8g2/u8g2.h" -extern TIM_HandleTypeDef htim5; +extern TIM_HandleTypeDef SPEAKER_TIM; void coreglitch_demo_0(void* p) { FuriRecordSubscriber* log = get_default_log(); @@ -40,7 +40,8 @@ void coreglitch_demo_0(void* p) { } // TODO get sound from FURI - hal_pwm_set(width, freq, &htim5, TIM_CHANNEL_4); + hal_pwm_set(width, freq, &SPEAKER_TIM, SPEAKER_CH); + // delay(1); cnt++; diff --git a/applications/display-u8g2/display-u8g2.c b/applications/display-u8g2/display-u8g2.c index c5f38aea..c51cb1ca 100644 --- a/applications/display-u8g2/display-u8g2.c +++ b/applications/display-u8g2/display-u8g2.c @@ -1,7 +1,8 @@ #include "u8g2/u8g2.h" #include "flipper.h" +#include "main.h" -extern SPI_HandleTypeDef hspi1; +extern SPI_HandleTypeDef SPI_D; // TODO: fix log #ifdef DEBUG @@ -63,7 +64,7 @@ static uint8_t u8x8_hw_spi_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, voi #endif // TODO change it to FuriRecord SPI - HAL_SPI_Transmit(&hspi1, (uint8_t*)arg_ptr, arg_int, 10000); + HAL_SPI_Transmit(&SPI_D, (uint8_t*)arg_ptr, arg_int, 10000); break; case U8X8_MSG_BYTE_SET_DC: diff --git a/applications/examples/blink.c b/applications/examples/blink.c index abd0dd1c..a46c1859 100644 --- a/applications/examples/blink.c +++ b/applications/examples/blink.c @@ -3,7 +3,7 @@ void application_blink(void* p) { // create pin - GpioPin led = {.pin = GPIO_PIN_8, .port = GPIOA}; + GpioPin led = led_gpio[0]; // TODO open record GpioPin* led_record = &led; diff --git a/applications/examples/fatfs_list.c b/applications/examples/fatfs_list.c index afb7fd63..04c6fd69 100644 --- a/applications/examples/fatfs_list.c +++ b/applications/examples/fatfs_list.c @@ -50,55 +50,37 @@ void fatfs_list(void* p) { QueueHandle_t event_queue = xQueueCreate(2, sizeof(AppEvent)); furi_log = get_default_log(); + fuprintf(furi_log, "[fatfs_list] app start\n"); FuriRecordSubscriber* fb_record = furi_open_deprecated("u8g2_fb", false, false, NULL, NULL, NULL); if(fb_record == NULL) { - fuprintf(furi_log, "[widget][fatfs_list] cannot create fb record\n"); + fuprintf(furi_log, "[fatfs_list] cannot create fb record\n"); furiac_exit(NULL); } PubSub* event_record = furi_open("input_events"); if(event_record == NULL) { - fuprintf(furi_log, "[widget][fatfs_list] cannot open input_events record\n"); + fuprintf(furi_log, "[fatfs_list] cannot open input_events record\n"); furiac_exit(NULL); } PubSubItem* subscription = subscribe_pubsub(event_record, event_cb, event_queue); if(subscription == NULL) { - fuprintf(furi_log, "[widget][fatfs_list] cannot register input_events callback\n"); + fuprintf(furi_log, "[fatfs_list] cannot register input_events callback\n"); furiac_exit(NULL); } - // clear display - u8g2_t* fb = furi_take(fb_record); - u8g2_ClearBuffer(fb); - furi_commit(fb_record); - bsp_result = BSP_SD_Init(); if(bsp_result != 0) { - furi_take(fb_record); - - u8g2_SetFont(fb, u8g2_font_6x10_mf); - u8g2_SetDrawColor(fb, 1); - u8g2_SetFontMode(fb, 1); - u8g2_DrawStr(fb, 0, 12, "SD card init error"); - - furi_commit(fb_record); + fuprintf(furi_log, "[fatfs_list] SD card init error\n"); furiac_exit(NULL); } result = f_mount(&SD_FatFs, (TCHAR const*)SD_Path, 1); if(result != FR_OK) { - furi_take(fb_record); - - u8g2_SetFont(fb, u8g2_font_6x10_mf); - u8g2_SetDrawColor(fb, 1); - u8g2_SetFontMode(fb, 1); - u8g2_DrawStr(fb, 0, 12, "SD card mount error"); - - furi_commit(fb_record); + fuprintf(furi_log, "[fatfs_list] SD card mount error\n"); furiac_exit(NULL); } @@ -123,12 +105,6 @@ void fatfs_list(void* p) { } } - // get display and draw - furi_take(fb_record); - u8g2_ClearBuffer(fb); - u8g2_SetFont(fb, u8g2_font_6x10_mf); - u8g2_SetDrawColor(fb, 1); - u8g2_SetFontMode(fb, 1); line_current = 1; // open root dir @@ -156,8 +132,7 @@ void fatfs_list(void* p) { } else { snprintf(str_buffer, STR_BUFFER_SIZE, "FIL %s\n", fno.fname); } - - u8g2_DrawStr(fb, 0, line_size * (line_current - line_position), str_buffer); + fuprintf(furi_log, str_buffer); } line_current++; diff --git a/applications/examples/input_dump.c b/applications/examples/input_dump.c index fc794620..caaeca0c 100644 --- a/applications/examples/input_dump.c +++ b/applications/examples/input_dump.c @@ -29,6 +29,8 @@ void application_input_dump(void* p) { furi_check(event_record); subscribe_pubsub(event_record, event_cb, NULL); + printf("Example app [input dump]\n"); + for(;;) { delay(100); } diff --git a/applications/gui/u8g2_periphery.c b/applications/gui/u8g2_periphery.c index db12c506..d39071da 100644 --- a/applications/gui/u8g2_periphery.c +++ b/applications/gui/u8g2_periphery.c @@ -1,7 +1,8 @@ #include "u8g2/u8g2.h" #include "flipper.h" +#include -extern SPI_HandleTypeDef hspi1; +extern SPI_HandleTypeDef SPI_D; // TODO: fix log #ifdef DEBUG @@ -60,7 +61,7 @@ uint8_t u8x8_hw_spi_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_ #endif // TODO change it to FuriRecord SPI - HAL_SPI_Transmit(&hspi1, (uint8_t*)arg_ptr, arg_int, 10000); + HAL_SPI_Transmit(&SPI_D, (uint8_t*)arg_ptr, arg_int, 10000); break; case U8X8_MSG_BYTE_SET_DC: diff --git a/applications/input/input.c b/applications/input/input.c index 1a848c97..b03b3808 100644 --- a/applications/input/input.c +++ b/applications/input/input.c @@ -1,5 +1,4 @@ #include -#include #include #include @@ -54,7 +53,14 @@ void input_task(void* p) { for(;;) { bool changed = false; for(uint32_t i = 0; i < INPUT_COUNT; i++) { - bool input_state = gpio_read(&input_gpio[i]) ^ input_invert[i]; + bool input_state = false; + + // dirty hack, f3 has no CHARGING pin + // TODO rewrite this + if(i < GPIO_INPUT_PINS_COUNT) { + input_state = gpio_read(&input_gpio[i]) ^ input_invert[i]; + } + if(input_state) { if(debounce_counters[i] < DEBOUNCE_TICKS) { debounce_counters[i] += 1; @@ -103,7 +109,7 @@ void input_task(void* p) { void HAL_GPIO_EXTI_Callback(uint16_t pin) { #ifdef APP_NFC - if(pin == RFID_PULL_Pin) { + if(pin == NFC_IRQ_Pin) { nfc_isr(); return; } diff --git a/applications/irda/irda.c b/applications/irda/irda.c index 9dd8fec2..a63d72cb 100644 --- a/applications/irda/irda.c +++ b/applications/irda/irda.c @@ -7,6 +7,7 @@ typedef enum { EventTypeTick, EventTypeKey, + EventTypeLed, } EventType; typedef struct { @@ -121,13 +122,9 @@ void render_samsung(CanvasApi* canvas, State* state) { void input_carrier(AppEvent* event, State* state) { if(event->value.input.input == InputOk) { if(event->value.input.state) { - hal_pwm_set( - duty_cycles[state->carrier_duty_cycle_id], - state->carrier_freq, - &htim2, - TIM_CHANNEL_4); + irda_pwm_set(duty_cycles[state->carrier_duty_cycle_id], state->carrier_freq); } else { - hal_pwm_stop(&htim2, TIM_CHANNEL_4); + irda_pwm_stop(); } } diff --git a/applications/irda/irda_nec.c b/applications/irda/irda_nec.c index be5252d7..17cc4b14 100644 --- a/applications/irda/irda_nec.c +++ b/applications/irda/irda_nec.c @@ -4,18 +4,18 @@ void ir_nec_preambula(void) { // 9ms carrier + 4.5ms pause - hal_pwm_set(NEC_DUTY_CYCLE, NEC_CARRIER_FREQUENCY, &htim2, TIM_CHANNEL_4); + irda_pwm_set(NEC_DUTY_CYCLE, NEC_CARRIER_FREQUENCY); delay_us(9000); - hal_pwm_stop(&htim2, TIM_CHANNEL_4); + irda_pwm_stop(); delay_us(4500); } void ir_nec_send_bit(bool bit) { // 0 is 562.5us carrier + 1687.5us pause // 1 is 562.5us carrier + 562.5us pause - hal_pwm_set(NEC_DUTY_CYCLE, NEC_CARRIER_FREQUENCY, &htim2, TIM_CHANNEL_4); + irda_pwm_set(NEC_DUTY_CYCLE, NEC_CARRIER_FREQUENCY); delay_us(562.5); - hal_pwm_stop(&htim2, TIM_CHANNEL_4); + irda_pwm_stop(); if(bit) { delay_us(562.5); } else { diff --git a/applications/irda/irda_protocols.h b/applications/irda/irda_protocols.h index 686ff219..ceb96535 100644 --- a/applications/irda/irda_protocols.h +++ b/applications/irda/irda_protocols.h @@ -1,7 +1,7 @@ #pragma once // our tx pin is TIM2_CH4 -extern TIM_HandleTypeDef htim2; +extern TIM_HandleTypeDef TIM_A; #define RC5_CARRIER_FREQUENCY 36000 #define RC5_DUTY_CYCLE 0.33 diff --git a/applications/irda/irda_samsung.c b/applications/irda/irda_samsung.c index 03eea7f8..9227c77c 100644 --- a/applications/irda/irda_samsung.c +++ b/applications/irda/irda_samsung.c @@ -3,16 +3,16 @@ #include "irda_protocols.h" void ir_samsung_preambula(void) { - hal_pwm_set(SAMSUNG_DUTY_CYCLE, SAMSUNG_CARRIER_FREQUENCY, &htim2, TIM_CHANNEL_4); + irda_pwm_set(SAMSUNG_DUTY_CYCLE, SAMSUNG_CARRIER_FREQUENCY); delay_us(4500); - hal_pwm_stop(&htim2, TIM_CHANNEL_4); + irda_pwm_stop(); delay_us(4500); } void ir_samsung_send_bit(bool bit) { - hal_pwm_set(SAMSUNG_DUTY_CYCLE, SAMSUNG_CARRIER_FREQUENCY, &htim2, TIM_CHANNEL_4); + irda_pwm_set(SAMSUNG_DUTY_CYCLE, SAMSUNG_CARRIER_FREQUENCY); delay_us(560); - hal_pwm_stop(&htim2, TIM_CHANNEL_4); + irda_pwm_stop(); if(bit) { delay_us(1590); } else { diff --git a/applications/lf-rfid/lf-rfid.c b/applications/lf-rfid/lf-rfid.c index cc7f6253..9afde95d 100644 --- a/applications/lf-rfid/lf-rfid.c +++ b/applications/lf-rfid/lf-rfid.c @@ -43,7 +43,7 @@ static void input_callback(InputEvent* input_event, void* ctx) { osMessageQueuePut(event_queue, &event, 0, 0); } -extern TIM_HandleTypeDef htim15; +extern TIM_HandleTypeDef TIM_C; void em4100_emulation(uint8_t* data, GpioPin* pin); void prepare_data(uint32_t ID, uint32_t VENDOR, uint8_t* data); @@ -51,7 +51,7 @@ void lf_rfid_workaround(void* p) { osMessageQueueId_t event_queue = osMessageQueueNew(1, sizeof(AppEvent), NULL); // create pin - GpioPin pull_pin = {.pin = GPIO_PIN_15, .port = GPIOB}; + GpioPin pull_pin = {.pin = RFID_PULL_Pin, .port = RFID_PULL_GPIO_Port}; // TODO open record GpioPin* pull_pin_record = &pull_pin; @@ -92,7 +92,7 @@ void lf_rfid_workaround(void* p) { if(event.type == EventTypeKey) { // press events if(event.value.input.state && event.value.input.input == InputBack) { - hal_pwmn_stop(&htim15, TIM_CHANNEL_1); // TODO: move to furiac_onexit + hal_pwmn_stop(&TIM_C, TIM_CHANNEL_1); // TODO: move to furiac_onexit gpio_init(pull_pin_record, GpioModeInput); // TODO remove all widgets create by app widget_enabled_set(widget, false); @@ -122,7 +122,7 @@ void lf_rfid_workaround(void* p) { } hal_pwmn_set( - state->on ? 0.5 : 0.0, (float)(state->freq_khz * 1000), &htim15, TIM_CHANNEL_1); + state->on ? 0.5 : 0.0, (float)(state->freq_khz * 1000), &LFRFID_TIM, LFRFID_CH); if(!state->on) { em4100_emulation(emulation_data, pull_pin_record); diff --git a/assets/icons/IrukaGotchi/Flipper_idle_76x52.png b/assets/icons/IrukaGotchi/Flipper_idle_76x52.png index 90a0c556..60696d74 100644 Binary files a/assets/icons/IrukaGotchi/Flipper_idle_76x52.png and b/assets/icons/IrukaGotchi/Flipper_idle_76x52.png differ diff --git a/assets/icons/IrukaGotchi/Flipper_young_80x60.png b/assets/icons/IrukaGotchi/Flipper_young_80x60.png index bc84e7a8..e031154d 100644 Binary files a/assets/icons/IrukaGotchi/Flipper_young_80x60.png and b/assets/icons/IrukaGotchi/Flipper_young_80x60.png differ diff --git a/assets/icons/MainMenu/125khz_14/frame_01.png b/assets/icons/MainMenu/125khz_14/frame_01.png index 783689b9..5b861db4 100644 Binary files a/assets/icons/MainMenu/125khz_14/frame_01.png and b/assets/icons/MainMenu/125khz_14/frame_01.png differ diff --git a/assets/icons/MainMenu/125khz_14/frame_02.png b/assets/icons/MainMenu/125khz_14/frame_02.png index e5aa9059..d0edfbeb 100644 Binary files a/assets/icons/MainMenu/125khz_14/frame_02.png and b/assets/icons/MainMenu/125khz_14/frame_02.png differ diff --git a/assets/icons/MainMenu/125khz_14/frame_03.png b/assets/icons/MainMenu/125khz_14/frame_03.png index 8e6e821c..9a62d8c0 100644 Binary files a/assets/icons/MainMenu/125khz_14/frame_03.png and b/assets/icons/MainMenu/125khz_14/frame_03.png differ diff --git a/assets/icons/MainMenu/125khz_14/frame_04.png b/assets/icons/MainMenu/125khz_14/frame_04.png index f312414e..93280051 100644 Binary files a/assets/icons/MainMenu/125khz_14/frame_04.png and b/assets/icons/MainMenu/125khz_14/frame_04.png differ diff --git a/assets/icons/MainMenu/Bluetooth_14/frame_01.png b/assets/icons/MainMenu/Bluetooth_14/frame_01.png index dfb03c57..5dbb95ab 100644 Binary files a/assets/icons/MainMenu/Bluetooth_14/frame_01.png and b/assets/icons/MainMenu/Bluetooth_14/frame_01.png differ diff --git a/assets/icons/MainMenu/Bluetooth_14/frame_02.png b/assets/icons/MainMenu/Bluetooth_14/frame_02.png index 5224d101..cbcc779d 100644 Binary files a/assets/icons/MainMenu/Bluetooth_14/frame_02.png and b/assets/icons/MainMenu/Bluetooth_14/frame_02.png differ diff --git a/assets/icons/MainMenu/Bluetooth_14/frame_03.png b/assets/icons/MainMenu/Bluetooth_14/frame_03.png index d2bae2c9..7d93b230 100644 Binary files a/assets/icons/MainMenu/Bluetooth_14/frame_03.png and b/assets/icons/MainMenu/Bluetooth_14/frame_03.png differ diff --git a/assets/icons/MainMenu/Bluetooth_14/frame_04.png b/assets/icons/MainMenu/Bluetooth_14/frame_04.png index 4a3bbe5a..6483e1be 100644 Binary files a/assets/icons/MainMenu/Bluetooth_14/frame_04.png and b/assets/icons/MainMenu/Bluetooth_14/frame_04.png differ diff --git a/assets/icons/MainMenu/Bluetooth_14/frame_05.png b/assets/icons/MainMenu/Bluetooth_14/frame_05.png index 9e8936a0..b6bf8b37 100644 Binary files a/assets/icons/MainMenu/Bluetooth_14/frame_05.png and b/assets/icons/MainMenu/Bluetooth_14/frame_05.png differ diff --git a/assets/icons/MainMenu/Bluetooth_14/frame_06.png b/assets/icons/MainMenu/Bluetooth_14/frame_06.png index f7fd714d..d4fa6076 100644 Binary files a/assets/icons/MainMenu/Bluetooth_14/frame_06.png and b/assets/icons/MainMenu/Bluetooth_14/frame_06.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_01.png b/assets/icons/MainMenu/FileManager_14/frame_01.png index 761bee63..453a3b6c 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_01.png and b/assets/icons/MainMenu/FileManager_14/frame_01.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_02.png b/assets/icons/MainMenu/FileManager_14/frame_02.png index 2df6a39d..d0a410bd 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_02.png and b/assets/icons/MainMenu/FileManager_14/frame_02.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_03.png b/assets/icons/MainMenu/FileManager_14/frame_03.png index 158d121b..618d81bd 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_03.png and b/assets/icons/MainMenu/FileManager_14/frame_03.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_04.png b/assets/icons/MainMenu/FileManager_14/frame_04.png index 924a533c..e22b2357 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_04.png and b/assets/icons/MainMenu/FileManager_14/frame_04.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_05.png b/assets/icons/MainMenu/FileManager_14/frame_05.png index f2a0a502..b8a42ab6 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_05.png and b/assets/icons/MainMenu/FileManager_14/frame_05.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_06.png b/assets/icons/MainMenu/FileManager_14/frame_06.png index b0f38746..c68776ff 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_06.png and b/assets/icons/MainMenu/FileManager_14/frame_06.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_07.png b/assets/icons/MainMenu/FileManager_14/frame_07.png index f2a0a502..b8a42ab6 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_07.png and b/assets/icons/MainMenu/FileManager_14/frame_07.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_08.png b/assets/icons/MainMenu/FileManager_14/frame_08.png index 924a533c..e22b2357 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_08.png and b/assets/icons/MainMenu/FileManager_14/frame_08.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_09.png b/assets/icons/MainMenu/FileManager_14/frame_09.png index 158d121b..618d81bd 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_09.png and b/assets/icons/MainMenu/FileManager_14/frame_09.png differ diff --git a/assets/icons/MainMenu/FileManager_14/frame_10.png b/assets/icons/MainMenu/FileManager_14/frame_10.png index 2df6a39d..d0a410bd 100644 Binary files a/assets/icons/MainMenu/FileManager_14/frame_10.png and b/assets/icons/MainMenu/FileManager_14/frame_10.png differ diff --git a/assets/icons/MainMenu/GPIO_14/frame_01.png b/assets/icons/MainMenu/GPIO_14/frame_01.png index 2fe46fb4..2b9b4db4 100644 Binary files a/assets/icons/MainMenu/GPIO_14/frame_01.png and b/assets/icons/MainMenu/GPIO_14/frame_01.png differ diff --git a/assets/icons/MainMenu/GPIO_14/frame_02.png b/assets/icons/MainMenu/GPIO_14/frame_02.png index 3f4b2cab..9ab98856 100644 Binary files a/assets/icons/MainMenu/GPIO_14/frame_02.png and b/assets/icons/MainMenu/GPIO_14/frame_02.png differ diff --git a/assets/icons/MainMenu/GPIO_14/frame_03.png b/assets/icons/MainMenu/GPIO_14/frame_03.png index a2797675..25750041 100644 Binary files a/assets/icons/MainMenu/GPIO_14/frame_03.png and b/assets/icons/MainMenu/GPIO_14/frame_03.png differ diff --git a/assets/icons/MainMenu/GPIO_14/frame_04.png b/assets/icons/MainMenu/GPIO_14/frame_04.png index 67112fbb..f6f3d2de 100644 Binary files a/assets/icons/MainMenu/GPIO_14/frame_04.png and b/assets/icons/MainMenu/GPIO_14/frame_04.png differ diff --git a/assets/icons/MainMenu/GPIO_14/frame_05.png b/assets/icons/MainMenu/GPIO_14/frame_05.png index 02932255..5a6bf042 100644 Binary files a/assets/icons/MainMenu/GPIO_14/frame_05.png and b/assets/icons/MainMenu/GPIO_14/frame_05.png differ diff --git a/assets/icons/MainMenu/GPIO_14/frame_06.png b/assets/icons/MainMenu/GPIO_14/frame_06.png index ef0266b0..4751e32c 100644 Binary files a/assets/icons/MainMenu/GPIO_14/frame_06.png and b/assets/icons/MainMenu/GPIO_14/frame_06.png differ diff --git a/assets/icons/MainMenu/GPIO_14/frame_07.png b/assets/icons/MainMenu/GPIO_14/frame_07.png index 263102c8..9c5bb11d 100644 Binary files a/assets/icons/MainMenu/GPIO_14/frame_07.png and b/assets/icons/MainMenu/GPIO_14/frame_07.png differ diff --git a/assets/icons/MainMenu/GPIO_14/frame_08.png b/assets/icons/MainMenu/GPIO_14/frame_08.png index 88070aac..1cf9762f 100644 Binary files a/assets/icons/MainMenu/GPIO_14/frame_08.png and b/assets/icons/MainMenu/GPIO_14/frame_08.png differ diff --git a/assets/icons/MainMenu/Infrared_14/frame_01.png b/assets/icons/MainMenu/Infrared_14/frame_01.png index 0937f9da..ddffd29b 100644 Binary files a/assets/icons/MainMenu/Infrared_14/frame_01.png and b/assets/icons/MainMenu/Infrared_14/frame_01.png differ diff --git a/assets/icons/MainMenu/Infrared_14/frame_02.png b/assets/icons/MainMenu/Infrared_14/frame_02.png index b053b0a5..21603a7e 100644 Binary files a/assets/icons/MainMenu/Infrared_14/frame_02.png and b/assets/icons/MainMenu/Infrared_14/frame_02.png differ diff --git a/assets/icons/MainMenu/Infrared_14/frame_03.png b/assets/icons/MainMenu/Infrared_14/frame_03.png index 0f61802d..1aa8399e 100644 Binary files a/assets/icons/MainMenu/Infrared_14/frame_03.png and b/assets/icons/MainMenu/Infrared_14/frame_03.png differ diff --git a/assets/icons/MainMenu/Infrared_14/frame_04.png b/assets/icons/MainMenu/Infrared_14/frame_04.png index 356d3ca7..8edaa2c8 100644 Binary files a/assets/icons/MainMenu/Infrared_14/frame_04.png and b/assets/icons/MainMenu/Infrared_14/frame_04.png differ diff --git a/assets/icons/MainMenu/Infrared_14/frame_05.png b/assets/icons/MainMenu/Infrared_14/frame_05.png index ffe9aeef..26bf497c 100644 Binary files a/assets/icons/MainMenu/Infrared_14/frame_05.png and b/assets/icons/MainMenu/Infrared_14/frame_05.png differ diff --git a/assets/icons/MainMenu/Infrared_14/frame_06.png b/assets/icons/MainMenu/Infrared_14/frame_06.png index 5d7cd0ce..f035b9a5 100644 Binary files a/assets/icons/MainMenu/Infrared_14/frame_06.png and b/assets/icons/MainMenu/Infrared_14/frame_06.png differ diff --git a/assets/icons/MainMenu/NFC_14/frame_01.png b/assets/icons/MainMenu/NFC_14/frame_01.png index 2e916723..78f349cc 100644 Binary files a/assets/icons/MainMenu/NFC_14/frame_01.png and b/assets/icons/MainMenu/NFC_14/frame_01.png differ diff --git a/assets/icons/MainMenu/NFC_14/frame_02.png b/assets/icons/MainMenu/NFC_14/frame_02.png index 5b881202..590873d3 100644 Binary files a/assets/icons/MainMenu/NFC_14/frame_02.png and b/assets/icons/MainMenu/NFC_14/frame_02.png differ diff --git a/assets/icons/MainMenu/NFC_14/frame_03.png b/assets/icons/MainMenu/NFC_14/frame_03.png index 450cd323..fc6aa1d7 100644 Binary files a/assets/icons/MainMenu/NFC_14/frame_03.png and b/assets/icons/MainMenu/NFC_14/frame_03.png differ diff --git a/assets/icons/MainMenu/NFC_14/frame_04.png b/assets/icons/MainMenu/NFC_14/frame_04.png index 77259b9f..f65e1c75 100644 Binary files a/assets/icons/MainMenu/NFC_14/frame_04.png and b/assets/icons/MainMenu/NFC_14/frame_04.png differ diff --git a/assets/icons/MainMenu/Sub1ghz_14/frame_01.png b/assets/icons/MainMenu/Sub1ghz_14/frame_01.png index f587edb5..7e0a208e 100644 Binary files a/assets/icons/MainMenu/Sub1ghz_14/frame_01.png and b/assets/icons/MainMenu/Sub1ghz_14/frame_01.png differ diff --git a/assets/icons/MainMenu/Sub1ghz_14/frame_02.png b/assets/icons/MainMenu/Sub1ghz_14/frame_02.png index e29cb625..decfd41c 100644 Binary files a/assets/icons/MainMenu/Sub1ghz_14/frame_02.png and b/assets/icons/MainMenu/Sub1ghz_14/frame_02.png differ diff --git a/assets/icons/MainMenu/Sub1ghz_14/frame_03.png b/assets/icons/MainMenu/Sub1ghz_14/frame_03.png index 6354b4a8..2cf3dae3 100644 Binary files a/assets/icons/MainMenu/Sub1ghz_14/frame_03.png and b/assets/icons/MainMenu/Sub1ghz_14/frame_03.png differ diff --git a/assets/icons/MainMenu/Sub1ghz_14/frame_04.png b/assets/icons/MainMenu/Sub1ghz_14/frame_04.png index 4a50926f..efdeae43 100644 Binary files a/assets/icons/MainMenu/Sub1ghz_14/frame_04.png and b/assets/icons/MainMenu/Sub1ghz_14/frame_04.png differ diff --git a/assets/icons/MainMenu/Sub1ghz_14/frame_05.png b/assets/icons/MainMenu/Sub1ghz_14/frame_05.png index 96d37101..68726336 100644 Binary files a/assets/icons/MainMenu/Sub1ghz_14/frame_05.png and b/assets/icons/MainMenu/Sub1ghz_14/frame_05.png differ diff --git a/assets/icons/MainMenu/Sub1ghz_14/frame_06.png b/assets/icons/MainMenu/Sub1ghz_14/frame_06.png index b8f5c712..817ba635 100644 Binary files a/assets/icons/MainMenu/Sub1ghz_14/frame_06.png and b/assets/icons/MainMenu/Sub1ghz_14/frame_06.png differ diff --git a/assets/icons/MainMenu/Tamagotchi_14/frame_01.png b/assets/icons/MainMenu/Tamagotchi_14/frame_01.png index 24c325d7..b6236d23 100644 Binary files a/assets/icons/MainMenu/Tamagotchi_14/frame_01.png and b/assets/icons/MainMenu/Tamagotchi_14/frame_01.png differ diff --git a/assets/icons/MainMenu/Tamagotchi_14/frame_02.png b/assets/icons/MainMenu/Tamagotchi_14/frame_02.png index dd06feb5..bee7fb18 100644 Binary files a/assets/icons/MainMenu/Tamagotchi_14/frame_02.png and b/assets/icons/MainMenu/Tamagotchi_14/frame_02.png differ diff --git a/assets/icons/MainMenu/Tamagotchi_14/frame_03.png b/assets/icons/MainMenu/Tamagotchi_14/frame_03.png index 1fddec3d..bbb97521 100644 Binary files a/assets/icons/MainMenu/Tamagotchi_14/frame_03.png and b/assets/icons/MainMenu/Tamagotchi_14/frame_03.png differ diff --git a/assets/icons/MainMenu/Tamagotchi_14/frame_04.png b/assets/icons/MainMenu/Tamagotchi_14/frame_04.png index 1d70d93e..c2d699af 100644 Binary files a/assets/icons/MainMenu/Tamagotchi_14/frame_04.png and b/assets/icons/MainMenu/Tamagotchi_14/frame_04.png differ diff --git a/assets/icons/MainMenu/Tamagotchi_14/frame_05.png b/assets/icons/MainMenu/Tamagotchi_14/frame_05.png index 675c439f..22565476 100644 Binary files a/assets/icons/MainMenu/Tamagotchi_14/frame_05.png and b/assets/icons/MainMenu/Tamagotchi_14/frame_05.png differ diff --git a/assets/icons/MainMenu/Tamagotchi_14/frame_06.png b/assets/icons/MainMenu/Tamagotchi_14/frame_06.png index e953a157..5345418b 100644 Binary files a/assets/icons/MainMenu/Tamagotchi_14/frame_06.png and b/assets/icons/MainMenu/Tamagotchi_14/frame_06.png differ diff --git a/assets/icons/MainMenu/U2F_14/frame_01.png b/assets/icons/MainMenu/U2F_14/frame_01.png index 1b8d0a0c..f59d2431 100644 Binary files a/assets/icons/MainMenu/U2F_14/frame_01.png and b/assets/icons/MainMenu/U2F_14/frame_01.png differ diff --git a/assets/icons/MainMenu/U2F_14/frame_02.png b/assets/icons/MainMenu/U2F_14/frame_02.png index 0e971469..bc674a97 100644 Binary files a/assets/icons/MainMenu/U2F_14/frame_02.png and b/assets/icons/MainMenu/U2F_14/frame_02.png differ diff --git a/assets/icons/MainMenu/U2F_14/frame_03.png b/assets/icons/MainMenu/U2F_14/frame_03.png index 9f52d3e6..1304ae10 100644 Binary files a/assets/icons/MainMenu/U2F_14/frame_03.png and b/assets/icons/MainMenu/U2F_14/frame_03.png differ diff --git a/assets/icons/MainMenu/U2F_14/frame_04.png b/assets/icons/MainMenu/U2F_14/frame_04.png index 0e971469..bc674a97 100644 Binary files a/assets/icons/MainMenu/U2F_14/frame_04.png and b/assets/icons/MainMenu/U2F_14/frame_04.png differ diff --git a/assets/icons/MainMenu/iButton_14/frame_01.png b/assets/icons/MainMenu/iButton_14/frame_01.png index df89fe82..94f7f9ac 100644 Binary files a/assets/icons/MainMenu/iButton_14/frame_01.png and b/assets/icons/MainMenu/iButton_14/frame_01.png differ diff --git a/assets/icons/MainMenu/iButton_14/frame_02.png b/assets/icons/MainMenu/iButton_14/frame_02.png index dfb76d91..4be74a90 100644 Binary files a/assets/icons/MainMenu/iButton_14/frame_02.png and b/assets/icons/MainMenu/iButton_14/frame_02.png differ diff --git a/assets/icons/MainMenu/iButton_14/frame_03.png b/assets/icons/MainMenu/iButton_14/frame_03.png index 954f879a..f2c768a7 100644 Binary files a/assets/icons/MainMenu/iButton_14/frame_03.png and b/assets/icons/MainMenu/iButton_14/frame_03.png differ diff --git a/assets/icons/MainMenu/iButton_14/frame_04.png b/assets/icons/MainMenu/iButton_14/frame_04.png index 94e0effe..1fec6a94 100644 Binary files a/assets/icons/MainMenu/iButton_14/frame_04.png and b/assets/icons/MainMenu/iButton_14/frame_04.png differ diff --git a/assets/icons/MainMenu/iButton_14/frame_05.png b/assets/icons/MainMenu/iButton_14/frame_05.png index c877ddb3..8d6cc88a 100644 Binary files a/assets/icons/MainMenu/iButton_14/frame_05.png and b/assets/icons/MainMenu/iButton_14/frame_05.png differ diff --git a/assets/icons/MainMenu/iButton_14/frame_06.png b/assets/icons/MainMenu/iButton_14/frame_06.png index 349102af..5be1c844 100644 Binary files a/assets/icons/MainMenu/iButton_14/frame_06.png and b/assets/icons/MainMenu/iButton_14/frame_06.png differ diff --git a/assets/icons/MainMenu/iButton_14/frame_07.png b/assets/icons/MainMenu/iButton_14/frame_07.png index 09084806..1a36c6a9 100644 Binary files a/assets/icons/MainMenu/iButton_14/frame_07.png and b/assets/icons/MainMenu/iButton_14/frame_07.png differ diff --git a/assets/icons/StatusBar/BadUsb_9x8.png b/assets/icons/StatusBar/BadUsb_9x8.png index 06cd7957..2ba9167a 100644 Binary files a/assets/icons/StatusBar/BadUsb_9x8.png and b/assets/icons/StatusBar/BadUsb_9x8.png differ diff --git a/assets/icons/StatusBar/Battery_19x8.png b/assets/icons/StatusBar/Battery_19x8.png index f2c1fb40..d539f7f0 100644 Binary files a/assets/icons/StatusBar/Battery_19x8.png and b/assets/icons/StatusBar/Battery_19x8.png differ diff --git a/assets/icons/StatusBar/Bluetooth_5x8.png b/assets/icons/StatusBar/Bluetooth_5x8.png index b3cf7335..b7e6209f 100644 Binary files a/assets/icons/StatusBar/Bluetooth_5x8.png and b/assets/icons/StatusBar/Bluetooth_5x8.png differ diff --git a/assets/icons/StatusBar/SDcardFail_11x8.png b/assets/icons/StatusBar/SDcardFail_11x8.png index 8ce1ba07..6bcacbe8 100644 Binary files a/assets/icons/StatusBar/SDcardFail_11x8.png and b/assets/icons/StatusBar/SDcardFail_11x8.png differ diff --git a/assets/icons/StatusBar/SDcardMounted_11x8.png b/assets/icons/StatusBar/SDcardMounted_11x8.png index 8eb9282c..8d55d502 100644 Binary files a/assets/icons/StatusBar/SDcardMounted_11x8.png and b/assets/icons/StatusBar/SDcardMounted_11x8.png differ diff --git a/assets/icons/StatusBar/USBConnected_15x8.png b/assets/icons/StatusBar/USBConnected_15x8.png index b8860343..e91f0210 100644 Binary files a/assets/icons/StatusBar/USBConnected_15x8.png and b/assets/icons/StatusBar/USBConnected_15x8.png differ diff --git a/core/flipper_v2.h b/core/flipper_v2.h index e0de77b4..f2e344be 100644 --- a/core/flipper_v2.h +++ b/core/flipper_v2.h @@ -18,6 +18,7 @@ extern "C" { #include "api-basic/check.h" #include "api-hal/api-gpio.h" +#include "api-hal-resources.h" #include "gui/gui.h" diff --git a/firmware/targets/f2/Inc/main.h b/firmware/targets/f2/Inc/main.h index c86f631f..7ea00148 100644 --- a/firmware/targets/f2/Inc/main.h +++ b/firmware/targets/f2/Inc/main.h @@ -1,139 +1,163 @@ -/* USER CODE BEGIN Header */ -/** - ****************************************************************************** - * @file : main.h - * @brief : Header for main.c file. - * This file contains the common defines of the application. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under Ultimate Liberty license - * SLA0044, the "License"; You may not use this file except in compliance with - * the License. You may obtain a copy of the License at: - * www.st.com/SLA0044 - * - ****************************************************************************** - */ -/* USER CODE END Header */ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __MAIN_H -#define __MAIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* Includes ------------------------------------------------------------------*/ -#include "stm32l4xx_hal.h" - -/* Private includes ----------------------------------------------------------*/ -/* USER CODE BEGIN Includes */ - -/* USER CODE END Includes */ - -/* Exported types ------------------------------------------------------------*/ -/* USER CODE BEGIN ET */ - -/* USER CODE END ET */ - -/* Exported constants --------------------------------------------------------*/ -/* USER CODE BEGIN EC */ - -/* USER CODE END EC */ - -/* Exported macro ------------------------------------------------------------*/ -/* USER CODE BEGIN EM */ - -/* USER CODE END EM */ - -/* Exported functions prototypes ---------------------------------------------*/ -void Error_Handler(void); - -/* USER CODE BEGIN EFP */ - -/* USER CODE END EFP */ - -/* Private defines -----------------------------------------------------------*/ -#define BUTTON_BACK_Pin GPIO_PIN_13 -#define BUTTON_BACK_GPIO_Port GPIOC -#define BUTTON_BACK_EXTI_IRQn EXTI15_10_IRQn -#define CHRG_Pin GPIO_PIN_2 -#define CHRG_GPIO_Port GPIOC -#define CHRG_EXTI_IRQn EXTI2_IRQn -#define BATT_V_Pin GPIO_PIN_3 -#define BATT_V_GPIO_Port GPIOC -#define IR_RX_Pin GPIO_PIN_0 -#define IR_RX_GPIO_Port GPIOA -#define BUTTON_DOWN_Pin GPIO_PIN_1 -#define BUTTON_DOWN_GPIO_Port GPIOA -#define BUTTON_DOWN_EXTI_IRQn EXTI1_IRQn -#define DISPLAY_DI_Pin GPIO_PIN_2 -#define DISPLAY_DI_GPIO_Port GPIOA -#define SPEAKER_Pin GPIO_PIN_3 -#define SPEAKER_GPIO_Port GPIOA -#define NFC_CS_Pin GPIO_PIN_4 -#define NFC_CS_GPIO_Port GPIOC -#define RFID_RF_IN_Pin GPIO_PIN_5 -#define RFID_RF_IN_GPIO_Port GPIOC -#define BUTTON_UP_Pin GPIO_PIN_0 -#define BUTTON_UP_GPIO_Port GPIOB -#define BUTTON_UP_EXTI_IRQn EXTI0_IRQn -#define LED_BLUE_Pin GPIO_PIN_1 -#define LED_BLUE_GPIO_Port GPIOB -#define DISPLAY_RST_Pin GPIO_PIN_10 -#define DISPLAY_RST_GPIO_Port GPIOB -#define IR_TX_Pin GPIO_PIN_11 -#define IR_TX_GPIO_Port GPIOB -#define RFID_OUT_Pin GPIO_PIN_13 -#define RFID_OUT_GPIO_Port GPIOB -#define LED_GREEN_Pin GPIO_PIN_14 -#define LED_GREEN_GPIO_Port GPIOB -#define RFID_PULL_Pin GPIO_PIN_15 -#define RFID_PULL_GPIO_Port GPIOB -#define RFID_PULL_EXTI_IRQn EXTI15_10_IRQn -#define VIBRO_Pin GPIO_PIN_6 -#define VIBRO_GPIO_Port GPIOC -#define iButton_Pin GPIO_PIN_7 -#define iButton_GPIO_Port GPIOC -#define DISPLAY_CS_Pin GPIO_PIN_8 -#define DISPLAY_CS_GPIO_Port GPIOC -#define SD_CS_Pin GPIO_PIN_9 -#define SD_CS_GPIO_Port GPIOC -#define LED_RED_Pin GPIO_PIN_8 -#define LED_RED_GPIO_Port GPIOA -#define TMS_Pin GPIO_PIN_13 -#define TMS_GPIO_Port GPIOA -#define TCK_Pin GPIO_PIN_14 -#define TCK_GPIO_Port GPIOA -#define CC1101_CS_Pin GPIO_PIN_15 -#define CC1101_CS_GPIO_Port GPIOA -#define BUTTON_LEFT_Pin GPIO_PIN_4 -#define BUTTON_LEFT_GPIO_Port GPIOB -#define BUTTON_LEFT_EXTI_IRQn EXTI4_IRQn -#define DISPLAY_BACKLIGHT_Pin GPIO_PIN_6 -#define DISPLAY_BACKLIGHT_GPIO_Port GPIOB -#define CC1101_G0_Pin GPIO_PIN_7 -#define CC1101_G0_GPIO_Port GPIOB -#define BUTTON_RIGHT_Pin GPIO_PIN_8 -#define BUTTON_RIGHT_GPIO_Port GPIOB -#define BUTTON_RIGHT_EXTI_IRQn EXTI9_5_IRQn -#define BUTTON_OK_Pin GPIO_PIN_9 -#define BUTTON_OK_GPIO_Port GPIOB -#define BUTTON_OK_EXTI_IRQn EXTI9_5_IRQn -/* USER CODE BEGIN Private defines */ - -#define MISO_PIN GpioPin{.port = GPIOC, .pin = GPIO_PIN_11} - -/* USER CODE END Private defines */ - -#ifdef __cplusplus -} -#endif - -#endif /* __MAIN_H */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file : main.h + * @brief : Header for main.c file. + * This file contains the common defines of the application. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2020 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under Ultimate Liberty license + * SLA0044, the "License"; You may not use this file except in compliance with + * the License. You may obtain a copy of the License at: + * www.st.com/SLA0044 + * + ****************************************************************************** + */ +/* USER CODE END Header */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __MAIN_H +#define __MAIN_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32l4xx_hal.h" + +/* Private includes ----------------------------------------------------------*/ +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +/* Exported types ------------------------------------------------------------*/ +/* USER CODE BEGIN ET */ + +/* USER CODE END ET */ + +/* Exported constants --------------------------------------------------------*/ +/* USER CODE BEGIN EC */ + +/* USER CODE END EC */ + +/* Exported macro ------------------------------------------------------------*/ +/* USER CODE BEGIN EM */ + +/* USER CODE END EM */ + +/* Exported functions prototypes ---------------------------------------------*/ +void Error_Handler(void); + +/* USER CODE BEGIN EFP */ + +/* USER CODE END EFP */ + +/* Private defines -----------------------------------------------------------*/ +#define BUTTON_BACK_Pin GPIO_PIN_13 +#define BUTTON_BACK_GPIO_Port GPIOC +#define BUTTON_BACK_EXTI_IRQn EXTI15_10_IRQn +#define CHRG_Pin GPIO_PIN_2 +#define CHRG_GPIO_Port GPIOC +#define CHRG_EXTI_IRQn EXTI2_IRQn +#define BATT_V_Pin GPIO_PIN_3 +#define BATT_V_GPIO_Port GPIOC +#define IR_RX_Pin GPIO_PIN_0 +#define IR_RX_GPIO_Port GPIOA +#define BUTTON_DOWN_Pin GPIO_PIN_1 +#define BUTTON_DOWN_GPIO_Port GPIOA +#define BUTTON_DOWN_EXTI_IRQn EXTI1_IRQn +#define DISPLAY_DI_Pin GPIO_PIN_2 +#define DISPLAY_DI_GPIO_Port GPIOA +#define SPEAKER_Pin GPIO_PIN_3 +#define SPEAKER_GPIO_Port GPIOA +#define NFC_CS_Pin GPIO_PIN_4 +#define NFC_CS_GPIO_Port GPIOC +#define RFID_RF_IN_Pin GPIO_PIN_5 +#define RFID_RF_IN_GPIO_Port GPIOC +#define BUTTON_UP_Pin GPIO_PIN_0 +#define BUTTON_UP_GPIO_Port GPIOB +#define BUTTON_UP_EXTI_IRQn EXTI0_IRQn +#define LED_BLUE_Pin GPIO_PIN_1 +#define LED_BLUE_GPIO_Port GPIOB +#define DISPLAY_RST_Pin GPIO_PIN_10 +#define DISPLAY_RST_GPIO_Port GPIOB +#define IR_TX_Pin GPIO_PIN_11 +#define IR_TX_GPIO_Port GPIOB +#define RFID_OUT_Pin GPIO_PIN_13 +#define RFID_OUT_GPIO_Port GPIOB +#define LED_GREEN_Pin GPIO_PIN_14 +#define LED_GREEN_GPIO_Port GPIOB +#define RFID_PULL_Pin GPIO_PIN_15 +#define RFID_PULL_GPIO_Port GPIOB +#define RFID_PULL_EXTI_IRQn EXTI15_10_IRQn +#define VIBRO_Pin GPIO_PIN_6 +#define VIBRO_GPIO_Port GPIOC +#define iButton_Pin GPIO_PIN_7 +#define iButton_GPIO_Port GPIOC +#define DISPLAY_CS_Pin GPIO_PIN_8 +#define DISPLAY_CS_GPIO_Port GPIOC +#define SD_CS_Pin GPIO_PIN_9 +#define SD_CS_GPIO_Port GPIOC +#define LED_RED_Pin GPIO_PIN_8 +#define LED_RED_GPIO_Port GPIOA +#define TMS_Pin GPIO_PIN_13 +#define TMS_GPIO_Port GPIOA +#define TCK_Pin GPIO_PIN_14 +#define TCK_GPIO_Port GPIOA +#define CC1101_CS_Pin GPIO_PIN_15 +#define CC1101_CS_GPIO_Port GPIOA +#define BUTTON_LEFT_Pin GPIO_PIN_4 +#define BUTTON_LEFT_GPIO_Port GPIOB +#define BUTTON_LEFT_EXTI_IRQn EXTI4_IRQn +#define DISPLAY_BACKLIGHT_Pin GPIO_PIN_6 +#define DISPLAY_BACKLIGHT_GPIO_Port GPIOB +#define CC1101_G0_Pin GPIO_PIN_7 +#define CC1101_G0_GPIO_Port GPIOB +#define BUTTON_RIGHT_Pin GPIO_PIN_8 +#define BUTTON_RIGHT_GPIO_Port GPIOB +#define BUTTON_RIGHT_EXTI_IRQn EXTI9_5_IRQn +#define BUTTON_OK_Pin GPIO_PIN_9 +#define BUTTON_OK_GPIO_Port GPIOB +#define BUTTON_OK_EXTI_IRQn EXTI9_5_IRQn +/* USER CODE BEGIN Private defines */ + +#define MISO_PIN GpioPin{.port = GPIOC, .pin = GPIO_PIN_11} + +#define SPI_R hspi3 +#define SPI_D hspi1 +#define SPI_SD_HANDLE SPI_R + +extern TIM_HandleTypeDef htim2; +extern TIM_HandleTypeDef htim5; +extern TIM_HandleTypeDef htim15; + +#define TIM_A htim2 +#define TIM_B htim5 +#define TIM_C htim15 + +#define SPEAKER_TIM htim5 +#define SPEAKER_CH TIM_CHANNEL_4 + +#define LFRFID_TIM htim15 +#define LFRFID_CH TIM_CHANNEL_1 + +#define IRDA_TIM htim2 +#define IRDA_CH TIM_CHANNEL_4 + +#define NFC_IRQ_Pin RFID_PULL_Pin +#define NFC_IRQ_GPIO_Port RFID_PULL_GPIO_Port + +/* USER CODE END Private defines */ + +#ifdef __cplusplus +} +#endif + +#endif /* __MAIN_H */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/firmware/targets/f2/Inc/spi.h b/firmware/targets/f2/Inc/spi.h index 86d8b746..8c064f36 100644 --- a/firmware/targets/f2/Inc/spi.h +++ b/firmware/targets/f2/Inc/spi.h @@ -41,7 +41,10 @@ void MX_SPI1_Init(void); void MX_SPI3_Init(void); /* USER CODE BEGIN Prototypes */ - +void NFC_SPI_Reconfigure(); +void SD_SPI_Reconfigure_Slow(); +void SD_SPI_Reconfigure_Fast(); +void CC1101_SPI_Reconfigure(); /* USER CODE END Prototypes */ #ifdef __cplusplus diff --git a/firmware/targets/f2/Src/fatfs/spi_sd_hal.c b/firmware/targets/f2/Src/fatfs/spi_sd_hal.c index 8b6ae579..0cad29f7 100644 --- a/firmware/targets/f2/Src/fatfs/spi_sd_hal.c +++ b/firmware/targets/f2/Src/fatfs/spi_sd_hal.c @@ -4,9 +4,6 @@ #define SD_CS_LOW() HAL_GPIO_WritePin(SD_CS_GPIO_Port, SD_CS_Pin, GPIO_PIN_RESET) #define SD_CS_HIGH() HAL_GPIO_WritePin(SD_CS_GPIO_Port, SD_CS_Pin, GPIO_PIN_SET) -#define SPI_SD_INSTANCE SPI3 -#define SPI_SD_HANDLE hspi3 - const uint32_t SpiTimeout = 1000; extern SPI_HandleTypeDef SPI_SD_HANDLE; uint8_t SD_IO_WriteByte(uint8_t Data); @@ -64,46 +61,6 @@ __attribute__((unused)) static void SPIx_Write(uint8_t Value) { } } -void SD_SPI_Slow_Init(void) { - SPI_SD_HANDLE.Instance = SPI_SD_INSTANCE; - SPI_SD_HANDLE.Init.Mode = SPI_MODE_MASTER; - SPI_SD_HANDLE.Init.Direction = SPI_DIRECTION_2LINES; - SPI_SD_HANDLE.Init.DataSize = SPI_DATASIZE_8BIT; - SPI_SD_HANDLE.Init.CLKPolarity = SPI_POLARITY_LOW; - SPI_SD_HANDLE.Init.CLKPhase = SPI_PHASE_1EDGE; - SPI_SD_HANDLE.Init.NSS = SPI_NSS_SOFT; - SPI_SD_HANDLE.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_256; - SPI_SD_HANDLE.Init.FirstBit = SPI_FIRSTBIT_MSB; - SPI_SD_HANDLE.Init.TIMode = SPI_TIMODE_DISABLE; - SPI_SD_HANDLE.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; - SPI_SD_HANDLE.Init.CRCPolynomial = 7; - SPI_SD_HANDLE.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; - SPI_SD_HANDLE.Init.NSSPMode = SPI_NSS_PULSE_ENABLE; - if(HAL_SPI_Init(&SPI_SD_HANDLE) != HAL_OK) { - Error_Handler(); - } -} - -void SD_SPI_Fast_Init(void) { - SPI_SD_HANDLE.Instance = SPI_SD_INSTANCE; - SPI_SD_HANDLE.Init.Mode = SPI_MODE_MASTER; - SPI_SD_HANDLE.Init.Direction = SPI_DIRECTION_2LINES; - SPI_SD_HANDLE.Init.DataSize = SPI_DATASIZE_8BIT; - SPI_SD_HANDLE.Init.CLKPolarity = SPI_POLARITY_LOW; - SPI_SD_HANDLE.Init.CLKPhase = SPI_PHASE_1EDGE; - SPI_SD_HANDLE.Init.NSS = SPI_NSS_SOFT; - SPI_SD_HANDLE.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; - SPI_SD_HANDLE.Init.FirstBit = SPI_FIRSTBIT_MSB; - SPI_SD_HANDLE.Init.TIMode = SPI_TIMODE_DISABLE; - SPI_SD_HANDLE.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; - SPI_SD_HANDLE.Init.CRCPolynomial = 7; - SPI_SD_HANDLE.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; - SPI_SD_HANDLE.Init.NSSPMode = SPI_NSS_PULSE_ENABLE; - if(HAL_SPI_Init(&SPI_SD_HANDLE) != HAL_OK) { - Error_Handler(); - } -} - /****************************************************************************** LINK OPERATIONS *******************************************************************************/ diff --git a/firmware/targets/f2/Src/fatfs/stm32_adafruit_sd.c b/firmware/targets/f2/Src/fatfs/stm32_adafruit_sd.c index 85358d87..cc71e98b 100644 --- a/firmware/targets/f2/Src/fatfs/stm32_adafruit_sd.c +++ b/firmware/targets/f2/Src/fatfs/stm32_adafruit_sd.c @@ -91,6 +91,7 @@ #include "stdlib.h" #include "string.h" #include "stdio.h" +#include "spi.h" /** @addtogroup BSP * @{ @@ -290,7 +291,7 @@ static uint8_t SD_ReadData(void); */ uint8_t BSP_SD_Init(void) { /* Init to maximum slow speed */ - SD_SPI_Slow_Init(); + SD_SPI_Reconfigure_Slow(); /* Configure IO functionalities for SD pin */ SD_IO_Init(); @@ -300,7 +301,7 @@ uint8_t BSP_SD_Init(void) { uint8_t res = SD_GoIdleState(); /* Init to maximum fastest speed */ - SD_SPI_Fast_Init(); + SD_SPI_Reconfigure_Fast(); /* SD initialized and set to SPI mode properly */ return res; diff --git a/firmware/targets/f2/Src/main.c b/firmware/targets/f2/Src/main.c index 4780056f..bf0c980e 100644 --- a/firmware/targets/f2/Src/main.c +++ b/firmware/targets/f2/Src/main.c @@ -88,7 +88,6 @@ int main(void) SystemClock_Config(); /* USER CODE BEGIN SysInit */ - /* USER CODE END SysInit */ /* Initialize all configured peripherals */ diff --git a/firmware/targets/f2/Src/spi.c b/firmware/targets/f2/Src/spi.c index fc261570..7e767e11 100644 --- a/firmware/targets/f2/Src/spi.c +++ b/firmware/targets/f2/Src/spi.c @@ -175,6 +175,101 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* spiHandle) /* USER CODE BEGIN 1 */ +void NFC_SPI_Reconfigure() { + if (HAL_SPI_DeInit(&SPI_R) != HAL_OK) { + Error_Handler(); + } + + SPI_R.Init.Mode = SPI_MODE_MASTER; + SPI_R.Init.Direction = SPI_DIRECTION_2LINES; + SPI_R.Init.DataSize = SPI_DATASIZE_8BIT; + SPI_R.Init.CLKPolarity = SPI_POLARITY_LOW; + SPI_R.Init.CLKPhase = SPI_PHASE_2EDGE; + SPI_R.Init.NSS = SPI_NSS_SOFT; + SPI_R.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64; + SPI_R.Init.FirstBit = SPI_FIRSTBIT_MSB; + SPI_R.Init.TIMode = SPI_TIMODE_DISABLE; + SPI_R.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; + SPI_R.Init.CRCPolynomial = 7; + SPI_R.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; + SPI_R.Init.NSSPMode = SPI_NSS_PULSE_DISABLE; + + if (HAL_SPI_Init(&SPI_R) != HAL_OK) { + Error_Handler(); + } +} + +void SD_SPI_Reconfigure_Slow(void) { + if (HAL_SPI_DeInit(&SPI_SD_HANDLE) != HAL_OK) { + Error_Handler(); + } + + SPI_SD_HANDLE.Init.Mode = SPI_MODE_MASTER; + SPI_SD_HANDLE.Init.Direction = SPI_DIRECTION_2LINES; + SPI_SD_HANDLE.Init.DataSize = SPI_DATASIZE_8BIT; + SPI_SD_HANDLE.Init.CLKPolarity = SPI_POLARITY_LOW; + SPI_SD_HANDLE.Init.CLKPhase = SPI_PHASE_1EDGE; + SPI_SD_HANDLE.Init.NSS = SPI_NSS_SOFT; + SPI_SD_HANDLE.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_256; + SPI_SD_HANDLE.Init.FirstBit = SPI_FIRSTBIT_MSB; + SPI_SD_HANDLE.Init.TIMode = SPI_TIMODE_DISABLE; + SPI_SD_HANDLE.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; + SPI_SD_HANDLE.Init.CRCPolynomial = 7; + SPI_SD_HANDLE.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; + SPI_SD_HANDLE.Init.NSSPMode = SPI_NSS_PULSE_ENABLE; + + if(HAL_SPI_Init(&SPI_SD_HANDLE) != HAL_OK) { + Error_Handler(); + } +} + +void SD_SPI_Reconfigure_Fast(void) { + if (HAL_SPI_DeInit(&SPI_SD_HANDLE) != HAL_OK) { + Error_Handler(); + } + + SPI_SD_HANDLE.Init.Mode = SPI_MODE_MASTER; + SPI_SD_HANDLE.Init.Direction = SPI_DIRECTION_2LINES; + SPI_SD_HANDLE.Init.DataSize = SPI_DATASIZE_8BIT; + SPI_SD_HANDLE.Init.CLKPolarity = SPI_POLARITY_LOW; + SPI_SD_HANDLE.Init.CLKPhase = SPI_PHASE_1EDGE; + SPI_SD_HANDLE.Init.NSS = SPI_NSS_SOFT; + SPI_SD_HANDLE.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2; + SPI_SD_HANDLE.Init.FirstBit = SPI_FIRSTBIT_MSB; + SPI_SD_HANDLE.Init.TIMode = SPI_TIMODE_DISABLE; + SPI_SD_HANDLE.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; + SPI_SD_HANDLE.Init.CRCPolynomial = 7; + SPI_SD_HANDLE.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; + SPI_SD_HANDLE.Init.NSSPMode = SPI_NSS_PULSE_ENABLE; + + if(HAL_SPI_Init(&SPI_SD_HANDLE) != HAL_OK) { + Error_Handler(); + } +} + +void CC1101_SPI_Reconfigure(void) { + if(HAL_SPI_DeInit(&SPI_R) != HAL_OK) { + Error_Handler(); + } + + SPI_R.Init.Mode = SPI_MODE_MASTER; + SPI_R.Init.Direction = SPI_DIRECTION_2LINES; + SPI_R.Init.DataSize = SPI_DATASIZE_8BIT; + SPI_R.Init.CLKPolarity = SPI_POLARITY_LOW; + SPI_R.Init.CLKPhase = SPI_PHASE_1EDGE; + SPI_R.Init.NSS = SPI_NSS_SOFT; + SPI_R.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64; + SPI_R.Init.FirstBit = SPI_FIRSTBIT_MSB; + SPI_R.Init.TIMode = SPI_TIMODE_DISABLE; + SPI_R.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; + SPI_R.Init.CRCPolynomial = 7; + SPI_R.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; + SPI_R.Init.NSSPMode = SPI_NSS_PULSE_DISABLE; + + if(HAL_SPI_Init(&SPI_R) != HAL_OK) { + Error_Handler(); + } +} /* USER CODE END 1 */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/firmware/targets/f2/api-hal/api-hal-pwm.c b/firmware/targets/f2/api-hal/api-hal-pwm.c index 2c3c312f..ee8bf879 100644 --- a/firmware/targets/f2/api-hal/api-hal-pwm.c +++ b/firmware/targets/f2/api-hal/api-hal-pwm.c @@ -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); } \ No newline at end of file diff --git a/firmware/targets/f2/api-hal/api-hal-pwm.h b/firmware/targets/f2/api-hal/api-hal-pwm.h index 8e30bec7..e712ca16 100644 --- a/firmware/targets/f2/api-hal/api-hal-pwm.h +++ b/firmware/targets/f2/api-hal/api-hal-pwm.h @@ -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(); \ No newline at end of file diff --git a/firmware/targets/f2/Inc/input_priv.h b/firmware/targets/f2/api-hal/api-hal-resources.c similarity index 65% rename from firmware/targets/f2/Inc/input_priv.h rename to firmware/targets/f2/api-hal/api-hal-resources.c index 86ba658d..4c7e4d46 100644 --- a/firmware/targets/f2/Inc/input_priv.h +++ b/firmware/targets/f2/api-hal/api-hal-resources.c @@ -1,22 +1,18 @@ -#ifndef __INPUT_PRIV_H -#define __INPUT_PRIV_H - #include "main.h" #include "flipper_v2.h" #define DEBOUNCE_TICKS 10 -const GpioPin input_gpio[] = { +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} -}; + {CHRG_GPIO_Port, CHRG_Pin}}; -const bool input_invert[] = { +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}, @@ -26,4 +22,9 @@ const bool input_invert[] = { true, // {CHRG_GPIO_Port, CHRG_Pin} }; -#endif /* __INPUT_PRIV_H */ +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}; \ No newline at end of file diff --git a/firmware/targets/f2/api-hal/api-hal-resources.h b/firmware/targets/f2/api-hal/api-hal-resources.h new file mode 100644 index 00000000..9e2ea425 --- /dev/null +++ b/firmware/targets/f2/api-hal/api-hal-resources.h @@ -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; \ No newline at end of file diff --git a/firmware/targets/f2/cube.ioc b/firmware/targets/f2/cube.ioc index d8b739ee..718ed2b2 100644 --- a/firmware/targets/f2/cube.ioc +++ b/firmware/targets/f2/cube.ioc @@ -1,506 +1,506 @@ #MicroXplorer Configuration settings - do not modify -PB13.GPIOParameters=GPIO_Label -PC7.GPIOParameters=GPIO_ModeDefaultPP,GPIO_Speed,GPIO_PuPd,GPIO_Label -PA15\ (JTDI).GPIOParameters=PinState,GPIO_Label -RCC.USART1Freq_Value=64000000 -TIM8.ICPolarity_CH2=TIM_INPUTCHANNELPOLARITY_BOTHEDGE -SPI3.Direction=SPI_DIRECTION_2LINES -PC10.GPIO_PuPd=GPIO_PULLDOWN -SPI3.VirtualType=VM_MASTER -SPI1.VirtualType=VM_MASTER -VP_ADC1_TempSens_Input.Mode=IN-TempSens -PC12.Locked=true -SH.GPXTI9.0=GPIO_EXTI9 -PC12.Signal=SPI3_MOSI -PB14.GPIO_Label=LED_GREEN -PC7.Locked=true -PA13\ (JTMS-SWDIO).Locked=true -PC6.GPIO_Label=VIBRO -PC3.Locked=true -PA3.GPIOParameters=GPIO_Label -PB6.GPIO_Label=DISPLAY_BACKLIGHT -PA15\ (JTDI).Signal=GPIO_Output -PC15-OSC32_OUT\ (PC15).Mode=LSE-External-Oscillator -PC5.Mode=INP -USART1.IPParameters=VirtualMode-Asynchronous -PB13.Signal=TIM15_CH1N -VP_TIM8_VS_ClockSourceINT.Signal=TIM8_VS_ClockSourceINT -PA2.GPIOParameters=GPIO_Label -PinOutPanel.RotationAngle=0 -RCC.MCO1PinFreq_Value=64000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -TIM15.Channel-Output\ Compare1\ CH1N=TIM_CHANNEL_1 -PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator -SH.GPXTI13.0=GPIO_EXTI13 -PA14\ (JTCK-SWCLK).Signal=SYS_JTCK-SWCLK -RCC.LPTIM1Freq_Value=64000000 -NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:false -NVIC.EXTI1_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true -PB4\ (NJTRST).GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING -RCC.ADCCLockSelection=RCC_ADCCLKSOURCE_SYSCLK -SPI1.Direction=SPI_DIRECTION_2LINES -RCC.APB2TimFreq_Value=64000000 -PB6.Signal=GPIO_Output -PC7.Signal=S_TIM8_CH2 -SPI1.CalculateBaudRate=4.0 MBits/s -PC3.Signal=ADCx_IN4 -RCC.SAI2Freq_Value=13714285.714285715 -PA1.GPIO_PuPd=GPIO_PULLDOWN -RCC.PREFETCH_ENABLE=1 -PB13.Locked=true -RCC.USART3Freq_Value=64000000 -NVIC.EXTI15_10_IRQn=true\:5\:0\:true\:false\:true\:false\:true\:true -ProjectManager.ProjectBuild=false -NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -PA0.Locked=true -PB2.Signal=GPIO_Analog -PA8.Locked=true -PA4.Locked=true -ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.16.0 -VP_ADC1_Vref_Input.Mode=IN-Vrefint -MxDb.Version=DB.6.0.0 -PB0.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI -PA1.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI -ProjectManager.BackupPrevious=false -VP_SYS_VS_tim17.Signal=SYS_VS_tim17 -PC4.GPIO_Label=NFC_CS -PB1.GPIO_Speed=GPIO_SPEED_FREQ_MEDIUM -FREERTOS.HEAP_NUMBER=4 -PB1.GPIO_Label=LED_BLUE -SPI1.DataSize=SPI_DATASIZE_8BIT -PC7.GPIO_ModeDefaultPP=GPIO_MODE_AF_OD -PA8.Signal=GPIO_Output -PA8.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD -RCC.PLLRCLKFreq_Value=64000000 -SH.ADCx_IN4.ConfNb=1 -PB6.Locked=true -NVIC.PendSV_IRQn=true\:15\:0\:false\:false\:false\:true\:false\:false -ProjectManager.HalAssertFull=false -ADC1.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5 -PA0.Signal=ADCx_IN5 -PC8.GPIOParameters=GPIO_Label -Mcu.Package=LQFP64 -PB9.Signal=GPXTI9 -PB1.Signal=GPIO_Output -PA5.Locked=true -NVIC.TimeBase=TIM1_TRG_COM_TIM17_IRQn -SPI3.Mode=SPI_MODE_MASTER -SH.GPXTI8.0=GPIO_EXTI8 -SH.GPXTI8.ConfNb=1 -NVIC.TimeBaseIP=TIM17 -RCC.LSCOPinFreq_Value=32000 -PA10.Signal=USART1_RX -PB9.GPIO_PuPd=GPIO_PULLDOWN -FREERTOS.FootprintOK=true -RCC.DFSDMFreq_Value=64000000 -PC11.Mode=Full_Duplex_Master -PB14.GPIOParameters=GPIO_Speed,PinState,GPIO_Label,GPIO_ModeDefaultOutputPP -NVIC.EXTI2_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true -RCC.PLLPoutputFreq_Value=18285714.285714287 -RCC.APB1TimFreq_Value=64000000 -FREERTOS.configGENERATE_RUN_TIME_STATS=1 -NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -RCC.LPUART1Freq_Value=64000000 -USB_OTG_FS.IPParameters=VirtualMode -PB13.Mode=Output Compare1 CH1N -PB10.GPIOParameters=GPIO_Label -PC12.GPIO_PuPd=GPIO_PULLDOWN -PA13\ (JTMS-SWDIO).Signal=SYS_JTMS-SWDIO -PA13\ (JTMS-SWDIO).GPIOParameters=GPIO_Label -PH0-OSC_IN\ (PH0).Mode=HSE-External-Oscillator -PA8.GPIO_Speed=GPIO_SPEED_FREQ_HIGH -ProjectManager.CustomerFirmwarePackage=../../../lib/STM32CubeL4 -PC4.GPIOParameters=PinState,GPIO_Label -PC2.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING -NVIC.EXTI4_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true -RCC.PLLQoutputFreq_Value=64000000 -ProjectManager.ProjectFileName=cube.ioc -FREERTOS.Tasks01=defaultTask,24,1024,StartDefaultTask,Default,NULL,Dynamic,NULL,NULL;app_main,8,128,app,As external,NULL,Dynamic,NULL,NULL -ADC1.Rank-0\#ChannelRegularConversion=1 -TIM5.IPParameters=Prescaler,Period,Channel-PWM Generation4 CH4,Pulse-PWM Generation4 CH4 -Mcu.PinsNb=58 -PC4.PinState=GPIO_PIN_SET -PC11.Locked=true -VP_SYS_VS_tim17.Mode=TIM17 +ADC1.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_4 ADC1.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,NbrOfConversionFlag,master,NbrOfConversion -PC13.Locked=true -ADC1.OffsetNumber-0\#ChannelRegularConversion=ADC_OFFSET_NONE -PC13.Signal=GPXTI13 -RCC.SWPMI1Freq_Value=64000000 -FREERTOS.configCHECK_FOR_STACK_OVERFLOW=1 -PB8.GPIO_PuPd=GPIO_PULLDOWN -PC6.Signal=GPIO_Output -PC2.Signal=GPXTI2 -PB11.GPIO_Label=IR_TX -PC9.PinState=GPIO_PIN_SET -SH.GPXTI0.ConfNb=1 -SPI1.CLKPhase=SPI_PHASE_1EDGE -PC0.Signal=GPIO_Analog -PB14.Locked=true -PC11.GPIOParameters=GPIO_PuPd -SH.S_TIM8_CH2.0=TIM8_CH2,Input_Capture2_from_TI2 -PC3.GPIOParameters=GPIO_Label -PB8.GPIO_Label=BUTTON_RIGHT -PA11.Locked=true -PA8.GPIO_Label=LED_RED -SH.GPXTI2.ConfNb=1 -Mcu.Pin57=VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS -PB14.GPIO_Speed=GPIO_SPEED_FREQ_MEDIUM -Mcu.Pin51=VP_ADC1_TempSens_Input -Mcu.Pin52=VP_ADC1_Vref_Input -Mcu.Pin50=PB9 -Mcu.Pin55=VP_SYS_VS_tim17 -Mcu.Pin56=VP_TIM8_VS_ClockSourceINT -Mcu.Pin53=VP_COMP1_VS_VREFINT12 -Mcu.Pin54=VP_FREERTOS_VS_CMSIS_V2 -PC6.Locked=true -PA9.Signal=USART1_TX -PB11.GPIOParameters=GPIO_Label -PB5.Locked=true -PB9.Locked=true -VP_TIM8_VS_ClockSourceINT.Mode=Internal -PC7.GPIO_PuPd=GPIO_NOPULL -Mcu.Pin48=PB7 -Mcu.Pin49=PB8 -RCC.PLLSAI1PoutputFreq_Value=13714285.714285715 -Mcu.Pin46=PB5 -Mcu.Pin47=PB6 -PB10.Signal=GPIO_Output -PB14.Signal=GPIO_Output -RCC.PLLSAI2RoutputFreq_Value=32000000 -PA5.Signal=GPIO_Analog -Mcu.Pin40=PC10 -Mcu.Pin41=PC11 -PC12.Mode=Full_Duplex_Master -Mcu.Pin44=PB3 (JTDO-TRACESWO) -Mcu.Pin45=PB4 (NJTRST) -Mcu.Pin42=PC12 -Mcu.Pin43=PD2 -ProjectManager.LastFirmware=true -Mcu.Pin37=PA13 (JTMS-SWDIO) -Mcu.Pin38=PA14 (JTCK-SWCLK) -PB15.GPIO_Label=RFID_PULL -Mcu.Pin35=PA11 -RCC.I2C1Freq_Value=64000000 -Mcu.Pin36=PA12 -SPI1.Mode=SPI_MODE_MASTER -Mcu.Pin39=PA15 (JTDI) -PB3\ (JTDO-TRACESWO).Mode=TX_Only_Simplex_Unidirect_Master -RCC.RNGFreq_Value=48000000 -PC2.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI -VP_ADC1_TempSens_Input.Signal=ADC1_TempSens_Input -Mcu.Pin30=PC8 -PA1.GPIO_Label=BUTTON_DOWN -Mcu.Pin33=PA9 -Mcu.Pin34=PA10 -Mcu.Pin31=PC9 -SH.ADCx_IN4.0=ADC1_IN4,IN4-Single-Ended -Mcu.Pin32=PA8 -PA9.Locked=true -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -PC10.GPIOParameters=GPIO_PuPd -SH.S_TIM5_CH4.ConfNb=1 -ProjectManager.FreePins=false -PC9.GPIOParameters=PinState,GPIO_Label -RCC.LPTIM2Freq_Value=64000000 -Mcu.Pin26=PB14 -Mcu.Pin27=PB15 -Mcu.Pin24=PB12 -ProjectManager.UnderRoot=false -Mcu.Pin25=PB13 -TIM8.Period=32768-1 -Mcu.Pin28=PC6 -PC7.GPIO_Label=iButton -Mcu.Pin29=PC7 -PA13\ (JTMS-SWDIO).Mode=Serial_Wire -PA4.Signal=GPIO_Analog -Mcu.Pin22=PB10 -PB5.Signal=SPI1_MOSI -Mcu.Pin23=PB11 -Mcu.Pin20=PB1 ADC1.master=1 -PA3.Locked=true -Mcu.Pin21=PB2 -PA10.Locked=true -PA14\ (JTCK-SWCLK).Locked=true -NVIC.ForceEnableDMAVector=true -NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -ProjectManager.CompilerOptimize=6 -PA11.Signal=USB_OTG_FS_DM -ProjectManager.HeapSize=0x200 -PA0.GPIOParameters=GPIO_Label -Mcu.Pin15=PA6 -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -Mcu.Pin16=PA7 -Mcu.Pin13=PA4 -Mcu.Pin14=PA5 -Mcu.Pin19=PB0 -SH.GPXTI15.ConfNb=1 -ProjectManager.ComputerToolchain=false -Mcu.Pin17=PC4 -Mcu.Pin18=PC5 -SH.ADCx_IN5.0=ADC1_IN5,IN5-Single-Ended -NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 -Mcu.Pin11=PA2 -Mcu.Pin12=PA3 -Mcu.Pin10=PA1 -PC3.GPIO_Label=BATT_V -RCC.PWRFreq_Value=64000000 -PA15\ (JTDI).PinState=GPIO_PIN_SET -SH.ADCx_IN5.ConfNb=1 -PB4\ (NJTRST).GPIO_Label=BUTTON_LEFT -PB1.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD -SH.GPXTI1.ConfNb=1 -PD2.Signal=GPIO_Analog -PB6.GPIO_Speed=GPIO_SPEED_FREQ_LOW -RCC.I2C2Freq_Value=64000000 -PB0.Signal=GPXTI0 -PB4\ (NJTRST).GPIO_PuPd=GPIO_PULLDOWN -PC0.Locked=true -PC1.Signal=GPIO_Analog +ADC1.NbrOfConversion=1 +ADC1.NbrOfConversionFlag=1 +ADC1.OffsetNumber-0\#ChannelRegularConversion=ADC_OFFSET_NONE +ADC1.Rank-0\#ChannelRegularConversion=1 +ADC1.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_2CYCLES_5 +board=NUCLEO-L476RG +boardIOC=true +File.Version=6 +FREERTOS.configCHECK_FOR_STACK_OVERFLOW=1 +FREERTOS.configGENERATE_RUN_TIME_STATS=1 +FREERTOS.configRECORD_STACK_HIGH_ADDRESS=1 +FREERTOS.configTOTAL_HEAP_SIZE=40960 +FREERTOS.configUSE_IDLE_HOOK=1 +FREERTOS.configUSE_TIMERS=1 +FREERTOS.FootprintOK=true +FREERTOS.HEAP_NUMBER=4 +FREERTOS.IPParameters=Tasks01,configTOTAL_HEAP_SIZE,HEAP_NUMBER,configUSE_TIMERS,configUSE_IDLE_HOOK,FootprintOK,configCHECK_FOR_STACK_OVERFLOW,configRECORD_STACK_HIGH_ADDRESS,configGENERATE_RUN_TIME_STATS +FREERTOS.Tasks01=defaultTask,24,1024,StartDefaultTask,Default,NULL,Dynamic,NULL,NULL;app_main,8,128,app,As external,NULL,Dynamic,NULL,NULL +GPIO.groupedBy=Group By Peripherals +KeepUserPlacement=false Mcu.Family=STM32L4 -SH.GPXTI1.0=GPIO_EXTI1 -ProjectManager.MainLocation=Src -USB_DEVICE.CLASS_NAME_FS=CDC -RCC.SAI1Freq_Value=13714285.714285715 -RCC.CortexFreq_Value=64000000 -ProjectManager.KeepUserCode=true -Mcu.UserName=STM32L476RGTx -PH0-OSC_IN\ (PH0).Signal=RCC_OSC_IN -PH0-OSC_IN\ (PH0).Locked=true -PC10.Locked=true -PC10.Signal=SPI3_SCK -RCC.PLLSAI1RoutputFreq_Value=48000000 -PA0.GPIO_Label=IR_RX -ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_SPI1_Init-SPI1-false-HAL-true,4-MX_SPI3_Init-SPI3-false-HAL-true,5-MX_ADC1_Init-ADC1-false-HAL-true,6-MX_COMP1_Init-COMP1-false-HAL-true,7-MX_TIM5_Init-TIM5-false-HAL-true,8-MX_TIM15_Init-TIM15-false-HAL-true,9-MX_USART1_UART_Init-USART1-false-HAL-true,10-MX_USB_DEVICE_Init-USB_DEVICE-false-HAL-false,11-MX_TIM8_Init-TIM8-false-HAL-true -PA11.Mode=Device_Only -PC9.Locked=true -TIM5.Pulse-PWM\ Generation4\ CH4=145 -PB0.GPIO_Label=BUTTON_UP -RCC.USART2Freq_Value=64000000 -PD2.Locked=true -VP_COMP1_VS_VREFINT12.Signal=COMP1_VS_VREFINT12 -PC13.GPIO_Label=BUTTON_BACK -PC1.Locked=true -PB13.GPIO_Label=RFID_OUT -PB11.Signal=GPIO_Output -PB15.Signal=GPXTI15 -ProjectManager.StackSize=0x400 -PB3\ (JTDO-TRACESWO).Signal=SPI1_SCK -VP_FREERTOS_VS_CMSIS_V2.Mode=CMSIS_V2 -SH.GPXTI2.0=GPIO_EXTI2 -RCC.I2C3Freq_Value=64000000 -Mcu.IP4=RCC -RCC.FCLKCortexFreq_Value=64000000 -Mcu.IP5=SPI1 +Mcu.IP0=ADC1 +Mcu.IP10=TIM15 +Mcu.IP11=USART1 +Mcu.IP12=USB_DEVICE +Mcu.IP13=USB_OTG_FS +Mcu.IP1=COMP1 Mcu.IP2=FREERTOS Mcu.IP3=NVIC -PC11.GPIO_PuPd=GPIO_PULLDOWN -Mcu.IP0=ADC1 -Mcu.IP1=COMP1 -PA12.Locked=true -PA12.Signal=USB_OTG_FS_DP -PB8.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING -SPI1.CLKPolarity=SPI_POLARITY_LOW -Mcu.UserConstants= -RCC.VCOSAI1OutputFreq_Value=96000000 -SPI3.CLKPolarity=SPI_POLARITY_LOW -RCC.SDMMCFreq_Value=48000000 -PA14\ (JTCK-SWCLK).GPIOParameters=GPIO_Label -SH.GPXTI13.ConfNb=1 -Mcu.ThirdPartyNb=0 -RCC.HCLKFreq_Value=64000000 +Mcu.IP4=RCC +Mcu.IP5=SPI1 +Mcu.IP6=SPI3 +Mcu.IP7=SYS +Mcu.IP8=TIM5 +Mcu.IP9=TIM8 Mcu.IPNb=14 -ProjectManager.PreviousToolchain= -PA8.GPIOParameters=GPIO_Speed,PinState,GPIO_Label,GPIO_ModeDefaultOutputPP +Mcu.Name=STM32L476R(C-E-G)Tx +Mcu.Package=LQFP64 +Mcu.Pin0=PC13 +Mcu.Pin10=PA1 +Mcu.Pin11=PA2 +Mcu.Pin12=PA3 +Mcu.Pin13=PA4 +Mcu.Pin14=PA5 +Mcu.Pin15=PA6 +Mcu.Pin16=PA7 +Mcu.Pin17=PC4 +Mcu.Pin18=PC5 +Mcu.Pin19=PB0 +Mcu.Pin1=PC14-OSC32_IN (PC14) +Mcu.Pin20=PB1 +Mcu.Pin21=PB2 +Mcu.Pin22=PB10 +Mcu.Pin23=PB11 +Mcu.Pin24=PB12 +Mcu.Pin25=PB13 +Mcu.Pin26=PB14 +Mcu.Pin27=PB15 +Mcu.Pin28=PC6 +Mcu.Pin29=PC7 +Mcu.Pin2=PC15-OSC32_OUT (PC15) +Mcu.Pin30=PC8 +Mcu.Pin31=PC9 +Mcu.Pin32=PA8 +Mcu.Pin33=PA9 +Mcu.Pin34=PA10 +Mcu.Pin35=PA11 +Mcu.Pin36=PA12 +Mcu.Pin37=PA13 (JTMS-SWDIO) +Mcu.Pin38=PA14 (JTCK-SWCLK) +Mcu.Pin39=PA15 (JTDI) +Mcu.Pin3=PH0-OSC_IN (PH0) +Mcu.Pin40=PC10 +Mcu.Pin41=PC11 +Mcu.Pin42=PC12 +Mcu.Pin43=PD2 +Mcu.Pin44=PB3 (JTDO-TRACESWO) +Mcu.Pin45=PB4 (NJTRST) +Mcu.Pin46=PB5 +Mcu.Pin47=PB6 +Mcu.Pin48=PB7 +Mcu.Pin49=PB8 +Mcu.Pin4=PH1-OSC_OUT (PH1) +Mcu.Pin50=PB9 +Mcu.Pin51=VP_ADC1_TempSens_Input +Mcu.Pin52=VP_ADC1_Vref_Input +Mcu.Pin53=VP_COMP1_VS_VREFINT12 +Mcu.Pin54=VP_FREERTOS_VS_CMSIS_V2 +Mcu.Pin55=VP_SYS_VS_tim17 +Mcu.Pin56=VP_TIM8_VS_ClockSourceINT +Mcu.Pin57=VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS +Mcu.Pin5=PC0 Mcu.Pin6=PC1 -PB9.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING Mcu.Pin7=PC2 Mcu.Pin8=PC3 Mcu.Pin9=PA0 -FREERTOS.IPParameters=Tasks01,configTOTAL_HEAP_SIZE,HEAP_NUMBER,configUSE_TIMERS,configUSE_IDLE_HOOK,FootprintOK,configCHECK_FOR_STACK_OVERFLOW,configRECORD_STACK_HIGH_ADDRESS,configGENERATE_RUN_TIME_STATS -RCC.AHBFreq_Value=64000000 -Mcu.Pin0=PC13 -SPI3.DataSize=SPI_DATASIZE_8BIT -Mcu.Pin1=PC14-OSC32_IN (PC14) -TIM8.IPParameters=Channel-Input_Capture2_from_TI2,ICPolarity_CH2,Prescaler,Period -GPIO.groupedBy=Group By Peripherals -Mcu.Pin2=PC15-OSC32_OUT (PC15) -Mcu.Pin3=PH0-OSC_IN (PH0) -Mcu.Pin4=PH1-OSC_OUT (PH1) -Mcu.Pin5=PC0 -ADC1.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_4 -PH1-OSC_OUT\ (PH1).Mode=HSE-External-Oscillator -RCC.HSE_VALUE=16000000 -FREERTOS.configUSE_TIMERS=1 +Mcu.PinsNb=58 +Mcu.ThirdPartyNb=0 +Mcu.UserConstants= +Mcu.UserName=STM32L476RGTx +MxCube.Version=6.0.1 +MxDb.Version=DB.6.0.0 +NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false -Mcu.IP10=TIM15 +NVIC.EXTI0_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true +NVIC.EXTI15_10_IRQn=true\:5\:0\:true\:false\:true\:false\:true\:true +NVIC.EXTI1_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true +NVIC.EXTI2_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true +NVIC.EXTI4_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true +NVIC.EXTI9_5_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true +NVIC.ForceEnableDMAVector=true +NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +NVIC.OTG_FS_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true +NVIC.PendSV_IRQn=true\:15\:0\:false\:false\:false\:true\:false\:false +NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 +NVIC.SavedPendsvIrqHandlerGenerated=true +NVIC.SavedSvcallIrqHandlerGenerated=true +NVIC.SavedSystickIrqHandlerGenerated=true +NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:false NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:false\:true\:true\:false -Mcu.IP12=USB_DEVICE -Mcu.IP11=USART1 -PB0.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING NVIC.TIM1_TRG_COM_TIM17_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true -Mcu.IP13=USB_OTG_FS -RCC.VCOInputFreq_Value=8000000 -TIM5.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 -PB5.Mode=TX_Only_Simplex_Unidirect_Master -File.Version=6 -PC13.GPIO_PuPd=GPIO_PULLDOWN -PB7.Signal=GPIO_Input -PB8.Locked=true -PB6.GPIOParameters=GPIO_Speed,GPIO_Label -PB0.Locked=true -FREERTOS.configTOTAL_HEAP_SIZE=40960 -VP_COMP1_VS_VREFINT12.Mode=VREFINT_12 -ProjectManager.ProjectName=cube -PB1.PinState=GPIO_PIN_SET -PB7.GPIO_Label=CC1101_G0 -PB4\ (NJTRST).Locked=true +NVIC.TIM8_CC_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true +NVIC.TimeBase=TIM1_TRG_COM_TIM17_IRQn +NVIC.TimeBaseIP=TIM17 +NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false +PA0.GPIOParameters=GPIO_Label +PA0.GPIO_Label=IR_RX +PA0.Locked=true +PA0.Signal=ADCx_IN5 +PA1.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI +PA1.GPIO_Label=BUTTON_DOWN +PA1.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING +PA1.GPIO_PuPd=GPIO_PULLDOWN +PA1.Locked=true +PA1.Signal=GPXTI1 +PA10.Locked=true +PA10.Mode=Asynchronous +PA10.Signal=USART1_RX +PA11.Locked=true +PA11.Mode=Device_Only +PA11.Signal=USB_OTG_FS_DM +PA12.Locked=true +PA12.Mode=Device_Only +PA12.Signal=USB_OTG_FS_DP +PA13\ (JTMS-SWDIO).GPIOParameters=GPIO_Label +PA13\ (JTMS-SWDIO).GPIO_Label=TMS +PA13\ (JTMS-SWDIO).Locked=true +PA13\ (JTMS-SWDIO).Mode=Serial_Wire +PA13\ (JTMS-SWDIO).Signal=SYS_JTMS-SWDIO +PA14\ (JTCK-SWCLK).GPIOParameters=GPIO_Label +PA14\ (JTCK-SWCLK).GPIO_Label=TCK +PA14\ (JTCK-SWCLK).Locked=true +PA14\ (JTCK-SWCLK).Mode=Serial_Wire +PA14\ (JTCK-SWCLK).Signal=SYS_JTCK-SWCLK +PA15\ (JTDI).GPIOParameters=PinState,GPIO_Label +PA15\ (JTDI).GPIO_Label=CC1101_CS +PA15\ (JTDI).Locked=true +PA15\ (JTDI).PinState=GPIO_PIN_SET +PA15\ (JTDI).Signal=GPIO_Output +PA2.GPIOParameters=GPIO_Label +PA2.GPIO_Label=DISPLAY_DI +PA2.Locked=true +PA2.Signal=GPIO_Output +PA3.GPIOParameters=GPIO_Label +PA3.GPIO_Label=SPEAKER +PA3.Locked=true +PA3.Signal=S_TIM5_CH4 +PA4.Locked=true +PA4.Signal=GPIO_Analog +PA5.Locked=true +PA5.Signal=GPIO_Analog +PA6.Locked=true PA6.Signal=GPIO_Analog PA7.Locked=true -PB15.GPIO_PuPd=GPIO_PULLDOWN -NVIC.OTG_FS_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true -ProjectManager.ToolChainLocation= -PA2.GPIO_Label=DISPLAY_DI -RCC.LSI_VALUE=32000 -SH.GPXTI0.0=GPIO_EXTI0 -USB_OTG_FS.VirtualMode=Device_Only -VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Signal=USB_DEVICE_VS_USB_DEVICE_CDC_FS -PC14-OSC32_IN\ (PC14).Locked=true -TIM8.Prescaler=64-1 -PC4.Locked=true -SPI3.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize,BaudRatePrescaler,CLKPolarity,CLKPhase -PC5.Signal=COMP1_INP -SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_16 -PA1.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING -PC2.GPIO_Label=CHRG +PA7.Signal=GPIO_Analog +PA8.GPIOParameters=GPIO_Speed,PinState,GPIO_Label,GPIO_ModeDefaultOutputPP +PA8.GPIO_Label=LED_RED +PA8.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD +PA8.GPIO_Speed=GPIO_SPEED_FREQ_HIGH +PA8.Locked=true PA8.PinState=GPIO_PIN_SET -PB15.Locked=true -PB3\ (JTDO-TRACESWO).Locked=true -RCC.PLLSAI1N=12 -PA3.Signal=S_TIM5_CH4 -PA2.Locked=true -RCC.MSI_VALUE=4000000 -RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE -PA14\ (JTCK-SWCLK).Mode=Serial_Wire -PB8.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI -PB9.GPIO_Label=BUTTON_OK -PA10.Mode=Asynchronous -PC9.GPIO_Label=SD_CS -ProjectManager.NoMain=false -SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize,BaudRatePrescaler,CLKPolarity,CLKPhase -USB_DEVICE.VirtualModeFS=Cdc_FS -NVIC.SavedSvcallIrqHandlerGenerated=true -PC11.Signal=SPI3_MISO -PC8.Signal=GPIO_Output -PC4.Signal=GPIO_Output -PC10.Mode=Full_Duplex_Master -ProjectManager.DefaultFWLocation=false -PC15-OSC32_OUT\ (PC15).Signal=RCC_OSC32_OUT -PB12.Locked=true -PA14\ (JTCK-SWCLK).GPIO_Label=TCK -ProjectManager.DeletePrevious=true -PB10.Locked=true -RCC.VCOSAI2OutputFreq_Value=64000000 -boardIOC=true -USB_DEVICE.IPParameters=VirtualMode,VirtualModeFS,CLASS_NAME_FS -RCC.FamilyName=M -PH1-OSC_OUT\ (PH1).Signal=RCC_OSC_OUT -PB9.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI -PC8.GPIO_Label=DISPLAY_CS -PC12.GPIOParameters=GPIO_PuPd -USART1.VirtualMode-Asynchronous=VM_ASYNC -FREERTOS.configUSE_IDLE_HOOK=1 +PA8.Signal=GPIO_Output +PA9.Locked=true PA9.Mode=Asynchronous -PB4\ (NJTRST).GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI -NVIC.TIM8_CC_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true -PB14.PinState=GPIO_PIN_SET -FREERTOS.configRECORD_STACK_HIGH_ADDRESS=1 -ProjectManager.TargetToolchain=Makefile -PB10.GPIO_Label=DISPLAY_RST -PB7.GPIOParameters=GPIO_Label -VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Mode=CDC_FS -PC5.GPIOParameters=GPIO_Label -PC2.Locked=true -ProjectManager.RegisterCallBack= -PC15-OSC32_OUT\ (PC15).Locked=true -RCC.USBFreq_Value=48000000 -TIM15.IPParameters=Channel-Output Compare1 CH1N -PB14.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD -PA1.Signal=GPXTI1 +PA9.Signal=USART1_TX +PB0.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI +PB0.GPIO_Label=BUTTON_UP +PB0.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING +PB0.GPIO_PuPd=GPIO_PULLDOWN +PB0.Locked=true +PB0.Signal=GPXTI0 +PB1.GPIOParameters=GPIO_Speed,PinState,GPIO_Label,GPIO_ModeDefaultOutputPP +PB1.GPIO_Label=LED_BLUE +PB1.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD +PB1.GPIO_Speed=GPIO_SPEED_FREQ_MEDIUM PB1.Locked=true -PB15.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING -PH1-OSC_OUT\ (PH1).Locked=true -board=NUCLEO-L476RG -SPI3.CLKPhase=SPI_PHASE_2EDGE -PC7.GPIO_Speed=GPIO_SPEED_FREQ_MEDIUM -RCC.VCOOutputFreq_Value=128000000 -NVIC.SavedSystickIrqHandlerGenerated=true -RCC.APB2Freq_Value=64000000 -RCC.UART4Freq_Value=64000000 -SPI3.CalculateBaudRate=1000.0 KBits/s -MxCube.Version=6.0.1 -PA13\ (JTMS-SWDIO).GPIO_Label=TMS -PC13.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI -RCC.PLLSAI1QoutputFreq_Value=48000000 -RCC.ADCFreq_Value=64000000 -SPI3.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_64 -VP_ADC1_Vref_Input.Signal=ADC1_Vref_Input -SH.S_TIM5_CH4.0=TIM5_CH4,PWM Generation4 CH4 -PC2.GPIO_PuPd=GPIO_PULLUP -RCC.UART5Freq_Value=64000000 +PB1.PinState=GPIO_PIN_SET +PB1.Signal=GPIO_Output +PB10.GPIOParameters=GPIO_Label +PB10.GPIO_Label=DISPLAY_RST +PB10.Locked=true +PB10.Signal=GPIO_Output +PB11.GPIOParameters=GPIO_Label +PB11.GPIO_Label=IR_TX +PB11.Locked=true +PB11.Signal=GPIO_Output +PB12.Locked=true +PB12.Signal=GPIO_Analog +PB13.GPIOParameters=GPIO_Label +PB13.GPIO_Label=RFID_OUT +PB13.Locked=true +PB13.Mode=Output Compare1 CH1N +PB13.Signal=TIM15_CH1N +PB14.GPIOParameters=GPIO_Speed,PinState,GPIO_Label,GPIO_ModeDefaultOutputPP +PB14.GPIO_Label=LED_GREEN +PB14.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_OD +PB14.GPIO_Speed=GPIO_SPEED_FREQ_MEDIUM +PB14.Locked=true +PB14.PinState=GPIO_PIN_SET +PB14.Signal=GPIO_Output PB15.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI -ADC1.NbrOfConversion=1 -PA15\ (JTDI).GPIO_Label=CC1101_CS -RCC.IPParameters=ADCCLockSelection,ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLM,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1N,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2RoutputFreq_Value,PLLSourceVirtual,PREFETCH_ENABLE,PWRFreq_Value,RNGFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value -ProjectManager.AskForMigrate=true -Mcu.Name=STM32L476R(C-E-G)Tx -NVIC.SavedPendsvIrqHandlerGenerated=true -PA2.Signal=GPIO_Output +PB15.GPIO_Label=RFID_PULL +PB15.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING +PB15.GPIO_PuPd=GPIO_PULLDOWN +PB15.Locked=true +PB15.Signal=GPXTI15 PB2.Locked=true -Mcu.IP8=TIM5 -VP_FREERTOS_VS_CMSIS_V2.Signal=FREERTOS_VS_CMSIS_V2 -Mcu.IP9=TIM8 -Mcu.IP6=SPI3 -Mcu.IP7=SYS -ProjectManager.CoupleFile=true -NVIC.EXTI0_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true -RCC.SYSCLKFreq_VALUE=64000000 -PA1.Locked=true -PA12.Mode=Device_Only -SH.GPXTI4.0=GPIO_EXTI4 -RCC.PLLSAI2PoutputFreq_Value=9142857.142857144 -KeepUserPlacement=false -TIM5.Prescaler=500 - 1 +PB2.Signal=GPIO_Analog +PB3\ (JTDO-TRACESWO).Locked=true +PB3\ (JTDO-TRACESWO).Mode=TX_Only_Simplex_Unidirect_Master +PB3\ (JTDO-TRACESWO).Signal=SPI1_SCK +PB4\ (NJTRST).GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI +PB4\ (NJTRST).GPIO_Label=BUTTON_LEFT +PB4\ (NJTRST).GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING +PB4\ (NJTRST).GPIO_PuPd=GPIO_PULLDOWN +PB4\ (NJTRST).Locked=true +PB4\ (NJTRST).Signal=GPXTI4 +PB5.Locked=true +PB5.Mode=TX_Only_Simplex_Unidirect_Master +PB5.Signal=SPI1_MOSI +PB6.GPIOParameters=GPIO_Speed,GPIO_Label +PB6.GPIO_Label=DISPLAY_BACKLIGHT +PB6.GPIO_Speed=GPIO_SPEED_FREQ_LOW +PB6.Locked=true +PB6.Signal=GPIO_Output +PB7.GPIOParameters=GPIO_Label +PB7.GPIO_Label=CC1101_G0 +PB7.Locked=true +PB7.Signal=GPIO_Input +PB8.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI +PB8.GPIO_Label=BUTTON_RIGHT +PB8.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING +PB8.GPIO_PuPd=GPIO_PULLDOWN +PB8.Locked=true +PB8.Signal=GPXTI8 +PB9.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI +PB9.GPIO_Label=BUTTON_OK +PB9.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING +PB9.GPIO_PuPd=GPIO_PULLDOWN +PB9.Locked=true +PB9.Signal=GPXTI9 +PC0.Locked=true +PC0.Signal=GPIO_Analog +PC1.Locked=true +PC1.Signal=GPIO_Analog +PC10.GPIOParameters=GPIO_PuPd +PC10.GPIO_PuPd=GPIO_PULLDOWN +PC10.Locked=true +PC10.Mode=Full_Duplex_Master +PC10.Signal=SPI3_SCK +PC11.GPIOParameters=GPIO_PuPd +PC11.GPIO_PuPd=GPIO_PULLDOWN +PC11.Locked=true +PC11.Mode=Full_Duplex_Master +PC11.Signal=SPI3_MISO +PC12.GPIOParameters=GPIO_PuPd +PC12.GPIO_PuPd=GPIO_PULLDOWN +PC12.Locked=true +PC12.Mode=Full_Duplex_Master +PC12.Signal=SPI3_MOSI +PC13.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI +PC13.GPIO_Label=BUTTON_BACK PC13.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING -PC5.GPIO_Label=RFID_RF_IN +PC13.GPIO_PuPd=GPIO_PULLDOWN +PC13.Locked=true +PC13.Signal=GPXTI13 +PC14-OSC32_IN\ (PC14).Locked=true +PC14-OSC32_IN\ (PC14).Mode=LSE-External-Oscillator PC14-OSC32_IN\ (PC14).Signal=RCC_OSC32_IN -SH.GPXTI9.ConfNb=1 -NVIC.EXTI9_5_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true -SH.GPXTI4.ConfNb=1 +PC15-OSC32_OUT\ (PC15).Locked=true +PC15-OSC32_OUT\ (PC15).Mode=LSE-External-Oscillator +PC15-OSC32_OUT\ (PC15).Signal=RCC_OSC32_OUT +PC2.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI +PC2.GPIO_Label=CHRG +PC2.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING +PC2.GPIO_PuPd=GPIO_PULLUP +PC2.Locked=true +PC2.Signal=GPXTI2 +PC3.GPIOParameters=GPIO_Label +PC3.GPIO_Label=BATT_V +PC3.Locked=true +PC3.Signal=ADCx_IN4 +PC4.GPIOParameters=PinState,GPIO_Label +PC4.GPIO_Label=NFC_CS +PC4.Locked=true +PC4.PinState=GPIO_PIN_SET +PC4.Signal=GPIO_Output +PC5.GPIOParameters=GPIO_Label +PC5.GPIO_Label=RFID_RF_IN +PC5.Mode=INP +PC5.Signal=COMP1_INP PC6.GPIOParameters=GPIO_Label +PC6.GPIO_Label=VIBRO +PC6.Locked=true +PC6.Signal=GPIO_Output +PC7.GPIOParameters=GPIO_ModeDefaultPP,GPIO_Speed,GPIO_PuPd,GPIO_Label +PC7.GPIO_Label=iButton +PC7.GPIO_ModeDefaultPP=GPIO_MODE_AF_OD +PC7.GPIO_PuPd=GPIO_NOPULL +PC7.GPIO_Speed=GPIO_SPEED_FREQ_MEDIUM +PC7.Locked=true +PC7.Signal=S_TIM8_CH2 +PC8.GPIOParameters=GPIO_Label +PC8.GPIO_Label=DISPLAY_CS +PC8.Locked=true +PC8.Signal=GPIO_Output +PC9.GPIOParameters=PinState,GPIO_Label +PC9.GPIO_Label=SD_CS +PC9.Locked=true +PC9.PinState=GPIO_PIN_SET +PC9.Signal=GPIO_Output +PD2.Locked=true +PD2.Signal=GPIO_Analog +PH0-OSC_IN\ (PH0).Locked=true +PH0-OSC_IN\ (PH0).Mode=HSE-External-Oscillator +PH0-OSC_IN\ (PH0).Signal=RCC_OSC_IN +PH1-OSC_OUT\ (PH1).Locked=true +PH1-OSC_OUT\ (PH1).Mode=HSE-External-Oscillator +PH1-OSC_OUT\ (PH1).Signal=RCC_OSC_OUT +PinOutPanel.RotationAngle=0 +ProjectManager.AskForMigrate=true +ProjectManager.BackupPrevious=false +ProjectManager.CompilerOptimize=6 +ProjectManager.ComputerToolchain=false +ProjectManager.CoupleFile=true +ProjectManager.CustomerFirmwarePackage=../../../lib/STM32CubeL4 +ProjectManager.DefaultFWLocation=false +ProjectManager.DeletePrevious=true +ProjectManager.DeviceId=STM32L476RGTx +ProjectManager.FirmwarePackage=STM32Cube FW_L4 V1.16.0 +ProjectManager.FreePins=false +ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_SPI1_Init-SPI1-false-HAL-true,4-MX_SPI3_Init-SPI3-false-HAL-true,5-MX_ADC1_Init-ADC1-false-HAL-true,6-MX_COMP1_Init-COMP1-false-HAL-true,7-MX_TIM5_Init-TIM5-false-HAL-true,8-MX_TIM15_Init-TIM15-false-HAL-true,9-MX_USART1_UART_Init-USART1-false-HAL-true,10-MX_USB_DEVICE_Init-USB_DEVICE-false-HAL-false,11-MX_TIM8_Init-TIM8-false-HAL-true +ProjectManager.HalAssertFull=false +ProjectManager.HeapSize=0x200 +ProjectManager.KeepUserCode=true +ProjectManager.LastFirmware=true +ProjectManager.LibraryCopy=2 +ProjectManager.MainLocation=Src +ProjectManager.NoMain=false +ProjectManager.PreviousToolchain= +ProjectManager.ProjectBuild=false +ProjectManager.ProjectFileName=cube.ioc +ProjectManager.ProjectName=cube +ProjectManager.RegisterCallBack= +ProjectManager.StackSize=0x400 +ProjectManager.TargetToolchain=Makefile +ProjectManager.ToolChainLocation= +ProjectManager.UnderRoot=false +RCC.ADCCLockSelection=RCC_ADCCLKSOURCE_SYSCLK +RCC.ADCFreq_Value=64000000 +RCC.AHBFreq_Value=64000000 +RCC.APB1Freq_Value=64000000 +RCC.APB1TimFreq_Value=64000000 +RCC.APB2Freq_Value=64000000 +RCC.APB2TimFreq_Value=64000000 +RCC.CortexFreq_Value=64000000 +RCC.DFSDMFreq_Value=64000000 +RCC.FamilyName=M +RCC.FCLKCortexFreq_Value=64000000 +RCC.HCLKFreq_Value=64000000 +RCC.HSE_VALUE=16000000 RCC.HSI_VALUE=16000000 -ADC1.NbrOfConversionFlag=1 -SH.GPXTI15.0=GPIO_EXTI15 +RCC.I2C1Freq_Value=64000000 +RCC.I2C2Freq_Value=64000000 +RCC.I2C3Freq_Value=64000000 +RCC.IPParameters=ADCCLockSelection,ADCFreq_Value,AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,DFSDMFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LSCOPinFreq_Value,LSI_VALUE,MCO1PinFreq_Value,MSI_VALUE,PLLM,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSAI1N,PLLSAI1PoutputFreq_Value,PLLSAI1QoutputFreq_Value,PLLSAI1RoutputFreq_Value,PLLSAI2PoutputFreq_Value,PLLSAI2RoutputFreq_Value,PLLSourceVirtual,PREFETCH_ENABLE,PWRFreq_Value,RNGFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,UART4Freq_Value,UART5Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAI1OutputFreq_Value,VCOSAI2OutputFreq_Value +RCC.LPTIM1Freq_Value=64000000 +RCC.LPTIM2Freq_Value=64000000 +RCC.LPUART1Freq_Value=64000000 +RCC.LSCOPinFreq_Value=32000 +RCC.LSI_VALUE=32000 +RCC.MCO1PinFreq_Value=64000000 +RCC.MSI_VALUE=4000000 RCC.PLLM=2 RCC.PLLN=16 -TIM8.Channel-Input_Capture2_from_TI2=TIM_CHANNEL_2 -PB7.Locked=true -PB8.Signal=GPXTI8 -PC8.Locked=true -TIM5.Period=291 -PC9.Signal=GPIO_Output -PA15\ (JTDI).Locked=true -RCC.APB1Freq_Value=64000000 -USB_DEVICE.VirtualMode=Cdc -PB11.Locked=true -ProjectManager.DeviceId=STM32L476RGTx +RCC.PLLPoutputFreq_Value=18285714.285714287 +RCC.PLLQoutputFreq_Value=64000000 +RCC.PLLRCLKFreq_Value=64000000 +RCC.PLLSAI1N=12 +RCC.PLLSAI1PoutputFreq_Value=13714285.714285715 +RCC.PLLSAI1QoutputFreq_Value=48000000 +RCC.PLLSAI1RoutputFreq_Value=48000000 +RCC.PLLSAI2PoutputFreq_Value=9142857.142857144 +RCC.PLLSAI2RoutputFreq_Value=32000000 +RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE +RCC.PREFETCH_ENABLE=1 +RCC.PWRFreq_Value=64000000 +RCC.RNGFreq_Value=48000000 +RCC.SAI1Freq_Value=13714285.714285715 +RCC.SAI2Freq_Value=13714285.714285715 +RCC.SDMMCFreq_Value=48000000 +RCC.SWPMI1Freq_Value=64000000 +RCC.SYSCLKFreq_VALUE=64000000 +RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK +RCC.UART4Freq_Value=64000000 +RCC.UART5Freq_Value=64000000 +RCC.USART1Freq_Value=64000000 +RCC.USART2Freq_Value=64000000 +RCC.USART3Freq_Value=64000000 +RCC.USBFreq_Value=48000000 +RCC.VCOInputFreq_Value=8000000 +RCC.VCOOutputFreq_Value=128000000 +RCC.VCOSAI1OutputFreq_Value=96000000 +RCC.VCOSAI2OutputFreq_Value=64000000 +SH.ADCx_IN4.0=ADC1_IN4,IN4-Single-Ended +SH.ADCx_IN4.ConfNb=1 +SH.ADCx_IN5.0=ADC1_IN5,IN5-Single-Ended +SH.ADCx_IN5.ConfNb=1 +SH.GPXTI0.0=GPIO_EXTI0 +SH.GPXTI0.ConfNb=1 +SH.GPXTI1.0=GPIO_EXTI1 +SH.GPXTI1.ConfNb=1 +SH.GPXTI13.0=GPIO_EXTI13 +SH.GPXTI13.ConfNb=1 +SH.GPXTI15.0=GPIO_EXTI15 +SH.GPXTI15.ConfNb=1 +SH.GPXTI2.0=GPIO_EXTI2 +SH.GPXTI2.ConfNb=1 +SH.GPXTI4.0=GPIO_EXTI4 +SH.GPXTI4.ConfNb=1 +SH.GPXTI8.0=GPIO_EXTI8 +SH.GPXTI8.ConfNb=1 +SH.GPXTI9.0=GPIO_EXTI9 +SH.GPXTI9.ConfNb=1 +SH.S_TIM5_CH4.0=TIM5_CH4,PWM Generation4 CH4 +SH.S_TIM5_CH4.ConfNb=1 +SH.S_TIM8_CH2.0=TIM8_CH2,Input_Capture2_from_TI2 SH.S_TIM8_CH2.ConfNb=1 -PB12.Signal=GPIO_Analog -ProjectManager.LibraryCopy=2 -PB0.GPIO_PuPd=GPIO_PULLDOWN -PA3.GPIO_Label=SPEAKER -PB1.GPIOParameters=GPIO_Speed,PinState,GPIO_Label,GPIO_ModeDefaultOutputPP -PA7.Signal=GPIO_Analog -PB4\ (NJTRST).Signal=GPXTI4 -PA6.Locked=true +SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_16 +SPI1.CalculateBaudRate=4.0 MBits/s +SPI1.CLKPhase=SPI_PHASE_1EDGE +SPI1.CLKPolarity=SPI_POLARITY_LOW +SPI1.DataSize=SPI_DATASIZE_8BIT +SPI1.Direction=SPI_DIRECTION_2LINES +SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize,BaudRatePrescaler,CLKPolarity,CLKPhase +SPI1.Mode=SPI_MODE_MASTER +SPI1.VirtualType=VM_MASTER +SPI3.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_64 +SPI3.CalculateBaudRate=1000.0 KBits/s +SPI3.CLKPhase=SPI_PHASE_2EDGE +SPI3.CLKPolarity=SPI_POLARITY_LOW +SPI3.DataSize=SPI_DATASIZE_8BIT +SPI3.Direction=SPI_DIRECTION_2LINES +SPI3.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize,BaudRatePrescaler,CLKPolarity,CLKPhase +SPI3.Mode=SPI_MODE_MASTER +SPI3.VirtualType=VM_MASTER +TIM15.Channel-Output\ Compare1\ CH1N=TIM_CHANNEL_1 +TIM15.IPParameters=Channel-Output Compare1 CH1N +TIM5.Channel-PWM\ Generation4\ CH4=TIM_CHANNEL_4 +TIM5.IPParameters=Prescaler,Period,Channel-PWM Generation4 CH4,Pulse-PWM Generation4 CH4 +TIM5.Period=291 +TIM5.Prescaler=500 - 1 +TIM5.Pulse-PWM\ Generation4\ CH4=145 +TIM8.Channel-Input_Capture2_from_TI2=TIM_CHANNEL_2 +TIM8.ICPolarity_CH2=TIM_INPUTCHANNELPOLARITY_BOTHEDGE +TIM8.IPParameters=Channel-Input_Capture2_from_TI2,ICPolarity_CH2,Prescaler,Period +TIM8.Period=32768-1 +TIM8.Prescaler=64-1 +USART1.IPParameters=VirtualMode-Asynchronous +USART1.VirtualMode-Asynchronous=VM_ASYNC +USB_DEVICE.CLASS_NAME_FS=CDC +USB_DEVICE.IPParameters=VirtualMode,VirtualModeFS,CLASS_NAME_FS +USB_DEVICE.VirtualMode=Cdc +USB_DEVICE.VirtualModeFS=Cdc_FS +USB_OTG_FS.IPParameters=VirtualMode +USB_OTG_FS.VirtualMode=Device_Only +VP_ADC1_TempSens_Input.Mode=IN-TempSens +VP_ADC1_TempSens_Input.Signal=ADC1_TempSens_Input +VP_ADC1_Vref_Input.Mode=IN-Vrefint +VP_ADC1_Vref_Input.Signal=ADC1_Vref_Input +VP_COMP1_VS_VREFINT12.Mode=VREFINT_12 +VP_COMP1_VS_VREFINT12.Signal=COMP1_VS_VREFINT12 +VP_FREERTOS_VS_CMSIS_V2.Mode=CMSIS_V2 +VP_FREERTOS_VS_CMSIS_V2.Signal=FREERTOS_VS_CMSIS_V2 +VP_SYS_VS_tim17.Mode=TIM17 +VP_SYS_VS_tim17.Signal=SYS_VS_tim17 +VP_TIM8_VS_ClockSourceINT.Mode=Internal +VP_TIM8_VS_ClockSourceINT.Signal=TIM8_VS_ClockSourceINT +VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Mode=CDC_FS +VP_USB_DEVICE_VS_USB_DEVICE_CDC_FS.Signal=USB_DEVICE_VS_USB_DEVICE_CDC_FS diff --git a/firmware/targets/f2/target.mk b/firmware/targets/f2/target.mk index 2359df93..e10c4013 100644 --- a/firmware/targets/f2/target.mk +++ b/firmware/targets/f2/target.mk @@ -1,5 +1,7 @@ TOOLCHAIN = arm +DEBUG_AGENT = set -m; st-util -n --semihosting + BOOT_ADDRESS = 0x08000000 FW_ADDRESS = 0x08008000 OS_OFFSET = 0x00008000 diff --git a/firmware/targets/local/api-hal/api-hal-resources.h b/firmware/targets/local/api-hal/api-hal-resources.h new file mode 100644 index 00000000..e69de29b diff --git a/lib/ST25RFAL002/doc/_htmresc/st_logo.png b/lib/ST25RFAL002/doc/_htmresc/st_logo.png index 068f0346..8b80057f 100755 Binary files a/lib/ST25RFAL002/doc/_htmresc/st_logo.png and b/lib/ST25RFAL002/doc/_htmresc/st_logo.png differ diff --git a/lib/ST25RFAL002/platform.c b/lib/ST25RFAL002/platform.c index 49126b8f..aa0e235f 100644 --- a/lib/ST25RFAL002/platform.c +++ b/lib/ST25RFAL002/platform.c @@ -1,14 +1,16 @@ #include "platform.h" #include +#include +#include HAL_StatusTypeDef platformSpiTxRx(const uint8_t *txBuf, uint8_t *rxBuf, uint16_t len) { HAL_StatusTypeDef ret; if (txBuf && rxBuf) { - ret = HAL_SPI_TransmitReceive(&hspi3, (uint8_t*)txBuf, rxBuf, len, HAL_MAX_DELAY); + ret = HAL_SPI_TransmitReceive(&SPI_R, (uint8_t*)txBuf, rxBuf, len, HAL_MAX_DELAY); } else if (txBuf) { - ret = HAL_SPI_Transmit(&hspi3, (uint8_t*)txBuf, len, HAL_MAX_DELAY); + ret = HAL_SPI_Transmit(&SPI_R, (uint8_t*)txBuf, len, HAL_MAX_DELAY); } else if (rxBuf) { - ret = HAL_SPI_Receive(&hspi3, (uint8_t*)rxBuf, len, HAL_MAX_DELAY); + ret = HAL_SPI_Receive(&SPI_R, (uint8_t*)rxBuf, len, HAL_MAX_DELAY); } if(ret != HAL_OK) { @@ -20,27 +22,7 @@ HAL_StatusTypeDef platformSpiTxRx(const uint8_t *txBuf, uint8_t *rxBuf, uint16_t void platformProtectST25RComm() { - if (HAL_SPI_DeInit(&hspi3) != HAL_OK) { - Error_Handler(); - } - - hspi3.Init.Mode = SPI_MODE_MASTER; - hspi3.Init.Direction = SPI_DIRECTION_2LINES; - hspi3.Init.DataSize = SPI_DATASIZE_8BIT; - hspi3.Init.CLKPolarity = SPI_POLARITY_LOW; - hspi3.Init.CLKPhase = SPI_PHASE_2EDGE; - hspi3.Init.NSS = SPI_NSS_SOFT; - hspi3.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_64; - hspi3.Init.FirstBit = SPI_FIRSTBIT_MSB; - hspi3.Init.TIMode = SPI_TIMODE_DISABLE; - hspi3.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; - hspi3.Init.CRCPolynomial = 7; - hspi3.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE; - hspi3.Init.NSSPMode = SPI_NSS_PULSE_DISABLE; - - if (HAL_SPI_Init(&hspi3) != HAL_OK) { - Error_Handler(); - } + NFC_SPI_Reconfigure(); } void platformUnprotectST25RComm() diff --git a/lib/ST25RFAL002/platform.h b/lib/ST25RFAL002/platform.h index 119eb225..6db86393 100644 --- a/lib/ST25RFAL002/platform.h +++ b/lib/ST25RFAL002/platform.h @@ -5,7 +5,7 @@ #include #include #include -#include "stm32l4xx_hal.h" +#include #include "timer.h" #include "math.h" #include "spi.h" @@ -18,8 +18,8 @@ void platformUnprotectST25RComm(); #define ST25R_SS_PIN NFC_CS_Pin #define ST25R_SS_PORT NFC_CS_GPIO_Port -#define ST25R_INT_PIN RFID_PULL_Pin -#define ST25R_INT_PORT RFID_PULL_GPIO_Port +#define ST25R_INT_PIN NFC_IRQ_Pin +#define ST25R_INT_PORT NFC_IRQ_GPIO_Port #define RFAL_FEATURE_LISTEN_MODE true /*!< Enable/Disable RFAL support for Listen Mode */ #define RFAL_FEATURE_WAKEUP_MODE true /*!< Enable/Disable RFAL support for the Wake-Up mode */ diff --git a/make/base.mk b/make/base.mk index 332671fb..60df6840 100644 --- a/make/base.mk +++ b/make/base.mk @@ -2,4 +2,9 @@ OBJ_DIR = .obj ASM_SOURCES = C_SOURCES = CPP_SOURCES = -ASSETS = \ No newline at end of file +ASSETS = +DEBUG_AGENT = + +CFLAGS = +CPPFLAGS = +LDFLAGS = \ No newline at end of file diff --git a/make/rules.mk b/make/rules.mk index a018ec80..c5b229d6 100644 --- a/make/rules.mk +++ b/make/rules.mk @@ -11,7 +11,7 @@ OBJECTS += $(addprefix $(OBJ_DIR)/, $(notdir $(CPP_SOURCES:.cpp=.o))) # Generate dependencies DEPS = $(OBJECTS:.o=.d) -$(shell mkdir -p $(OBJ_DIR)) +$(shell test -d $(OBJ_DIR) || mkdir -p $(OBJ_DIR)) BUILD_FLAGS_SHELL=\ echo "$(CFLAGS)" > $(OBJ_DIR)/BUILD_FLAGS.tmp; \ @@ -71,14 +71,27 @@ flash: $(OBJ_DIR)/flash upload: $(OBJ_DIR)/upload debug: flash - set -m; st-util -n --semihosting & echo $$! > $(OBJ_DIR)/st-util.PID + $(DEBUG_AGENT) & echo $$! > $(OBJ_DIR)/agent.PID arm-none-eabi-gdb \ -ex "target extended-remote 127.0.0.1:4242" \ -ex "set confirm off" \ -ex "source ../debug/FreeRTOS/FreeRTOS.py" \ $(OBJ_DIR)/$(PROJECT).elf; \ - kill `cat $(OBJ_DIR)/st-util.PID`; \ - rm $(OBJ_DIR)/st-util.PID + kill `cat $(OBJ_DIR)/agent.PID`; \ + rm $(OBJ_DIR)/agent.PID + +bm_debug: flash + set -m; blackmagic & echo $$! > $(OBJ_DIR)/agent.PID + arm-none-eabi-gdb \ + -ex "target extended-remote 127.0.0.1:2000" \ + -ex "set confirm off" \ + -ex "monitor debug_bmp enable"\ + -ex "monitor swdp_scan"\ + -ex "attach 1"\ + -ex "source ../debug/FreeRTOS/FreeRTOS.py" \ + $(OBJ_DIR)/$(PROJECT).elf; \ + kill `cat $(OBJ_DIR)/agent.PID`; \ + rm $(OBJ_DIR)/agent.PID clean: @echo "\tCLEAN\t" @@ -95,6 +108,7 @@ zzz: clean $(MAKE) debug FORMAT_SOURCES := $(shell find ../applications -iname "*.h" -o -iname "*.c" -o -iname "*.cpp") +FORMAT_SOURCES += $(shell find ../bootloader -iname "*.h" -o -iname "*.c" -o -iname "*.cpp") FORMAT_SOURCES += $(shell find ../core -iname "*.h" -o -iname "*.c" -o -iname "*.cpp") format: diff --git a/make/toolchain.mk b/make/toolchain.mk index ef660c0e..84e113b9 100644 --- a/make/toolchain.mk +++ b/make/toolchain.mk @@ -21,6 +21,6 @@ else CFLAGS += -DNDEBUG -Os endif -CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" -CPPFLAGS = -fno-threadsafe-statics -LDFLAGS += -Wl,-Map=$(OBJ_DIR)/$(PROJECT).map,--cref -Wl,--gc-sections -Wl,--undefined=uxTopUsedPriority +CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" +CPPFLAGS += -fno-threadsafe-statics +LDFLAGS += -Wl,-Map=$(OBJ_DIR)/$(PROJECT).map,--cref -Wl,--gc-sections -Wl,--undefined=uxTopUsedPriority