12 lines
288 B
C
12 lines
288 B
C
#ifndef _BSP_SPI_H
|
|
#define _BSP_SPI_H
|
|
#include "at32a423.h"
|
|
|
|
#define SPI_SLAVE_CS_READ() gpio_input_data_bit_read(GPIOA, GPIO_PINS_4)
|
|
|
|
void spi1_init(uint8_t *buffer, uint16_t buffer_size);
|
|
uint8_t spi_tx_rx_buffer(uint8_t *tx_buffer, uint8_t *rx_buffer, uint16_t buffer_len);
|
|
|
|
#endif
|
|
|