furi_hal_spi_config.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. #include <furi_hal_spi_types.h>
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /** Preset for ST25R916 */
  7. extern const LL_SPI_InitTypeDef furi_hal_spi_preset_2edge_low_8m;
  8. /** Preset for CC1101 */
  9. extern const LL_SPI_InitTypeDef furi_hal_spi_preset_1edge_low_8m;
  10. /** Preset for ST7567 (Display) */
  11. extern const LL_SPI_InitTypeDef furi_hal_spi_preset_1edge_low_4m;
  12. /** Preset for SdCard in fast mode */
  13. extern const LL_SPI_InitTypeDef furi_hal_spi_preset_1edge_low_16m;
  14. /** Preset for SdCard in slow mode */
  15. extern const LL_SPI_InitTypeDef furi_hal_spi_preset_1edge_low_2m;
  16. /** Furi Hal Spi Bus R (Radio: CC1101, Nfc, External)*/
  17. extern FuriHalSpiBus furi_hal_spi_bus_r;
  18. /** Furi Hal Spi Bus D (Display, SdCard) */
  19. extern FuriHalSpiBus furi_hal_spi_bus_d;
  20. /** CC1101 on `furi_hal_spi_bus_r` */
  21. extern FuriHalSpiBusHandle furi_hal_spi_bus_handle_subghz;
  22. /** ST25R3916 on `furi_hal_spi_bus_r` */
  23. extern FuriHalSpiBusHandle furi_hal_spi_bus_handle_nfc;
  24. /** External on `furi_hal_spi_bus_r`
  25. * Preset: `furi_hal_spi_preset_1edge_low_2m`
  26. *
  27. * miso: pa6
  28. * mosi: pa7
  29. * sck: pb3
  30. * cs: pa4 (software controlled)
  31. *
  32. * @warning not initialized by default, call `furi_hal_spi_bus_handle_init` to initialize
  33. * Bus pins are floating on inactive state, CS high after initialization
  34. *
  35. */
  36. extern FuriHalSpiBusHandle furi_hal_spi_bus_handle_external;
  37. /** ST7567(Display) on `furi_hal_spi_bus_d` */
  38. extern FuriHalSpiBusHandle furi_hal_spi_bus_handle_display;
  39. /** SdCard in fast mode on `furi_hal_spi_bus_d` */
  40. extern FuriHalSpiBusHandle furi_hal_spi_bus_handle_sd_fast;
  41. /** SdCard in slow mode on `furi_hal_spi_bus_d` */
  42. extern FuriHalSpiBusHandle furi_hal_spi_bus_handle_sd_slow;
  43. #ifdef __cplusplus
  44. }
  45. #endif