General Types

group group_hal_general_types

This section documents the basic types that are used by multiple HAL drivers.

Enums

enum cyhal_async_mode_t

cyhal_async_mode_t: group_hal_results

Modes that can be used for asynchronous transfers

Values:

enumerator CYHAL_ASYNC_DMA

Use DMA if available.

Otherwise fall back to software transfer. (Default)

enumerator CYHAL_ASYNC_SW

Always perform a software transfer.

enum cyhal_edge_type_t

cyhal_edge_type_t: Enum of signal edge types.

Values:

enumerator CYHAL_EDGE_TYPE_RISING_EDGE

Rising edge.

enumerator CYHAL_EDGE_TYPE_FALLING_EDGE

Falling edge.

enumerator CYHAL_EDGE_TYPE_BOTH_EDGES

Both edges.

enumerator CYHAL_EDGE_TYPE_LEVEL

Level.

enum cyhal_power_level_t

cyhal_power_level_t: Selectable power levels.

Power levels are defined relative to others. Higher power levels offer better performance but consume more power.

Not all hardware supports four discrete power levels. If fewer power levels are supported, the values will be mapped as follows:

4 Levels

3 Levels

2 Levels

Off

Off

Off

Low

Low = Medium

Low = Medium = High = Default

Medium

High = Default

High = Default

See the implementation specific documentation for details.

Values:

enumerator CYHAL_POWER_LEVEL_OFF

Power-off the comparator, while retaining configuration.

enumerator CYHAL_POWER_LEVEL_LOW

Low comparator power and speed.

enumerator CYHAL_POWER_LEVEL_MEDIUM

Medium comparator power and speed.

enumerator CYHAL_POWER_LEVEL_HIGH

High comparator power and speed.

enumerator CYHAL_POWER_LEVEL_DEFAULT

Default comparator power and speed.

enum cyhal_signal_type_t

cyhal_signal_type_t: Signal trigger type.

Values:

enumerator CYHAL_SIGNAL_TYPE_LEVEL

Level triggered.

enumerator CYHAL_SIGNAL_TYPE_EDGE

Edge triggered.