Rev 728 | Rev 762 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 728 | Rev 761 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | 20 | ||
21 | /* |
21 | /* |
22 | * structs 'n union for easy SPI transfer |
22 | * structs 'n union for easy SPI transfer |
23 | */ |
23 | */ |
24 | typedef struct { |
24 | typedef struct { |
25 | int16_t ampere; |
25 | int16_t ampere; |
26 | int32_t mah; |
26 | int32_t mah; |
27 | int16_t volt; |
27 | int16_t volt; |
Line 28... | Line 28... | ||
28 | } __attribute__((packed)) SPI_strom_data_t; |
28 | } __attribute__((packed)) SPI_strom_data_t; |
29 | 29 | ||
30 | typedef struct { |
30 | typedef struct { |
31 | uint8_t c[10]; |
31 | uint8_t c[10]; |
Line 32... | Line 32... | ||
32 | uint8_t chk; |
32 | uint8_t chk; |
33 | } __attribute__((packed)) SPI_char_buffer_t; |
33 | } __attribute__((packed)) SPI_char_buffer_t; |
34 | 34 | ||
35 | union SPI_buffer_t { |
35 | union SPI_buffer_t { |
Line 36... | Line 36... | ||
36 | SPI_strom_data_t data; |
36 | SPI_strom_data_t data; |
Line 37... | Line 37... | ||
37 | SPI_char_buffer_t buffer; |
37 | SPI_char_buffer_t buffer; |