ChibiOS 21.11.4
hal_icu.h File Reference

ICU Driver macros and structures. More...

#include "hal_icu_lld.h"

Go to the source code of this file.

Macros

#define ICU_USE_OVERFLOW_SCALING   FALSE
Macro Functions
#define icuStartCaptureI(icup)
 Starts the input capture.
#define icuStopCaptureI(icup)
 Stops the input capture.
#define icuEnableNotificationsI(icup)
 Enables notifications.
#define icuDisableNotificationsI(icup)
 Disables notifications.
#define icuAreNotificationsEnabledX(icup)
 Check on notifications status.
#define icuGetWidthX(icup)
 Returns the width of the latest pulse.
#define icuGetPeriodX(icup)
 Returns the width of the latest cycle.
Low level driver helper macros
#define _icu_isr_invoke_width_cb(icup)
 Common ISR code, ICU width event.
#define _icu_isr_invoke_period_cb(icup)
 Common ISR code, ICU period event.
#define _icu_isr_invoke_overflow_cb(icup)
 Common ISR code, ICU timer overflow event.

Typedefs

typedef struct ICUDriver ICUDriver
 Type of a structure representing an ICU driver.
typedef void(* icucallback_t) (ICUDriver *icup)
 ICU notification callback type.

Enumerations

enum  icustate_t {
  ICU_UNINIT = 0 , ICU_STOP = 1 , ICU_READY = 2 , ICU_WAITING = 3 ,
  ICU_ACTIVE = 4
}
 Driver state machine possible states. More...

Functions

void icuInit (void)
 ICU Driver initialization.
void icuObjectInit (ICUDriver *icup)
 Initializes the standard part of a ICUDriver structure.
msg_t icuStart (ICUDriver *icup, const ICUConfig *config)
 Configures and activates the ICU peripheral.
void icuStop (ICUDriver *icup)
 Deactivates the ICU peripheral.
void icuStartCapture (ICUDriver *icup)
 Starts the input capture.
bool icuWaitCapture (ICUDriver *icup)
 Waits for a completed capture.
void icuStopCapture (ICUDriver *icup)
 Stops the input capture.
void icuEnableNotifications (ICUDriver *icup)
 Enables notifications.
void icuDisableNotifications (ICUDriver *icup)
 Disables notifications.

Detailed Description

ICU Driver macros and structures.

Definition in file hal_icu.h.