flipperzero-firmware/firmware/targets/f4/api-hal/api-hal-resources.c

23 lines
846 B
C
Raw Normal View History

Firmware, Bootloader: add f3 target. (#215) * Firmware, Bootloader: add f3 target. Refactor code to be portable across targets. * Firmware: remove bkpt * Makefile: debug agent. Debug: f3 platform throw openocd. * freertos-openocd helper * separate hal resources * return of input_dump app * using hew target resources abstration layer for backlight and blink * dirty hack for input driver, f3 has no charging pin * worked input interrupts * working display * F3: switch to 32mHz resonator * F3: configure SD_CS pin * NFC: port to F3. * fat uart app * sd card hal api * separate CC1101 spi config * faster spi gpio for sd card * Assets: disable LFS * Cube: disable css on LSE * Input: format code * Make: add bootloader source code to formatting rule * F3: enable rf by default, adjust clock settings, map all pins where they should be. * libs for coreglitch_demo_0 * nvic priority * bus clocks all to 64 * lf-rfid timer and pin * irda * ir rx setup * tim2 irq handler * Makefile: environment aware mkdir * Makefile, Irukagotchi: commit seq number. * split falling and rising ir rx events * Makefile: proper git branch detect on old git. Firmware: api fix. * fix irda * Makefile,Irukagotchi: date timestamp. * NFC: adjust SPI speed * Irukagotchi: format code * Make: add blackmagic debug in host mode * Makefile: detach blackmagic from terminal signals * Makefile,Irukagotchi: stamp target * add F3 bootloader/firmware to CI Co-authored-by: Aleksandr Kutuzov <aku@plooks.com> Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com> Co-authored-by: aanper <mail@s3f.ru>
2020-11-06 10:52:50 +00:00
#include "main.h"
#include "flipper_v2.h"
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},
};
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};
const GpioPin sd_cs_gpio = {SD_CS_GPIO_Port, SD_CS_Pin};
const GpioPin vibro_gpio = {VIBRO_GPIO_Port, VIBRO_Pin};
2020-11-16 21:39:48 +00:00
const GpioPin ibutton_gpio = {iBTN_GPIO_Port, iBTN_Pin};
const GpioPin cc1101_g0_gpio = {CC1101_G0_GPIO_Port, CC1101_G0_Pin};