device/types.h header reference
[Devices support library module]
The source code of this header can be browsed online.
Description [link]
Device related types
Members [link]
Types [link]
- struct dev_freq_ratio_s
- struct dev_freq_s
- enum dev_pin_driving_e
Functions [link]
- uint32_t dev_acc_ppb(uint_fast8_t m, uint_fast8_t e)
- uint32_t dev_freq_acc_ppb(const struct dev_freq_s *freq)
- void dev_freq_acc_set(struct dev_freq_s *freq, uint8_t acc_m, uint8_t acc_e)
Constant [link]
- const char dev_pin_driving_e[]
Macros [link]
Members detail [link]
#define DEV_FREQ(freq_num_, freq_denom_, acc_m_, acc_e_) [link]
This macro is declared in device/types.h source file, line 108.
This macro encodes a frequency and its accuracy
See also struct dev_freq_s.
#define DEV_FREQ_ACC(m_, e_) [link]
This macro is declared in device/types.h source file, line 105.
This macro encodes a frequency accuracy value
See also struct dev_freq_s.
#define DEV_FREQ_ACC_IS_VALID(a) [link]
This macro is declared in device/types.h source file, line 117.
This macro tests if the frequency accuracy value is valid
See also struct dev_freq_s.
#define DEV_FREQ_INVALID [link]
This macro is declared in device/types.h source file, line 99.
This macro encodes the invalid frequency value .
See also struct dev_freq_s.
#define DEV_FREQ_IS_VALID(f) [link]
This macro is declared in device/types.h source file, line 102.
This macro tests if the frequency value is valid .
See also struct dev_freq_s.
#define __DEVICE_TYPES_H__ [link]
This macro is declared in device/types.h source file, line 23.
uint32_t dev_acc_ppb(uint_fast8_t m, uint_fast8_t e) [link]
This function is declared in device/types.h source file, line 121.
uint32_t dev_freq_acc_ppb(const struct dev_freq_s *freq) [link]
This function is declared in device/types.h source file, line 131.
void dev_freq_acc_set(struct dev_freq_s *freq, uint8_t acc_m, uint8_t acc_e) [link]
This function is declared in device/types.h source file, line 136.
struct dev_freq_ratio_s [link]
This struct is declared in device/types.h source file, line 143.
Clock ratio
struct dev_freq_s [link]
This struct is declared in ble/protocol/advertise.h source file, line 98.
Clock frequency in Hz = num / denom. The invalid frequency is encoded by setting denom to 0.
Clock frequency accuracy in ppb. The value in ppb is (8 | m) * 2^(e-4).
The invalid accuracy value is encoded by setting e to 0.
See also DEV_FREQ_ACC, DEV_FREQ_INVALID, DEV_FREQ_IS_VALID and DEV_FREQ_ACC_IS_VALID.
const char dev_pin_driving_e[] [link]
This constant is declared in ENUM_DESCRIPTOR function like macro expansion, line 1 in device/types.h source file, line 35.
Alternate declarations with same identifier: [1], [2].
enum dev_pin_driving_e [link]
This enum is declared in device/types.h source file, line 39.
This enum specifies IO signal driving modes
Alternate declarations with same identifier: [1], [2].
Identifier | Description |
---|---|
DEV_PIN_DISABLED | |
DEV_PIN_ENABLED_ | |
DEV_PIN_RESISTOR_UP_ | |
DEV_PIN_RESISTOR_DOWN_ | |
DEV_PIN_DRIVE_UP_ | |
DEV_PIN_DRIVE_DOWN_ | |
DEV_PIN_PUSHPULL | Output (symbol: >). DEV_PIN_ENABLED_ | DEV_PIN_DRIVE_UP_ | DEV_PIN_DRIVE_DOWN_ |
DEV_PIN_INPUT | Input (symbol: <). DEV_PIN_ENABLED_ |
DEV_PIN_INPUT_PULL | Input with pull resistor, pull direction depends on output value (symbol: =). DEV_PIN_ENABLED_ | DEV_PIN_RESISTOR_UP_ | DEV_PIN_RESISTOR_DOWN_ |
DEV_PIN_INPUT_PULLUP | Input with pullupup resistor (symbol: +.). DEV_PIN_ENABLED_ | DEV_PIN_RESISTOR_UP_ |
DEV_PIN_INPUT_PULLDOWN | Input with pullupdown resistor (symbol: -). DEV_PIN_ENABLED_ | DEV_PIN_RESISTOR_DOWN_ |
DEV_PIN_OPENDRAIN | Open drain output (symbol: _). DEV_PIN_ENABLED_ | DEV_PIN_DRIVE_DOWN_ |
DEV_PIN_OPENSOURCE | Open source output (symbol: ^). DEV_PIN_ENABLED_ | DEV_PIN_DRIVE_UP_ |
DEV_PIN_OPENDRAIN_PULLUP | Open drain output with pullup resistor (symbol: ,). DEV_PIN_ENABLED_ | DEV_PIN_DRIVE_DOWN_ | DEV_PIN_RESISTOR_UP_ |
DEV_PIN_OPENSOURCE_PULLDOWN | Open source output with pulldown resistor (symbol: `). DEV_PIN_ENABLED_ | DEV_PIN_DRIVE_UP_ | DEV_PIN_RESISTOR_DOWN_ |