1
0
Fork 0

spi_master Kinetis support (#13098)

This commit is contained in:
Ryan 2021-06-08 19:54:33 +10:00 committed by GitHub
parent 13defb0bef
commit 17d0fad762
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 78 additions and 11 deletions

View file

@ -21,6 +21,7 @@
#include <stdbool.h>
#include "gpio.h"
#include "chibios_config.h"
#ifndef SPI_DRIVER
# define SPI_DRIVER SPID2
@ -31,7 +32,11 @@
#endif
#ifndef SPI_SCK_PAL_MODE
# define SPI_SCK_PAL_MODE 5
# if defined(USE_GPIOV1)
# define SPI_SCK_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
# else
# define SPI_SCK_PAL_MODE 5
# endif
#endif
#ifndef SPI_MOSI_PIN
@ -39,7 +44,11 @@
#endif
#ifndef SPI_MOSI_PAL_MODE
# define SPI_MOSI_PAL_MODE 5
# if defined(USE_GPIOV1)
# define SPI_MOSI_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
# else
# define SPI_MOSI_PAL_MODE 5
# endif
#endif
#ifndef SPI_MISO_PIN
@ -47,7 +56,11 @@
#endif
#ifndef SPI_MISO_PAL_MODE
# define SPI_MISO_PAL_MODE 5
# if defined(USE_GPIOV1)
# define SPI_MISO_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL
# else
# define SPI_MISO_PAL_MODE 5
# endif
#endif
typedef int16_t spi_status_t;