projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformat.
[bertos.git]
/
bertos
/
cpu
/
arm
/
drv
/
adc_at91.c
diff --git
a/bertos/cpu/arm/drv/adc_at91.c
b/bertos/cpu/arm/drv/adc_at91.c
index b385184ea7c4a3fd9a442143ce9d726155698b36..bb6a8d11ffd1409fe86d557a86d31e6d233714f1 100644
(file)
--- a/
bertos/cpu/arm/drv/adc_at91.c
+++ b/
bertos/cpu/arm/drv/adc_at91.c
@@
-47,8
+47,11
@@
#include "adc_at91.h"
#include "adc_at91.h"
+#include <cpu/irq.h>
+
#include "cfg/cfg_adc.h"
#include "cfg/cfg_adc.h"
-#include "cfg/cfg_kern.h"
+#include "cfg/cfg_proc.h"
+#include "cfg/cfg_signal.h"
#include <cfg/macros.h>
#include <cfg/compiler.h>
#include <cfg/macros.h>
#include <cfg/compiler.h>
@@
-111,7
+114,7
@@
* Select mux channel \a ch.
* \todo only first 8 channels are selectable!
*/
* Select mux channel \a ch.
* \todo only first 8 channels are selectable!
*/
-
INLINE
void adc_hw_select_ch(uint8_t ch)
+void adc_hw_select_ch(uint8_t ch)
{
//Disable all channels
ADC_CHDR = ADC_CH_MASK;
{
//Disable all channels
ADC_CHDR = ADC_CH_MASK;
@@
-125,7
+128,7
@@
INLINE void adc_hw_select_ch(uint8_t ch)
* If a kernel is present, preempt until convertion is complete, otherwise
* a busy wait on ADCS bit is done.
*/
* If a kernel is present, preempt until convertion is complete, otherwise
* a busy wait on ADCS bit is done.
*/
-
INLINE
uint16_t adc_hw_read(void)
+uint16_t adc_hw_read(void)
{
ASSERT(!(ADC_SR & ADC_EOC_MASK));
{
ASSERT(!(ADC_SR & ADC_EOC_MASK));
@@
-138,7
+141,7
@@
INLINE uint16_t adc_hw_read(void)
#if CONFIG_KERN
// Ensure IRQs enabled.
#if CONFIG_KERN
// Ensure IRQs enabled.
-
ASSERT(IRQ_ENABLED()
);
+
IRQ_ASSERT_ENABLED(
);
sig_wait(SIG_ADC_COMPLETE);
#else
//Wait in polling until is done
sig_wait(SIG_ADC_COMPLETE);
#else
//Wait in polling until is done
@@
-152,7
+155,7
@@
INLINE uint16_t adc_hw_read(void)
/**
* Init ADC hardware.
*/
/**
* Init ADC hardware.
*/
-
INLINE
void adc_hw_init(void)
+void adc_hw_init(void)
{
//Init ADC pins.
ADC_INIT_PINS();
{
//Init ADC pins.
ADC_INIT_PINS();