Hardware Abstraction Layer for FreeRTOS
adc_prv.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <FreeRTOS.h>
#include <semphr.h>
#include <hal.h>
Include dependency graph for adc_prv.h:

Go to the source code of this file.

Macros

#define ADC_ALREDY_INITED   1
 
#define adc_lock(u, w, r)
 
#define adc_unlock(u, r)
 
#define ADC_ADDDEV(ns, p)   HAL_ADDDEV(adc, ns, p)
 
#define ADC_GET_DEV(index)   HAL_GET_DEV(adc, index)
 
#define ADC_OPS(ns)
 
#define ADC_INIT_DEV(ns)
 
#define ADC_INIT(ns, index, bits, hz)   struct adc *adc_init(uint32_t index, uint8_t bits, uint32_t hz)
 
#define ADC_DEINIT(ns, a)   int32_t adc_deinit(struct adc *a)
 
#define ADC_GET(ns, a, waittime)   int32_t adc_get(struct adc *a, TickType_t waittime)
 
#define ADC_GET_ISR(ns, a)   int32_t adc_getISR(struct adc *a)
 
#define ADC_SET_CALLBACK(ns, a, callback, data)   int32_t adc_setCallback(struct adc *a, bool (*callback)(struct adc *adc, uint32_t channel, int32_t value, void *data), void *data)
 
#define ADC_START(ns, a)   int32_t adc_start(struct adc *a)
 
#define ADC_STOP(ns, a)   int32_t adc_stop(struct adc *a)
 

Functions

int32_t adc_generic_init (struct adc *adc)
 
 HAL_DEFINE_GLOBAL_ARRAY (adc)
 

Macro Definition Documentation

◆ ADC_ADDDEV

#define ADC_ADDDEV (   ns,
 
)    HAL_ADDDEV(adc, ns, p)

◆ ADC_ALREDY_INITED

#define ADC_ALREDY_INITED   1

◆ ADC_DEINIT

#define ADC_DEINIT (   ns,
 
)    int32_t adc_deinit(struct adc *a)

◆ ADC_GET

#define ADC_GET (   ns,
  a,
  waittime 
)    int32_t adc_get(struct adc *a, TickType_t waittime)

◆ ADC_GET_DEV

#define ADC_GET_DEV (   index)    HAL_GET_DEV(adc, index)

◆ ADC_GET_ISR

#define ADC_GET_ISR (   ns,
 
)    int32_t adc_getISR(struct adc *a)

◆ ADC_INIT

#define ADC_INIT (   ns,
  index,
  bits,
  hz 
)    struct adc *adc_init(uint32_t index, uint8_t bits, uint32_t hz)

◆ ADC_INIT_DEV

#define ADC_INIT_DEV (   ns)

◆ adc_lock

#define adc_lock (   u,
  w,
 
)

◆ ADC_OPS

#define ADC_OPS (   ns)

◆ ADC_SET_CALLBACK

#define ADC_SET_CALLBACK (   ns,
  a,
  callback,
  data 
)    int32_t adc_setCallback(struct adc *a, bool (*callback)(struct adc *adc, uint32_t channel, int32_t value, void *data), void *data)

◆ ADC_START

#define ADC_START (   ns,
 
)    int32_t adc_start(struct adc *a)

◆ ADC_STOP

#define ADC_STOP (   ns,
 
)    int32_t adc_stop(struct adc *a)

◆ adc_unlock

#define adc_unlock (   u,
 
)

Function Documentation

◆ adc_generic_init()

int32_t adc_generic_init ( struct adc *  adc)

◆ HAL_DEFINE_GLOBAL_ARRAY()

HAL_DEFINE_GLOBAL_ARRAY ( adc  )