ATmegaxxxx - remove single line comments

This commit is contained in:
Phillip Stevens 2020-04-11 11:31:24 +10:00
parent 3ece178dd0
commit 5e32393035
3 changed files with 32 additions and 28 deletions

View file

@ -600,10 +600,10 @@ void vPortEndScheduler( void )
disable the tick interrupt here. */
#if defined (portUSE_WDTO)
wdt_disable(); // disable Watchdog Timer
wdt_disable(); /* disable Watchdog Timer */
#elif defined( portUSE_TIMER0 )
portTIMSK &= ~( _BV(OCIE0B)|_BV(OCIE0A)|_BV(TOIE0) ); // disable all Timer0 interrupts
portTIMSK &= ~( _BV(OCIE0B)|_BV(OCIE0A)|_BV(TOIE0) ); /* disable all Timer0 interrupts */
#endif
}
@ -650,7 +650,7 @@ void vPortYieldFromTick( void )
*/
void prvSetupTimerInterrupt( void )
{
//reset watchdog
/* reset watchdog */
wdt_reset();
/* actual port tick rate in Hz, calculated */
@ -658,7 +658,7 @@ void prvSetupTimerInterrupt( void )
/* initialise first second of ticks */
ticksRemainingInSec = portTickRateHz;
//set up WDT Interrupt (rather than the WDT Reset).
/* set up WDT Interrupt (rather than the WDT Reset). */
wdt_interrupt_enable( portUSE_WDTO );
}
@ -719,7 +719,7 @@ uint8_t ucLowByte;
*
*/
ISR(portSCHEDULER_ISR, ISR_NAKED) __attribute__ ((hot, flatten));
// ISR(portSCHEDULER_ISR, ISR_NAKED ISR_NOBLOCK) __attribute__ ((hot, flatten));
/* ISR(portSCHEDULER_ISR, ISR_NAKED ISR_NOBLOCK) __attribute__ ((hot, flatten)); */
ISR(portSCHEDULER_ISR)
{
@ -736,7 +736,7 @@ uint8_t ucLowByte;
* use ISR_NOBLOCK where there is an important timer running, that should preempt the scheduler.
*/
ISR(portSCHEDULER_ISR) __attribute__ ((hot, flatten));
// ISR(portSCHEDULER_ISR, ISR_NOBLOCK) __attribute__ ((hot, flatten));
/* ISR(portSCHEDULER_ISR, ISR_NOBLOCK) __attribute__ ((hot, flatten)); */
ISR(portSCHEDULER_ISR)
{

View file

@ -86,12 +86,13 @@ typedef uint8_t UBaseType_t;
/* Architecture specifics. */
// System Tick - Scheduler timer
// Prefer to use the enhanced Watchdog Timer, but also Timer0 is ok.
/* System Tick - Scheduler timer
* Prefer to use the enhanced Watchdog Timer, but also Timer0 is ok.
*/
#if defined(WDIE) && defined(WDIF) // Enhanced WDT with interrupt capability
#if defined(WDIE) && defined(WDIF) /* If Enhanced WDT with interrupt capability is available */
#define portUSE_WDTO WDTO_15MS // portUSE_WDTO to use the Watchdog Timer for xTaskIncrementTick
#define portUSE_WDTO WDTO_15MS /* use the Watchdog Timer for xTaskIncrementTick */
/* Watchdog period options: WDTO_15MS
WDTO_30MS
@ -105,7 +106,7 @@ typedef uint8_t UBaseType_t;
#else
#define portUSE_TIMER0 // portUSE_TIMER0 to use 8 bit Timer0 for xTaskIncrementTick
#define portUSE_TIMER0 /* use the 8-bit Timer0 for xTaskIncrementTick */
#endif
@ -117,7 +118,7 @@ typedef uint8_t UBaseType_t;
* from data sheet.
*/
#if defined( portUSE_WDTO )
#define portTICK_PERIOD_MS ( (TickType_t) _BV( portUSE_WDTO + 4 ) ) // Inaccurately assuming 128 kHz Watchdog Timer.
#define portTICK_PERIOD_MS ( (TickType_t) _BV( portUSE_WDTO + 4 ) )
#else
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#endif
@ -133,7 +134,10 @@ extern void vPortYield( void ) __attribute__ ( ( naked ) );
#if defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__)
/* Task function macros as described on the FreeRTOS.org WEB site. */
// Add .lowtext tag from the linker script avr6.x for ATmega2560 and ATmega2561. To make sure they are loaded in low memory.
/* Add .lowtext tag from the avr linker script avr6.x for ATmega2560 and ATmega2561
* to make sure functions are loaded in low memory.
*/
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) __attribute__ ((section (".lowtext")))
#else
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )

View file

@ -8,7 +8,7 @@ This port provides a basis for supporting all modern ATmega devices using either
This initial commit contains the information required to build with System Tick being generated by either the:
- Watchdog Timer, or
- Timer 0 - an 8-bit Timer
- Timer0 - an 8-bit Timer
Further commits can add support for 16-bit Timers available on many relevant devices. The availability of these 16-bit Timers is somewhat device specific, and these complex and highly configurable Timers are often used to generate phase correct PWM timing (for example) and they would be wasted as a simple System Tick.
@ -59,18 +59,11 @@ To avoid this issue causing `pvPort_Malloc()` to failing, the user needs to issu
if( __malloc_heap_end == 0 )
__malloc_heap_end = (char *)(RAMEND - __malloc_margin);
```
Unfortunately in the repository there is nowhere sensible to include this statement.
Unfortunately in the repository there is nowhere sensible to include this statement as it should be included early in the `main()` function.
<h3>Supported Devices</h3>
ATmega devices without enhanced __WDT__ Interrupt capability - use Timer0.
- ATmega8A/16A/32A/64A/128A -> 4kB RAM
- ATmega808/809/1608/1609/3208/3209/4808/4809 -> 6kB RAM
- ATmega165A/165PA/325A/325PA/3250A/3250PA/645A/645P/6450A/6450P -> 4kB RAM
- ATmega169A/169PA/329A/329PA/3290A/3290PA/649A/649P/6490A/6490P -> 4kB RAM
ATmega devices with __ENHANCED WDT__ Interrupt capability - use WDT.
ATmega devices with __ENHANCED WDT__ Interrupt capability - will use WDT.
- ATmega8U2/16U2/32U2 -> 2kB RAM
- ATmega16U4/32U4 - Arduino Leonardo -> 2.5kB RAM
@ -78,3 +71,10 @@ ATmega devices with __ENHANCED WDT__ Interrupt capability - use WDT.
- ATmega164PA/324PA/644PA/1284P - Goldilocks -> __16kB RAM__
- ATmega324PB -> 2kB RAM
- ATmega640/1280/2560/1281/2561 - Arduino Mega -> __8kB RAM + XRAM__
ATmega devices without enhanced __WDT__ Interrupt capability - will use Timer0.
- ATmega8A/16A/32A/64A/128A -> 4kB RAM
- ATmega808/809/1608/1609/3208/3209/4808/4809 -> 6kB RAM
- ATmega165A/165PA/325A/325PA/3250A/3250PA/645A/645P/6450A/6450P -> 4kB RAM
- ATmega169A/169PA/329A/329PA/3290A/3290PA/649A/649P/6490A/6490P -> 4kB RAM