mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-13 06:32:26 +00:00
8073992925
* RFID: pull antenna down when emulating * Rfid: fixed HID emulation by adding zero pulse every 4 bits * Rfid: HID emulation fixed with DSP based FSK oscillator. * Rfid: receive 125KHz clock for emulation timer from antenna and comparator * Rfid: commented unused variable * Firmware: rollback changes in f6. * Add F7 target based on F6. * F7/F6: update cube projects, apply changes to the targets, update linker scripts with correct RAM start values. * FuriHal: RFID init routine. * Scripts: update OTP tool for v11 board Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
63 lines
No EOL
1.7 KiB
C
63 lines
No EOL
1.7 KiB
C
#pragma once
|
|
|
|
#include <furi-hal-gpio.h>
|
|
#include <stm32wbxx_ll_spi.h>
|
|
#include <cmsis_os2.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
extern const LL_SPI_InitTypeDef furi_hal_spi_config_nfc;
|
|
extern const LL_SPI_InitTypeDef furi_hal_spi_config_subghz;
|
|
extern const LL_SPI_InitTypeDef furi_hal_spi_config_display;
|
|
extern const LL_SPI_InitTypeDef furi_hal_spi_config_sd_fast;
|
|
extern const LL_SPI_InitTypeDef furi_hal_spi_config_sd_slow;
|
|
|
|
/** FURI HAL SPI BUS handler
|
|
* Structure content may change at some point
|
|
*/
|
|
typedef struct {
|
|
const SPI_TypeDef* spi;
|
|
const osMutexId_t* mutex;
|
|
const GpioPin* miso;
|
|
const GpioPin* mosi;
|
|
const GpioPin* clk;
|
|
} FuriHalSpiBus;
|
|
|
|
/** FURI HAL SPI Device handler
|
|
* Structure content may change at some point
|
|
*/
|
|
typedef struct {
|
|
const FuriHalSpiBus* bus;
|
|
const LL_SPI_InitTypeDef* config;
|
|
const GpioPin* chip_select;
|
|
} FuriHalSpiDevice;
|
|
|
|
/** FURI HAL SPI Standard Device IDs */
|
|
typedef enum {
|
|
FuriHalSpiDeviceIdSubGhz, /** SubGhz: CC1101, non-standard SPI usage */
|
|
FuriHalSpiDeviceIdDisplay, /** Display: ERC12864, only have MOSI */
|
|
FuriHalSpiDeviceIdSdCardFast, /** SDCARD: fast mode, after initialization */
|
|
FuriHalSpiDeviceIdSdCardSlow, /** SDCARD: slow mode, before initialization */
|
|
FuriHalSpiDeviceIdNfc, /** NFC: ST25R3916, pretty standard, but RFAL makes it complex */
|
|
|
|
FuriHalSpiDeviceIdMax, /** Service Value, do not use */
|
|
} FuriHalSpiDeviceId;
|
|
|
|
/** Furi Hal Spi Bus R
|
|
* CC1101, Nfc
|
|
*/
|
|
extern const FuriHalSpiBus spi_r;
|
|
|
|
/** Furi Hal Spi Bus D
|
|
* Display, SdCard
|
|
*/
|
|
extern const FuriHalSpiBus spi_d;
|
|
|
|
/** Furi Hal Spi devices */
|
|
extern const FuriHalSpiDevice furi_hal_spi_devices[FuriHalSpiDeviceIdMax];
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |