/C-OSD/trunk/spi.h |
---|
22,19 → 22,19 |
* structs 'n union for easy SPI transfer |
*/ |
typedef struct { |
int16_t ampere; |
int32_t mah; |
int16_t volt; |
int16_t ampere; |
int32_t mah; |
int16_t volt; |
} __attribute__((packed)) SPI_strom_data_t; |
typedef struct { |
uint8_t c[10]; |
uint8_t chk; |
uint8_t c[10]; |
uint8_t chk; |
} __attribute__((packed)) SPI_char_buffer_t; |
union SPI_buffer_t { |
SPI_strom_data_t data; |
SPI_char_buffer_t buffer; |
SPI_strom_data_t data; |
SPI_char_buffer_t buffer; |
}; |
volatile union SPI_buffer_t SPI_buffer; |