PebbleOS v4.47.0-553-g7a998bc2c
Loading...
Searching...
No Matches
SF32LB57 GPADC

ADC driver for the GPADC of the SF32LB57. More...

Macros

#define PBL_ADC_SF32LB57_GPADC_DEFINE(sym, _name, _base, _cfg, _clk, _cal)
 Define the SF32LB57 GPADC.
 

Detailed Description

ADC driver for the GPADC of the SF32LB57.

Macro Definition Documentation

◆ PBL_ADC_SF32LB57_GPADC_DEFINE

#define PBL_ADC_SF32LB57_GPADC_DEFINE (   sym,
  _name,
  _base,
  _cfg,
  _clk,
  _cal 
)
Value:
PBL_ADC_STATE_DEFINE(sym); \
static struct pbl_adc_sf32lb57_gpadc_state sym##_gpadc_state; \
PBL_DEVICE_INSTANCE(sym, struct pbl_adc_sf32lb57_gpadc, struct pbl_adc, adc) { \
.adc = PBL_ADC_INIT(sym, _name, nullptr, &pbl_adc_sf32lb57_gpadc_ops, \
PBL_ADC_SF32LB57_GPADC__NUM_CHANNELS), \
.base = (_base), .cfg = (_cfg), .clk = _clk, .cal = _cal, .state = &sym##_gpadc_state, \
}
ADC.
Definition adc.h:45

Define the SF32LB57 GPADC.

Parameters
symSymbol of the ADC.
_nameName.
_baseRegisters.
_cfgHPSYS_CFG registers.
_clkClock, from PBL_CLK().
_calCalibration cell, from PBL_NVMEM_CELL(), or {} without one.