#ifndef _MX_SPI_H
#define _MX_SPI_H
#include "at32a423.h"
#include "main.h"
typedef struct
{
	uint8_t 							: 2;
	uint8_t	message_type 	: 2;
	uint8_t device_id 		: 4;
	uint8_t data[AX_NUM*AY_NUM];
	uint8_t error_flag;
	uint8_t check_sum;
}mx_spi_frame_struct;

void mx_spi_init(void);
void update_spi_data(uint8_t *sensor_data,uint16_t sensor_data_len);
void updata_spi_dma(void);
#endif

