mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Improved structure alignments
This commit is contained in:
parent
b1ec3d04f2
commit
0ddc4540cd
4 changed files with 7 additions and 18 deletions
|
@ -124,10 +124,10 @@ typedef struct flightLogEvent_flightMode_s { // New Event Data type
|
||||||
} flightLogEvent_flightMode_t;
|
} flightLogEvent_flightMode_t;
|
||||||
|
|
||||||
typedef struct flightLogEvent_inflightAdjustment_s {
|
typedef struct flightLogEvent_inflightAdjustment_s {
|
||||||
uint8_t adjustmentFunction;
|
|
||||||
bool floatFlag;
|
|
||||||
int32_t newValue;
|
int32_t newValue;
|
||||||
float newFloatValue;
|
float newFloatValue;
|
||||||
|
uint8_t adjustmentFunction;
|
||||||
|
bool floatFlag;
|
||||||
} flightLogEvent_inflightAdjustment_t;
|
} flightLogEvent_inflightAdjustment_t;
|
||||||
|
|
||||||
typedef struct flightLogEvent_loggingResume_s {
|
typedef struct flightLogEvent_loggingResume_s {
|
||||||
|
@ -137,18 +137,11 @@ typedef struct flightLogEvent_loggingResume_s {
|
||||||
|
|
||||||
#define FLIGHT_LOG_EVENT_INFLIGHT_ADJUSTMENT_FUNCTION_FLOAT_VALUE_FLAG 128
|
#define FLIGHT_LOG_EVENT_INFLIGHT_ADJUSTMENT_FUNCTION_FLOAT_VALUE_FLAG 128
|
||||||
|
|
||||||
typedef struct flightLogEvent_gtuneCycleResult_s {
|
|
||||||
uint8_t gtuneAxis;
|
|
||||||
int32_t gtuneGyroAVG;
|
|
||||||
int16_t gtuneNewP;
|
|
||||||
} flightLogEvent_gtuneCycleResult_t;
|
|
||||||
|
|
||||||
typedef union flightLogEventData_u {
|
typedef union flightLogEventData_u {
|
||||||
flightLogEvent_syncBeep_t syncBeep;
|
flightLogEvent_syncBeep_t syncBeep;
|
||||||
flightLogEvent_flightMode_t flightMode; // New event data
|
flightLogEvent_flightMode_t flightMode; // New event data
|
||||||
flightLogEvent_inflightAdjustment_t inflightAdjustment;
|
flightLogEvent_inflightAdjustment_t inflightAdjustment;
|
||||||
flightLogEvent_loggingResume_t loggingResume;
|
flightLogEvent_loggingResume_t loggingResume;
|
||||||
flightLogEvent_gtuneCycleResult_t gtuneCycleResult;
|
|
||||||
} flightLogEventData_t;
|
} flightLogEventData_t;
|
||||||
|
|
||||||
typedef struct flightLogEvent_s {
|
typedef struct flightLogEvent_s {
|
||||||
|
|
|
@ -22,13 +22,10 @@
|
||||||
|
|
||||||
typedef struct flashGeometry_s {
|
typedef struct flashGeometry_s {
|
||||||
uint16_t sectors; // Count of the number of erasable blocks on the device
|
uint16_t sectors; // Count of the number of erasable blocks on the device
|
||||||
|
|
||||||
uint16_t pagesPerSector;
|
|
||||||
const uint16_t pageSize; // In bytes
|
const uint16_t pageSize; // In bytes
|
||||||
|
|
||||||
uint32_t sectorSize; // This is just pagesPerSector * pageSize
|
uint32_t sectorSize; // This is just pagesPerSector * pageSize
|
||||||
|
|
||||||
uint32_t totalSize; // This is just sectorSize * sectors
|
uint32_t totalSize; // This is just sectorSize * sectors
|
||||||
|
uint16_t pagesPerSector;
|
||||||
} flashGeometry_t;
|
} flashGeometry_t;
|
||||||
|
|
||||||
typedef struct flashConfig_s {
|
typedef struct flashConfig_s {
|
||||||
|
|
|
@ -25,19 +25,18 @@ typedef struct sdcardConfig_s {
|
||||||
} sdcardConfig_t;
|
} sdcardConfig_t;
|
||||||
|
|
||||||
typedef struct sdcardMetadata_s {
|
typedef struct sdcardMetadata_s {
|
||||||
uint8_t manufacturerID;
|
uint32_t numBlocks; /* Card capacity in 512-byte blocks*/
|
||||||
uint16_t oemID;
|
uint16_t oemID;
|
||||||
|
uint8_t manufacturerID;
|
||||||
|
|
||||||
char productName[5];
|
char productName[5];
|
||||||
|
|
||||||
|
uint32_t productSerial;
|
||||||
uint8_t productRevisionMajor;
|
uint8_t productRevisionMajor;
|
||||||
uint8_t productRevisionMinor;
|
uint8_t productRevisionMinor;
|
||||||
uint32_t productSerial;
|
|
||||||
|
|
||||||
uint16_t productionYear;
|
uint16_t productionYear;
|
||||||
uint8_t productionMonth;
|
uint8_t productionMonth;
|
||||||
|
|
||||||
uint32_t numBlocks; /* Card capacity in 512-byte blocks*/
|
|
||||||
} sdcardMetadata_t;
|
} sdcardMetadata_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -94,8 +94,8 @@ extern const serialPortIdentifier_e serialPortIdentifiers[SERIAL_PORT_COUNT];
|
||||||
// runtime
|
// runtime
|
||||||
//
|
//
|
||||||
typedef struct serialPortUsage_s {
|
typedef struct serialPortUsage_s {
|
||||||
serialPortIdentifier_e identifier;
|
|
||||||
serialPort_t *serialPort;
|
serialPort_t *serialPort;
|
||||||
|
serialPortIdentifier_e identifier;
|
||||||
serialPortFunction_e function;
|
serialPortFunction_e function;
|
||||||
} serialPortUsage_t;
|
} serialPortUsage_t;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue