UDI Environment: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
Partial revert - There should be no semicolons after #includes |
→Specific-length Types: Not really sure I see the point in these typedefs? Either way, I made them use the stdint types so that the widths are constant between archs |
||
Line 22: | Line 22: | ||
The Uniform Driver Interface declares specific-length types for use in arithmetic and logical operations. They have fixed lengths that don't change between different platforms. |
The Uniform Driver Interface declares specific-length types for use in arithmetic and logical operations. They have fixed lengths that don't change between different platforms. |
||
<source lang="C"> |
|||
typedef uint8_t udi_ubit8_t; |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
typedef bool udi_bool_t; |
|||
</source> |
|||
The driver must use these types while passing arguments and returning variables. They can also use the fast ints instead of the fixed width ones. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
7. '''typedef udi_ubit8_t udi_boolean_t''' |
|||
Driver must use these types at least while passing arguments and returning variables. They can '''internally use the ISO C types''' because that doesn't affect compatibility. For example, the long type is useful for getting the most optimized type for the architecture. |
|||
==== Abstract Types ==== |
==== Abstract Types ==== |