[AVR] Fix code style by removing malformed EOF into the testhal demos.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15907 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Theodore Ateba 2022-12-23 21:36:49 +00:00
parent 4e568b3b7e
commit 7b713b3ded
21 changed files with 8146 additions and 8126 deletions

View File

@ -122,7 +122,7 @@
#define AVR_UART_USE_USART3 FALSE /* USARTD0. */ #define AVR_UART_USE_USART3 FALSE /* USARTD0. */
#define AVR_UART_USE_USART4 FALSE /* USARTD1. */ #define AVR_UART_USE_USART4 FALSE /* USARTD1. */
#define AVR_UART_USE_USART5 FALSE /* USARTE0. */ #define AVR_UART_USE_USART5 FALSE /* USARTE0. */
/* TODO: Definen the DMA stream like bellow */ /* TODO: Define the DMA stream like bellow */
/* #define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */ /* #define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
/* #define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */ /* #define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
/* #define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */ /* #define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */

View File

@ -30,6 +30,11 @@
*/ */
#define AVR_ADC_USE_ADC1 FALSE #define AVR_ADC_USE_ADC1 FALSE
/*
* I2C driver system settings.
*/
#define AVR_CRY_USE_CRY1 FALSE
/* /*
* DAC driver system settings. * DAC driver system settings.
*/ */
@ -102,12 +107,12 @@
#define AVR_SERIAL_USE_USART3 FALSE /* USARTD0. */ #define AVR_SERIAL_USE_USART3 FALSE /* USARTD0. */
#define AVR_SERIAL_USE_USART4 FALSE /* USARTD1. */ #define AVR_SERIAL_USE_USART4 FALSE /* USARTD1. */
#define AVR_SERIAL_USE_USART5 FALSE /* USARTE0. */ #define AVR_SERIAL_USE_USART5 FALSE /* USARTE0. */
//TODO: Define the priority if the datasheet define this parameter. /* TODO: Define the priority if the datasheet define this parameter. */
//#define AVR_UART_USART1_IRQ_PRIORITY 12 /* #define AVR_UART_USART1_IRQ_PRIORITY 12 */
//#define AVR_UART_USART2_IRQ_PRIORITY 12 /* #define AVR_UART_USART2_IRQ_PRIORITY 12 */
//#define AVR_UART_USART3_IRQ_PRIORITY 12 /* #define AVR_UART_USART3_IRQ_PRIORITY 12 */
//#define AVR_UART_USART4_IRQ_PRIORITY 12 /* #define AVR_UART_USART4_IRQ_PRIORITY 12 */
//#define AVR_UART_USART5_IRQ_PRIORITY 12 /* #define AVR_UART_USART5_IRQ_PRIORITY 12 */
/* /*
* UART driver system settings. * UART driver system settings.
@ -117,19 +122,18 @@
#define AVR_UART_USE_USART3 FALSE /* USARTD0. */ #define AVR_UART_USE_USART3 FALSE /* USARTD0. */
#define AVR_UART_USE_USART4 FALSE /* USARTD1. */ #define AVR_UART_USE_USART4 FALSE /* USARTD1. */
#define AVR_UART_USE_USART5 FALSE /* USARTE0. */ #define AVR_UART_USE_USART5 FALSE /* USARTE0. */
// TODO: Definen the DMA stream like bellow /* TODO: Define the DMA stream like bellow */
//#define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART4_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART4_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART5_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART5_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//TODO: Define the priority if the datasheet define this parameter. /* TODO: Define the priority if the datasheet define this parameter. */
//#define AVR_UART_USART1_IRQ_PRIORITY 12 /* #define AVR_UART_USART1_IRQ_PRIORITY 12 */
//#define AVR_UART_USART2_IRQ_PRIORITY 12 /* #define AVR_UART_USART2_IRQ_PRIORITY 12 */
//#define AVR_UART_USART3_IRQ_PRIORITY 12 /* #define AVR_UART_USART3_IRQ_PRIORITY 12 */
//#define AVR_UART_USART4_IRQ_PRIORITY 12 /* #define AVR_UART_USART4_IRQ_PRIORITY 12 */
//#define AVR_UART_USART5_IRQ_PRIORITY 12 /* #define AVR_UART_USART5_IRQ_PRIORITY 12 */
/* /*
* I2C driver system settings. * I2C driver system settings.

View File

@ -43,7 +43,7 @@ static const SPIConfig spiCfg = {
spiCallback, /* SPI callback. */ spiCallback, /* SPI callback. */
IOPORT2, /* SPI chip select port. */ IOPORT2, /* SPI chip select port. */
7, /* SPI chip select pad. */ 7, /* SPI chip select pad. */
SPI_PRESCALER_DIV4_gc, /* prescaler. */ SPI_PRESCALER_DIV4_gc, /* Prescaler. */
SPI_MODE_0_gc, /* SPI clock mode. */ SPI_MODE_0_gc, /* SPI clock mode. */
true, /* SPI role "master/slave". */ true, /* SPI role "master/slave". */
false, /* SPI data order. */ false, /* SPI data order. */
@ -83,7 +83,6 @@ int main(void) {
halInit(); halInit();
chSysInit(); chSysInit();
palClearPad(IOPORT5, PORTE_LED); palClearPad(IOPORT5, PORTE_LED);
/* /*

View File

@ -30,10 +30,15 @@
*/ */
#define AVR_ADC_USE_ADC1 FALSE #define AVR_ADC_USE_ADC1 FALSE
/*
* I2C driver system settings.
*/
#define AVR_CRY_USE_CRY1 FALSE
/* /*
* DAC driver system settings. * DAC driver system settings.
*/ */
#define AVR_DAC_USE_DAC1 TRUE #define AVR_DAC_USE_DAC1 FALSE
/* /*
* EXT drivers system settings. * EXT drivers system settings.
@ -102,12 +107,12 @@
#define AVR_SERIAL_USE_USART3 FALSE /* USARTD0. */ #define AVR_SERIAL_USE_USART3 FALSE /* USARTD0. */
#define AVR_SERIAL_USE_USART4 FALSE /* USARTD1. */ #define AVR_SERIAL_USE_USART4 FALSE /* USARTD1. */
#define AVR_SERIAL_USE_USART5 FALSE /* USARTE0. */ #define AVR_SERIAL_USE_USART5 FALSE /* USARTE0. */
//TODO: Define the priority if the datasheet define this parameter. /* TODO: Define the priority if the datasheet define this parameter. */
//#define AVR_UART_USART1_IRQ_PRIORITY 12 /* #define AVR_UART_USART1_IRQ_PRIORITY 12 */
//#define AVR_UART_USART2_IRQ_PRIORITY 12 /* #define AVR_UART_USART2_IRQ_PRIORITY 12 */
//#define AVR_UART_USART3_IRQ_PRIORITY 12 /* #define AVR_UART_USART3_IRQ_PRIORITY 12 */
//#define AVR_UART_USART4_IRQ_PRIORITY 12 /* #define AVR_UART_USART4_IRQ_PRIORITY 12 */
//#define AVR_UART_USART5_IRQ_PRIORITY 12 /* #define AVR_UART_USART5_IRQ_PRIORITY 12 */
/* /*
* UART driver system settings. * UART driver system settings.
@ -117,19 +122,18 @@
#define AVR_UART_USE_USART3 FALSE /* USARTD0. */ #define AVR_UART_USE_USART3 FALSE /* USARTD0. */
#define AVR_UART_USE_USART4 FALSE /* USARTD1. */ #define AVR_UART_USE_USART4 FALSE /* USARTD1. */
#define AVR_UART_USE_USART5 FALSE /* USARTE0. */ #define AVR_UART_USE_USART5 FALSE /* USARTE0. */
// TODO: Definen the DMA stream like bellow /* TODO: Define the DMA stream like bellow */
//#define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART4_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART4_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART5_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART5_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//TODO: Define the priority if the datasheet define this parameter. /* TODO: Define the priority if the datasheet define this parameter. */
//#define AVR_UART_USART1_IRQ_PRIORITY 12 /* #define AVR_UART_USART1_IRQ_PRIORITY 12 */
//#define AVR_UART_USART2_IRQ_PRIORITY 12 /* #define AVR_UART_USART2_IRQ_PRIORITY 12 */
//#define AVR_UART_USART3_IRQ_PRIORITY 12 /* #define AVR_UART_USART3_IRQ_PRIORITY 12 */
//#define AVR_UART_USART4_IRQ_PRIORITY 12 /* #define AVR_UART_USART4_IRQ_PRIORITY 12 */
//#define AVR_UART_USART5_IRQ_PRIORITY 12 /* #define AVR_UART_USART5_IRQ_PRIORITY 12 */
/* /*
* I2C driver system settings. * I2C driver system settings.
@ -140,8 +144,7 @@
* SPI driver system settings. * SPI driver system settings.
*/ */
#define AVR_SPI_USE_SPI1 TRUE #define AVR_SPI_USE_SPI1 TRUE
#define AVR_SPI_USE_SPI2 TRUE #define AVR_SPI_USE_16BIT_POLLED_EXCHANGE TRUE
//#define AVR_SPI_USE_16BIT_POLLED_EXCHANGE FALSE
/* /*
* USB driver system settings. * USB driver system settings.

View File

@ -30,10 +30,15 @@
*/ */
#define AVR_ADC_USE_ADC1 FALSE #define AVR_ADC_USE_ADC1 FALSE
/*
* I2C driver system settings.
*/
#define AVR_CRY_USE_CRY1 FALSE
/* /*
* DAC driver system settings. * DAC driver system settings.
*/ */
#define AVR_DAC_USE_DAC1 TRUE #define AVR_DAC_USE_DAC1 FALSE
/* /*
* EXT drivers system settings. * EXT drivers system settings.
@ -102,12 +107,12 @@
#define AVR_SERIAL_USE_USART3 FALSE /* USARTD0. */ #define AVR_SERIAL_USE_USART3 FALSE /* USARTD0. */
#define AVR_SERIAL_USE_USART4 FALSE /* USARTD1. */ #define AVR_SERIAL_USE_USART4 FALSE /* USARTD1. */
#define AVR_SERIAL_USE_USART5 FALSE /* USARTE0. */ #define AVR_SERIAL_USE_USART5 FALSE /* USARTE0. */
//TODO: Define the priority if the datasheet define this parameter. /* TODO: Define the priority if the datasheet define this parameter. */
//#define AVR_UART_USART1_IRQ_PRIORITY 12 /* #define AVR_UART_USART1_IRQ_PRIORITY 12 */
//#define AVR_UART_USART2_IRQ_PRIORITY 12 /* #define AVR_UART_USART2_IRQ_PRIORITY 12 */
//#define AVR_UART_USART3_IRQ_PRIORITY 12 /* #define AVR_UART_USART3_IRQ_PRIORITY 12 */
//#define AVR_UART_USART4_IRQ_PRIORITY 12 /* #define AVR_UART_USART4_IRQ_PRIORITY 12 */
//#define AVR_UART_USART5_IRQ_PRIORITY 12 /* #define AVR_UART_USART5_IRQ_PRIORITY 12 */
/* /*
* UART driver system settings. * UART driver system settings.
@ -117,19 +122,18 @@
#define AVR_UART_USE_USART3 FALSE /* USARTD0. */ #define AVR_UART_USE_USART3 FALSE /* USARTD0. */
#define AVR_UART_USE_USART4 FALSE /* USARTD1. */ #define AVR_UART_USE_USART4 FALSE /* USARTD1. */
#define AVR_UART_USE_USART5 FALSE /* USARTE0. */ #define AVR_UART_USE_USART5 FALSE /* USARTE0. */
// TODO: Definen the DMA stream like bellow /* TODO: Define the DMA stream like bellow */
//#define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART4_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART4_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART5_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART5_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//TODO: Define the priority if the datasheet define this parameter. /* TODO: Define the priority if the datasheet define this parameter. */
//#define AVR_UART_USART1_IRQ_PRIORITY 12 /* #define AVR_UART_USART1_IRQ_PRIORITY 12 */
//#define AVR_UART_USART2_IRQ_PRIORITY 12 /* #define AVR_UART_USART2_IRQ_PRIORITY 12 */
//#define AVR_UART_USART3_IRQ_PRIORITY 12 /* #define AVR_UART_USART3_IRQ_PRIORITY 12 */
//#define AVR_UART_USART4_IRQ_PRIORITY 12 /* #define AVR_UART_USART4_IRQ_PRIORITY 12 */
//#define AVR_UART_USART5_IRQ_PRIORITY 12 /* #define AVR_UART_USART5_IRQ_PRIORITY 12 */
/* /*
* I2C driver system settings. * I2C driver system settings.

View File

@ -30,10 +30,15 @@
*/ */
#define AVR_ADC_USE_ADC1 FALSE #define AVR_ADC_USE_ADC1 FALSE
/*
* I2C driver system settings.
*/
#define AVR_CRY_USE_CRY1 FALSE
/* /*
* DAC driver system settings. * DAC driver system settings.
*/ */
#define AVR_DAC_USE_DAC1 TRUE #define AVR_DAC_USE_DAC1 FALSE
/* /*
* EXT drivers system settings. * EXT drivers system settings.
@ -97,39 +102,38 @@
/* /*
* SERIAL driver system settings. * SERIAL driver system settings.
*/ */
#define AVR_SERIAL_USE_USART1 FALSE /* USARTC0 */ #define AVR_SERIAL_USE_USART1 TRUE /* USARTC0. */
#define AVR_SERIAL_USE_USART2 FALSE /* USARTC1. */ #define AVR_SERIAL_USE_USART2 FALSE /* USARTC1. */
#define AVR_SERIAL_USE_USART3 FALSE /* USARTD0. */ #define AVR_SERIAL_USE_USART3 FALSE /* USARTD0. */
#define AVR_SERIAL_USE_USART4 FALSE /* USARTD1. */ #define AVR_SERIAL_USE_USART4 FALSE /* USARTD1. */
#define AVR_SERIAL_USE_USART5 FALSE /* USARTE0. */ #define AVR_SERIAL_USE_USART5 FALSE /* USARTE0. */
//TODO: Define the priority if the datasheet define this parameter. /* TODO: Define the priority if the datasheet define this parameter. */
//#define AVR_UART_USART1_IRQ_PRIORITY 12 /* #define AVR_UART_USART1_IRQ_PRIORITY 12 */
//#define AVR_UART_USART2_IRQ_PRIORITY 12 /* #define AVR_UART_USART2_IRQ_PRIORITY 12 */
//#define AVR_UART_USART3_IRQ_PRIORITY 12 /* #define AVR_UART_USART3_IRQ_PRIORITY 12 */
//#define AVR_UART_USART4_IRQ_PRIORITY 12 /* #define AVR_UART_USART4_IRQ_PRIORITY 12 */
//#define AVR_UART_USART5_IRQ_PRIORITY 12 /* #define AVR_UART_USART5_IRQ_PRIORITY 12 */
/* /*
* UART driver system settings. * UART driver system settings.
*/ */
#define AVR_UART_USE_USART1 TRUE /* USARTC0 */ #define AVR_UART_USE_USART1 FALSE /* USARTC0. */
#define AVR_UART_USE_USART2 FALSE /* USARTC1 */ #define AVR_UART_USE_USART2 FALSE /* USARTC1. */
#define AVR_UART_USE_USART3 FALSE /* USARTD0 */ #define AVR_UART_USE_USART3 FALSE /* USARTD0. */
#define AVR_UART_USE_USART4 FALSE /* USARTD1 */ #define AVR_UART_USE_USART4 FALSE /* USARTD1. */
#define AVR_UART_USE_USART5 FALSE /* USARTE0 */ #define AVR_UART_USE_USART5 FALSE /* USARTE0. */
// TODO: Definen the DMA stream like bellow /* TODO: Define the DMA stream like bellow */
//#define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART1_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART2_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART3_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART4_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART4_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//#define AVR_UART_USART5_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) /* #define AVR_UART_USART5_RX_DMA_STREAM AVR_DMA_STREAM_ID(2, 5) */
//TODO: Define the priority if the datasheet define this parameter. /* TODO: Define the priority if the datasheet define this parameter. */
//#define AVR_UART_USART1_IRQ_PRIORITY 12 /* #define AVR_UART_USART1_IRQ_PRIORITY 12 */
//#define AVR_UART_USART2_IRQ_PRIORITY 12 /* #define AVR_UART_USART2_IRQ_PRIORITY 12 */
//#define AVR_UART_USART3_IRQ_PRIORITY 12 /* #define AVR_UART_USART3_IRQ_PRIORITY 12 */
//#define AVR_UART_USART4_IRQ_PRIORITY 12 /* #define AVR_UART_USART4_IRQ_PRIORITY 12 */
//#define AVR_UART_USART5_IRQ_PRIORITY 12 /* #define AVR_UART_USART5_IRQ_PRIORITY 12 */
/* /*
* I2C driver system settings. * I2C driver system settings.

View File

@ -67,11 +67,17 @@ int main(void) {
*/ */
while (TRUE) { while (TRUE) {
chprintf(chp, "Watchdog reset by software.\r\n"); chprintf(chp, "Watchdog reset by software.\r\n");
wdgReset(&WDTD1); // TODO: Rebuild whit this line commented. wdgReset(&WDTD1); /* TODO: Rebuild whit this line commented. */
// It will shows you if the board is rebooted /* It will shows you if the board is rebooted. */
// by the watchdog. /* By the watchdog. */
palTogglePad(IOPORT5, PORTE_LED); palTogglePad(IOPORT5, PORTE_LED);
chThdSleepMilliseconds(500); // Use for example 2 second of delay to see if the watchdog reset the board every second.
/*
* Use for example 2 second of delay to see if the watchdog reset the
* board every second.
*/
chThdSleepMilliseconds(500);
} }
return 0; return 0;
} }