AVR board files and demos updated.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2501 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
35c315a77a
commit
ace3f84470
|
@ -32,9 +32,9 @@ CH_IRQ_HANDLER(TIMER0_COMP_vect) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Board initialization code.
|
||||
* Board-specific initialization code.
|
||||
*/
|
||||
void hwinit(void) {
|
||||
void boardInit(void) {
|
||||
|
||||
/*
|
||||
* I/O ports setup.
|
||||
|
@ -76,9 +76,4 @@ void hwinit(void) {
|
|||
TCNT0 = 0; /* Reset counter. */
|
||||
TIFR0 = (1 << OCF0A); /* Reset pending. */
|
||||
TIMSK0 = (1 << OCIE0A); /* IRQ on compare. */
|
||||
|
||||
/*
|
||||
* HAL initialization.
|
||||
*/
|
||||
halInit();
|
||||
}
|
||||
|
|
|
@ -89,12 +89,14 @@
|
|||
#define PORTE_LED (1 << 4)
|
||||
#define PORTE_BUTTON (1 << 5)
|
||||
|
||||
#if !defined(_FROM_ASM_)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void hwinit(void);
|
||||
void boardInit(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _FROM_ASM_ */
|
||||
|
||||
#endif /* _BOARD_H_ */
|
||||
|
|
|
@ -32,9 +32,9 @@ CH_IRQ_HANDLER(TIMER0_COMP_vect) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Board initialization code.
|
||||
* Board-specific initialization code.
|
||||
*/
|
||||
void hwinit(void) {
|
||||
void boardInit(void) {
|
||||
|
||||
/*
|
||||
* I/O ports setup.
|
||||
|
@ -76,9 +76,4 @@ void hwinit(void) {
|
|||
TCNT0 = 0; /* Reset counter. */
|
||||
TIFR = (1 << OCF0); /* Reset pending. */
|
||||
TIMSK = (1 << OCIE0); /* IRQ on compare. */
|
||||
|
||||
/*
|
||||
* HAL initialization.
|
||||
*/
|
||||
halInit();
|
||||
}
|
||||
|
|
|
@ -113,12 +113,14 @@
|
|||
#define PORTE_BUZZ1 (1 << 4)
|
||||
#define PORTE_BUZZ2 (1 << 5)
|
||||
|
||||
#if !defined(_FROM_ASM_)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void hwinit(void);
|
||||
void boardInit(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _FROM_ASM_ */
|
||||
|
||||
#endif /* _BOARD_H_ */
|
||||
|
|
|
@ -38,6 +38,9 @@ static void TimerHandler(eventid_t id) {
|
|||
TestThread(&SD2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Application entry point.
|
||||
*/
|
||||
int main(int argc, char **argv) {
|
||||
static EvTimer evt;
|
||||
static evhandler_t handlers[1] = {
|
||||
|
@ -45,12 +48,14 @@ int main(int argc, char **argv) {
|
|||
};
|
||||
static EventListener el0;
|
||||
|
||||
hwinit();
|
||||
|
||||
/*
|
||||
* The main() function becomes a thread here then the interrupts are
|
||||
* enabled and ChibiOS/RT goes live.
|
||||
* System initializations.
|
||||
* - HAL initialization, this also initializes the configured device drivers
|
||||
* and performs the board-specific initializations.
|
||||
* - Kernel initialization, the main() function becomes a thread and the
|
||||
* RTOS is active.
|
||||
*/
|
||||
halInit();
|
||||
chSysInit();
|
||||
|
||||
/*
|
||||
|
|
|
@ -41,6 +41,9 @@ static void TimerHandler(eventid_t id) {
|
|||
TestThread(&SD2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Application entry point.
|
||||
*/
|
||||
int main(int argc, char **argv) {
|
||||
static EvTimer evt;
|
||||
static evhandler_t handlers[1] = {
|
||||
|
@ -48,12 +51,14 @@ int main(int argc, char **argv) {
|
|||
};
|
||||
static EventListener el0;
|
||||
|
||||
hwinit();
|
||||
|
||||
/*
|
||||
* The main() function becomes a thread here then the interrupts are
|
||||
* enabled and ChibiOS/RT goes live.
|
||||
* System initializations.
|
||||
* - HAL initialization, this also initializes the configured device drivers
|
||||
* and performs the board-specific initializations.
|
||||
* - Kernel initialization, the main() function becomes a thread and the
|
||||
* RTOS is active.
|
||||
*/
|
||||
halInit();
|
||||
chSysInit();
|
||||
|
||||
/*
|
||||
|
|
|
@ -5,7 +5,7 @@ Settings: F_CPU=16000000
|
|||
|
||||
*** ChibiOS/RT test suite
|
||||
***
|
||||
*** Kernel: 2.1.2unstable
|
||||
*** Kernel: 2.1.6unstable
|
||||
*** GCC Version: 4.3.0
|
||||
*** Architecture: AVR
|
||||
*** Core Variant: MegaAVR
|
||||
|
@ -99,11 +99,11 @@ Settings: F_CPU=16000000
|
|||
--- Result: SUCCESS
|
||||
----------------------------------------------------------------------------
|
||||
--- Test Case 11.5 (Benchmark, threads, full cycle)
|
||||
--- Score : 21252 threads/S
|
||||
--- Score : 21054 threads/S
|
||||
--- Result: SUCCESS
|
||||
----------------------------------------------------------------------------
|
||||
--- Test Case 11.6 (Benchmark, threads, create only)
|
||||
--- Score : 27451 threads/S
|
||||
--- Score : 27121 threads/S
|
||||
--- Result: SUCCESS
|
||||
----------------------------------------------------------------------------
|
||||
--- Test Case 11.7 (Benchmark, mass reschedule, 5 threads)
|
||||
|
|
Loading…
Reference in New Issue