1
0

small refactor

- put unions on main for usage on several file
- add DATA_IND on sender
This commit is contained in:
2024-04-21 09:19:11 +02:00
parent b93c51f369
commit bbec23752f
3 changed files with 89 additions and 21 deletions

21
main.h
View File

@@ -118,3 +118,24 @@ struct queueMsg_t
uint8_t addr; ///< the source or destination address
uint8_t sapi; ///< the source or destination SAPI
};
//--------------------------------------------------------------------------------
// The mac control union
//--------------------------------------------------------------------------------
typedef union {
struct {
uint8_t sapi: 3; // MSB
uint8_t addr: 4;
uint8_t nothing: 1; // LSB
};
uint8_t raw;
} Adresse;
typedef union {
struct {
uint8_t ack: 1; // MSB
uint8_t read: 1;
uint8_t checksum: 6; // LSB
};
uint8_t raw;
} Status;