Jinu Joy Thomas | 7726953 | 2019-03-05 19:23:06 +0530 | [diff] [blame] | 1 | #ifndef PLDM_TYPES_H |
| 2 | #define PLDM_TYPES_H |
| 3 | |
Deepak Kodihalli | 97e0bd5 | 2019-02-21 03:54:22 -0600 | [diff] [blame] | 4 | #include <stdint.h> |
| 5 | |
| 6 | typedef union { |
| 7 | uint8_t byte; |
| 8 | struct { |
| 9 | uint8_t bit0 : 1; |
| 10 | uint8_t bit1 : 1; |
| 11 | uint8_t bit2 : 1; |
| 12 | uint8_t bit3 : 1; |
Zahed Hossain | 26b0e57 | 2019-05-23 05:24:50 -0500 | [diff] [blame] | 13 | uint8_t bit4 : 1; |
Deepak Kodihalli | 97e0bd5 | 2019-02-21 03:54:22 -0600 | [diff] [blame] | 14 | uint8_t bit5 : 1; |
| 15 | uint8_t bit6 : 1; |
| 16 | uint8_t bit7 : 1; |
| 17 | } __attribute__((packed)) bits; |
| 18 | } bitfield8_t; |
| 19 | |
| 20 | /** @struct pldm_version |
| 21 | * |
| 22 | * |
| 23 | */ |
| 24 | typedef struct pldm_version { |
| 25 | uint8_t major; |
| 26 | uint8_t minor; |
| 27 | uint8_t update; |
| 28 | uint8_t alpha; |
| 29 | } __attribute__((packed)) ver32_t; |
Jinu Joy Thomas | 7726953 | 2019-03-05 19:23:06 +0530 | [diff] [blame] | 30 | |
Deepak Kodihalli | c6e8fb5 | 2019-05-02 08:35:31 -0500 | [diff] [blame] | 31 | typedef uint8_t bool8_t; |
| 32 | |
Jinu Joy Thomas | 7726953 | 2019-03-05 19:23:06 +0530 | [diff] [blame] | 33 | #endif /* PLDM_TYPES_H */ |