Skip to content

Commit

Permalink
Added struct definition
Browse files Browse the repository at this point in the history
  • Loading branch information
kodarn committed Apr 20, 2018
1 parent 0cc1c17 commit df0d62e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,20 @@ Now that we understand the assembly code, we can rewrite it in in C:
/*----------------------------------------------------------------------------
* Function argument container
*----------------------------------------------------------------------------*/
typedef struct SpiPkt
{
uint8_t LengthField;
uint8_t AddressField;
uint8_t Cnt;
uint16_t Status;
uint32_t FixedSerial; // XOR'ed data
uint16_t PCnt; // XOR'ed data
uint16_t AvgTime; // XOR'ed data
uint32_t PulseCnt; // XOR'ed data
uint8_t Power; // XOR'ed data
uint16_t Crc16;
} SpiPkt;

typedef struct Ctx
{
uint32_t FixedSerial;
Expand Down

0 comments on commit df0d62e

Please sign in to comment.