From 0fbabc305e65dfc5538cfcae10c04f6be9daf657 Mon Sep 17 00:00:00 2001 From: asterix Date: Tue, 27 May 2008 10:04:32 +0000 Subject: [PATCH] Use cfg instead appconfig in bertos modules. Reformat. Remove CVS logs. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1384 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cfg/debug.h | 7 +++---- bertos/cpu/arm/drv/adc_at91.c | 9 ++++----- bertos/cpu/arm/drv/adc_at91.h | 7 ++++--- bertos/cpu/arm/drv/kdebug_at91.c | 6 +++--- bertos/cpu/arm/drv/pwm_at91.c | 2 -- bertos/cpu/arm/drv/pwm_at91.h | 1 - bertos/cpu/arm/drv/pwm_test.c | 10 +++++----- bertos/cpu/arm/drv/ser_at91.c | 2 +- bertos/cpu/arm/drv/stepper_at91.c | 2 +- bertos/cpu/arm/drv/stepper_at91_hw_test.c | 2 +- bertos/cpu/arm/drv/timer_at91.h | 7 ++++--- bertos/cpu/arm/drv/twi_at91.c | 1 + bertos/drv/kdebug.c | 2 +- bertos/drv/mcp41.c | 4 ++-- bertos/drv/mcp41.h | 3 ++- bertos/drv/ntc.c | 19 ++++--------------- bertos/drv/pwm.h | 9 ++++++++- bertos/drv/tc520.c | 7 ++++--- bertos/drv/timer.c | 2 +- bertos/gui/menu.c | 3 +-- 20 files changed, 50 insertions(+), 55 deletions(-) diff --git a/bertos/cfg/debug.h b/bertos/cfg/debug.h index 2b85e5f3..6bd64e07 100644 --- a/bertos/cfg/debug.h +++ b/bertos/cfg/debug.h @@ -40,13 +40,12 @@ * \author Bernardo Innocenti */ -#ifndef CFG_DEBUG_H -#define CFG_DEBUG_H +#ifndef BERTOS_DEBUG_H +#define BERTOS_DEBUG_H #include #include - /* * Defaults for rarely used config stuff. */ @@ -310,4 +309,4 @@ #endif /* _DEBUG */ -#endif /* CFG_DEBUG_H */ +#endif /* BERTOS_DEBUG_H */ diff --git a/bertos/cpu/arm/drv/adc_at91.c b/bertos/cpu/arm/drv/adc_at91.c index 59fd1c68..eed5fac6 100644 --- a/bertos/cpu/arm/drv/adc_at91.c +++ b/bertos/cpu/arm/drv/adc_at91.c @@ -48,18 +48,17 @@ #include "adc_at91.h" -#include - +#include +#include #include #include -#include +#include -#include "appconfig.h" +#include #if CONFIG_KERNEL #include - #include #include #include diff --git a/bertos/cpu/arm/drv/adc_at91.h b/bertos/cpu/arm/drv/adc_at91.h index 49f0de31..5e9e7d26 100644 --- a/bertos/cpu/arm/drv/adc_at91.h +++ b/bertos/cpu/arm/drv/adc_at91.h @@ -41,10 +41,11 @@ #ifndef DRV_ADC_AT91_H #define DRV_ADC_AT91_H -#include - #include "hw_cpu.h" -#include "appconfig.h" + +#include + +#include /** * ADC config define. diff --git a/bertos/cpu/arm/drv/kdebug_at91.c b/bertos/cpu/arm/drv/kdebug_at91.c index 76c91369..dbc618b2 100644 --- a/bertos/cpu/arm/drv/kdebug_at91.c +++ b/bertos/cpu/arm/drv/kdebug_at91.c @@ -37,10 +37,10 @@ */ #include "kdebug_at91.h" -#include /* for CLOCK_FREQ */ -#include /* Required for bus macros overrides */ +#include "hw_cpu.h" /* for CLOCK_FREQ */ +#include "hw_ser.h" /* Required for bus macros overrides */ -#include +#include #include /* for BV(), DIV_ROUND */ #include diff --git a/bertos/cpu/arm/drv/pwm_at91.c b/bertos/cpu/arm/drv/pwm_at91.c index 9bba617d..142b9feb 100644 --- a/bertos/cpu/arm/drv/pwm_at91.c +++ b/bertos/cpu/arm/drv/pwm_at91.c @@ -41,8 +41,6 @@ #include "pwm_at91.h" #include "hw_cpu.h" -#include "appconfig.h" - #include #include diff --git a/bertos/cpu/arm/drv/pwm_at91.h b/bertos/cpu/arm/drv/pwm_at91.h index 753d859f..76c8b940 100644 --- a/bertos/cpu/arm/drv/pwm_at91.h +++ b/bertos/cpu/arm/drv/pwm_at91.h @@ -48,7 +48,6 @@ #include -#include "appconfig.h" #define PWM_HW_MAX_PRESCALER_STEP 10 #define PWM_HW_MAX_PERIOD 0xFFFF diff --git a/bertos/cpu/arm/drv/pwm_test.c b/bertos/cpu/arm/drv/pwm_test.c index a96e6941..1ab6d834 100644 --- a/bertos/cpu/arm/drv/pwm_test.c +++ b/bertos/cpu/arm/drv/pwm_test.c @@ -90,7 +90,7 @@ * Setup all needed to test PWM on AT91 * */ -int pwm_setup(void) +int pwm_testSetup(void) { IRQ_ENABLE; kdbg_init(); @@ -107,13 +107,13 @@ int pwm_setup(void) * Test suit for genation of pwm waveform. * */ -int pwm_test(void) +int pwm_testRun(void) { kputs("PWM test\n\n"); kputs("Init pwm.."); - pwm_setup(); + pwm_testSetup(); kputs("done.\n"); PWM_TEST_CH_SET(0); @@ -131,7 +131,7 @@ int pwm_test(void) /** * */ -int pwm_tearDown(void) +int pwm_testTearDown(void) { /* */ return 0; @@ -141,7 +141,7 @@ int pwm_tearDown(void) int main(void) { - pwm_test(); + pwm_testRun(); diff --git a/bertos/cpu/arm/drv/ser_at91.c b/bertos/cpu/arm/drv/ser_at91.c index bc1555c2..4ef27b61 100644 --- a/bertos/cpu/arm/drv/ser_at91.c +++ b/bertos/cpu/arm/drv/ser_at91.c @@ -41,9 +41,9 @@ #include "hw_ser.h" /* Required for bus macros overrides */ #include "hw_cpu.h" /* CLOCK_FREQ */ +#include #include -#include #include diff --git a/bertos/cpu/arm/drv/stepper_at91.c b/bertos/cpu/arm/drv/stepper_at91.c index 4f41f10d..896959eb 100644 --- a/bertos/cpu/arm/drv/stepper_at91.c +++ b/bertos/cpu/arm/drv/stepper_at91.c @@ -55,6 +55,7 @@ #include "stepper_at91.h" +#include #include #include @@ -63,7 +64,6 @@ #include -#include "appconfig.h" /* * Delay to set C compare to clear output diff --git a/bertos/cpu/arm/drv/stepper_at91_hw_test.c b/bertos/cpu/arm/drv/stepper_at91_hw_test.c index f4214bc0..321dde0c 100644 --- a/bertos/cpu/arm/drv/stepper_at91_hw_test.c +++ b/bertos/cpu/arm/drv/stepper_at91_hw_test.c @@ -39,6 +39,7 @@ #include "stepper_at91.h" +#include #include #include @@ -47,7 +48,6 @@ #include -#include "appconfig.h" #warning FIXME:This test is incomplete.. you MUST review.. diff --git a/bertos/cpu/arm/drv/timer_at91.h b/bertos/cpu/arm/drv/timer_at91.h index 87bccd1e..c6979f95 100644 --- a/bertos/cpu/arm/drv/timer_at91.h +++ b/bertos/cpu/arm/drv/timer_at91.h @@ -40,9 +40,10 @@ #ifndef DRV_AT91_TIMER_H #define DRV_AT91_TIMER_H -#include /* CONFIG_TIMER */ -#include /* uint8_t */ -#include /* CLOCK_FREQ */ +#include "hw_cpu.h" /* CLOCK_FREQ */ + +#include /* CONFIG_TIMER */ +#include /* uint8_t */ /** * \name Values for CONFIG_TIMER. diff --git a/bertos/cpu/arm/drv/twi_at91.c b/bertos/cpu/arm/drv/twi_at91.c index b0b84be5..6256558b 100644 --- a/bertos/cpu/arm/drv/twi_at91.c +++ b/bertos/cpu/arm/drv/twi_at91.c @@ -39,6 +39,7 @@ #include "twi_at91.h" +#include #include #include #include diff --git a/bertos/drv/kdebug.c b/bertos/drv/kdebug.c index 63a93f50..219aadff 100644 --- a/bertos/drv/kdebug.c +++ b/bertos/drv/kdebug.c @@ -39,9 +39,9 @@ */ #include - #include /* for BV() */ #include +#include #include #include diff --git a/bertos/drv/mcp41.c b/bertos/drv/mcp41.c index c8ddf0b7..62b96fd7 100644 --- a/bertos/drv/mcp41.c +++ b/bertos/drv/mcp41.c @@ -36,12 +36,12 @@ * \author Francesco Sacchi */ -#include +#include "hw_mcp41.h" #include #include -#include +#include #include #include diff --git a/bertos/drv/mcp41.h b/bertos/drv/mcp41.h index 266b539b..e9dd60b6 100644 --- a/bertos/drv/mcp41.h +++ b/bertos/drv/mcp41.h @@ -40,8 +40,9 @@ #ifndef DRV_MCP41_H #define DRV_MCP41_H -#include +#include "mcp41_map.h" #include + #include #define MCP41_WRITE_DATA 0x11 diff --git a/bertos/drv/ntc.c b/bertos/drv/ntc.c index 2469c88f..c148e7c0 100644 --- a/bertos/drv/ntc.c +++ b/bertos/drv/ntc.c @@ -43,24 +43,13 @@ * */ -/*#* - *#* $Log$ - *#* Revision 1.2 2006/07/19 12:56:26 bernie - *#* Convert to new Doxygen style. - *#* - *#* Revision 1.1 2005/11/04 17:59:47 bernie - *#* Import into DevLib. - *#* - *#* Revision 1.1 2005/05/24 09:17:58 batt - *#* Move drivers to top-level. - *#*/ - -#include -#include -#include +#include "hw_ntc.h" +#include "ntc_map.h" #include +#include + DB(bool ntc_initialized;) /** diff --git a/bertos/drv/pwm.h b/bertos/drv/pwm.h index 58c4ee5a..2648b01f 100644 --- a/bertos/drv/pwm.h +++ b/bertos/drv/pwm.h @@ -56,6 +56,13 @@ void pwm_setFrequency(PwmDev dev, pwm_freq_t freq); void pwm_enable(PwmDev dev, bool state); void pwm_init(void); -void pwm_test(void); +/** + * Test function prototypes. + * + * See pwm_test.c for implemntation of these functions. + */ +int pwm_testRun(void); +int pwm_testSetup(void); +int pwm_testTearDown(void); #endif /* DRV_PWM_H */ diff --git a/bertos/drv/tc520.c b/bertos/drv/tc520.c index 791823f0..7f63a07d 100644 --- a/bertos/drv/tc520.c +++ b/bertos/drv/tc520.c @@ -38,14 +38,15 @@ * \author Marco Benelli */ -#include -#include -#include +#include "hw_tc520.h" #include #include +#include +#include + #warning FIXME:This implementation is obsolete. Refactor with KFile interface. #if 0 diff --git a/bertos/drv/timer.c b/bertos/drv/timer.c index 4ddf0605..ca0605a7 100644 --- a/bertos/drv/timer.c +++ b/bertos/drv/timer.c @@ -41,6 +41,7 @@ #include #include +#include #include #include #include @@ -74,7 +75,6 @@ #endif #if CONFIG_KERNEL - #include #if CONFIG_KERN_PREEMPTIVE #include #endif diff --git a/bertos/gui/menu.c b/bertos/gui/menu.c index ac8e45e1..a00d9519 100644 --- a/bertos/gui/menu.c +++ b/bertos/gui/menu.c @@ -41,8 +41,7 @@ #include "menu.h" -#include - +#include #include #include -- 2.25.1