-
Notifications
You must be signed in to change notification settings - Fork 0
SPI Packet
Johan Söderlind Åström edited this page Nov 20, 2017
·
1 revision
Name | Size (bits) | Description |
---|---|---|
First bit | 1 | Should be zero |
TTT Segment number | 3 | Segment number when packet number is 20. If packet number is not 20 then ignore it. |
Packet Number | 12 | The packet number |
Checksum | 16 | CRC16, CCITT, seed=0, final=0 |
Payload | 8*160 | Line of pixels values |
#define Lepton_Height 60
#define Lepton_Width 80
#define Lepton_Packet_Payload_Size 160
struct __attribute__((__packed__)) Lepton_Packet
{
//FTTT NNNN
//NNNN can be ignored because those bits would make packet number too large
uint8_t Reserved;
//NNNN NNNN
//Can be between 0 .. Lepton_Height
uint8_t Number;
//CRC16, CCITT, seed=0, final=0, FTTT = 0, Checksum = 0
uint16_t Checksum;
union
{
uint8_t Payload [Lepton_Packet_Payload_Size];
uint16_t Line [Lepton_Width];
};
};