aboutsummaryrefslogtreecommitdiffstats
path: root/src/gadc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gadc')
-rw-r--r--src/gadc/gadc.c12
-rw-r--r--src/gadc/gadc.h8
-rw-r--r--src/gadc/gadc_driver.h16
3 files changed, 18 insertions, 18 deletions
diff --git a/src/gadc/gadc.c b/src/gadc/gadc.c
index 0cd9c82e..77a65c19 100644
--- a/src/gadc/gadc.c
+++ b/src/gadc/gadc.c
@@ -30,8 +30,8 @@ typedef struct NonTimerData_t {
GadcNonTimerJob job;
} NonTimerData;
-static volatile uint16_t hsFlags;
-static size_t hsBytesPerConv;
+static volatile gU16 hsFlags;
+static gMemSize hsBytesPerConv;
static GadcTimerJob hsJob;
static GDataBuffer *hsData;
static gfxQueueGSync hsListDone;
@@ -45,7 +45,7 @@ static gfxQueueGSync lsListToDo;
static gfxQueueGSync lsListDone;
static NonTimerData *lsData;
-void gadcGotDataI(size_t n) {
+void gadcGotDataI(gMemSize n) {
if ((hsFlags & GADC_HSADC_CONVERTION)) {
// A set of timer conversions is done - add them
@@ -199,7 +199,7 @@ void _gadcDeinit(void)
}
#endif
-void gadcHighSpeedInit(uint32_t physdev, uint32_t frequency)
+void gadcHighSpeedInit(gU32 physdev, gU32 frequency)
{
if ((hsFlags & GADC_HSADC_RUNNING))
gadcHighSpeedStop();
@@ -291,7 +291,7 @@ static void LowSpeedGTimerCallback(void *param) {
}
}
-void gadcLowSpeedGet(uint32_t physdev, adcsample_t *buffer) {
+void gadcLowSpeedGet(gU32 physdev, adcsample_t *buffer) {
NonTimerData ndata;
// Prepare the job
@@ -319,7 +319,7 @@ void gadcLowSpeedGet(uint32_t physdev, adcsample_t *buffer) {
gfxSemDestroy(&ndata.sigdone);
}
-gBool gadcLowSpeedStart(uint32_t physdev, adcsample_t *buffer, GADCCallbackFunction fn, void *param) {
+gBool gadcLowSpeedStart(gU32 physdev, adcsample_t *buffer, GADCCallbackFunction fn, void *param) {
NonTimerData *pdata;
/* Start the Low Speed Timer */
diff --git a/src/gadc/gadc.h b/src/gadc/gadc.h
index d731f9ef..963be473 100644
--- a/src/gadc/gadc.h
+++ b/src/gadc/gadc.h
@@ -67,7 +67,7 @@ typedef struct GEventADC_t {
/**
* @brief The event flags
*/
- uint16_t flags;
+ gU16 flags;
/**
* @brief The event flag values.
* @{
@@ -121,7 +121,7 @@ typedef void (*GADCISRCallbackFunction)(void);
*
* @api
*/
-void gadcHighSpeedInit(uint32_t physdev, uint32_t frequency);
+void gadcHighSpeedInit(gU32 physdev, gU32 frequency);
#if GFX_USE_GEVENT || defined(__DOXYGEN__)
/**
@@ -211,7 +211,7 @@ void gadcHighSpeedStop(void);
*
* @api
*/
-void gadcLowSpeedGet(uint32_t physdev, adcsample_t *buffer);
+void gadcLowSpeedGet(gU32 physdev, adcsample_t *buffer);
/**
* @brief Perform a low speed ADC conversion with callback (in a thread context)
@@ -236,7 +236,7 @@ void gadcLowSpeedGet(uint32_t physdev, adcsample_t *buffer);
*
* @api
*/
-gBool gadcLowSpeedStart(uint32_t physdev, adcsample_t *buffer, GADCCallbackFunction fn, void *param);
+gBool gadcLowSpeedStart(gU32 physdev, adcsample_t *buffer, GADCCallbackFunction fn, void *param);
#endif /* GFX_USE_GADC */
diff --git a/src/gadc/gadc_driver.h b/src/gadc/gadc_driver.h
index ba73aa15..886062c9 100644
--- a/src/gadc/gadc_driver.h
+++ b/src/gadc/gadc_driver.h
@@ -33,11 +33,11 @@
* @{
*/
typedef struct GadcTimerJob_t {
- uint32_t physdev; // @< The physical device/s. The exact meaning of physdev is hardware dependent.
- uint32_t frequency; // @< The frequency to sample
+ gU32 physdev; // @< The physical device/s. The exact meaning of physdev is hardware dependent.
+ gU32 frequency; // @< The frequency to sample
adcsample_t *buffer; // @< Where to put the samples
- size_t todo; // @< How many conversions to do
- size_t done; // @< How many conversions have already been done
+ gMemSize todo; // @< How many conversions to do
+ gMemSize done; // @< How many conversions have already been done
} GadcTimerJob;
/** @} */
@@ -46,7 +46,7 @@ typedef struct GadcTimerJob_t {
* @{
*/
typedef struct GadcNonTimerJob_t {
- uint32_t physdev; // @< The physical device/s. The exact meaning of physdev is hardware dependent.
+ gU32 physdev; // @< The physical device/s. The exact meaning of physdev is hardware dependent.
adcsample_t *buffer; // @< Where to put the samples.
} GadcNonTimerJob;
/** @} */
@@ -75,7 +75,7 @@ extern "C" {
* It can be called in this mode on an ADC conversion error. Any job will then be
* restarted by the high level code as appropriate.
*/
- void gadcGotDataI(size_t n);
+ void gadcGotDataI(gMemSize n);
/**
* @}
*/
@@ -96,7 +96,7 @@ void gadc_lld_init(void);
*
* @api
*/
-size_t gadc_lld_samplesperconversion(uint32_t physdev);
+gMemSize gadc_lld_samplesperconversion(gU32 physdev);
/**
* @brief Start a periodic timer for high frequency conversions.
@@ -108,7 +108,7 @@ size_t gadc_lld_samplesperconversion(uint32_t physdev);
* @api
* @iclass
*/
-void gadc_lld_start_timerI(uint32_t freq);
+void gadc_lld_start_timerI(gU32 freq);
/**
* @brief Stop the periodic timer for high frequency conversions.