mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 00:37:44 -04:00
Remove coroutines (#874)
* Remove co-routine centric CORTEX_LM3S102_Rowley demos. Remove CORTEX_LM3S102_Rowley Demo2 and Demo3. Update Demo1 to no longer use coroutines. * Remove co-routines from MB91460_Softune demo * FreeRTOS_96348hs_SK16FX100PMC: Remove co-routine usage. Remove co-routine usage from FreeRTOS_96348hs_SK16FX100PMC demo. * MB96350_Softune_Dice_Kit: Remove co-routine usage Remove co-routines usage from MB96350_Softune_Dice_Kit demo * AVR_Dx_IAR: Remove co-routine usage * AVR_Dx_Atmel_Studio: Remove co-routine usage * PIC24_MPLAB: Remove autogenerated files and add to .gitignore * PIC24_MPLAB: Remove co-routine usage from demo * AVR_ATMega323_IAR: Remove co-routine usage * ColdFire_MCF52221_CodeWarrior: Remove coroutine usage * AVR_ATMega4809_MPLAB.X: Remove co-routine usage * AVR_ATMega4809_IAR: Remove co-routine usage * AVR_ATMega4809_Atmel_Studio: Remove coroutine usage * AVR_ATMega323_WinAVR: Remove coroutine usage * AVR_Dx_MPLAB.X: Remove coroutine usage * dsPIC_MPLAB: Remove coroutine usage * CORTEX_LM3S102_GCC: Remove coroutines and coroutine centric demos * CORTEX_LM3S102_GCC: Update makefile to discard unused symbols Allows fitting in the limited ram/flash for this part. * CORTEX_LM3S316_IAR: Remove coroutines * Demos: Remove references to crflash.c, crhook.c, crflash.h, crhook.h * Remove coroutine options from FreeRTOSConfig.h files * Xilinx: Remove backup file generated by revup utility * Demos: Remove Coroutine related config items and references * Format CBMC FreeRTOSConfig.h * Update URL from aws.amazon.com/freertos to github.com/FreeRTOS * Fix copyright year and license text * Fix license text in demo files * Update header check excluded path list * Add configBENCHMARK to lexicon
This commit is contained in:
parent
eb7fd55a49
commit
569c78fd8c
1153 changed files with 4875 additions and 12450 deletions
11
.github/scripts/core_checker.py
vendored
11
.github/scripts/core_checker.py
vendored
|
@ -190,6 +190,7 @@ FREERTOS_IGNORED_EXTENSIONS = [
|
||||||
'.resources',
|
'.resources',
|
||||||
'.rom',
|
'.rom',
|
||||||
'.rprj',
|
'.rprj',
|
||||||
|
'.s',
|
||||||
'.s79',
|
'.s79',
|
||||||
'.s82',
|
'.s82',
|
||||||
'.s90',
|
'.s90',
|
||||||
|
@ -273,7 +274,14 @@ FREERTOS_IGNORED_PATTERNS = [
|
||||||
r'.*/ThirdParty/.*',
|
r'.*/ThirdParty/.*',
|
||||||
r'FreeRTOS\-Plus/Demo/Common/WinPCap/.*',
|
r'FreeRTOS\-Plus/Demo/Common/WinPCap/.*',
|
||||||
r'FreeRTOS\-Plus/Source/FreeRTOS-Plus-Trace/.*',
|
r'FreeRTOS\-Plus/Source/FreeRTOS-Plus-Trace/.*',
|
||||||
r'FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/Trace_Recorder_Configuration/.*'
|
r'FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/Trace_Recorder_Configuration/.*',
|
||||||
|
r'FreeRTOS/Demo/lwIP_AVR32_UC3/.*',
|
||||||
|
r'FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/.*',
|
||||||
|
r'FreeRTOS/Demo/CORTEX_LM3S102_GCC/makedefs',
|
||||||
|
r'FreeRTOS/Demo/AVR32_UC3/FreeRTOSConfig.h',
|
||||||
|
r'FreeRTOS/Demo/RX700_RX72N_EnvisionKit_GCC_e2studio/src/smc_gen/.*',
|
||||||
|
r'FreeRTOS/Demo/RX700_RX72N_EnvisionKit_IAR_e2studio_EWRX/src/smc_gen/.*',
|
||||||
|
r'FreeRTOS/Demo/RX700_RX72N_EnvisionKit_Renesas_e2studio_CS\+/src/smc_gen/.*'
|
||||||
]
|
]
|
||||||
|
|
||||||
FREERTOS_IGNORED_FILES = [
|
FREERTOS_IGNORED_FILES = [
|
||||||
|
@ -292,6 +300,7 @@ FREERTOS_IGNORED_FILES = [
|
||||||
'platform_config.h',
|
'platform_config.h',
|
||||||
'FreeRTOS_asm_vectors.S',
|
'FreeRTOS_asm_vectors.S',
|
||||||
'interrupt_vector.s',
|
'interrupt_vector.s',
|
||||||
|
'reg_test.S',
|
||||||
'gdbinit'
|
'gdbinit'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*/
|
*/
|
||||||
|
@ -59,9 +59,6 @@
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
#define configIDLE_SHOULD_YIELD 1
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
# * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
# *
|
# *
|
||||||
# * https://www.FreeRTOS.org
|
# * https://www.FreeRTOS.org
|
||||||
# * https://aws.amazon.com/freertos
|
# * https://github.com/FreeRTOS
|
||||||
# *
|
# *
|
||||||
# * 1 tab == 4 spaces!
|
# * 1 tab == 4 spaces!
|
||||||
# */
|
# */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ void vParTestInitialise( void )
|
||||||
{
|
{
|
||||||
/* This is performed from main() as the io bits are shared with other setup
|
/* This is performed from main() as the io bits are shared with other setup
|
||||||
functions. Ensure the outputs are off to start. */
|
functions. Ensure the outputs are off to start. */
|
||||||
ulLEDReg = partstALL_OUTPUTS_OFF;
|
ulLEDReg = partstALL_OUTPUTS_OFF;
|
||||||
|
|
||||||
/* Enable clock to PIO... */
|
/* Enable clock to PIO... */
|
||||||
AT91C_BASE_PS->PS_PCER = AT91C_PS_PIO;
|
AT91C_BASE_PS->PS_PCER = AT91C_PS_PIO;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
|
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
|
||||||
|
|
||||||
This file contains all the serial port components that can be compiled to
|
This file contains all the serial port components that can be compiled to
|
||||||
either ARM or THUMB mode. Components that must be compiled to ARM mode are
|
either ARM or THUMB mode. Components that must be compiled to ARM mode are
|
||||||
|
@ -60,14 +60,14 @@
|
||||||
|
|
||||||
/* Queues used to hold received characters, and characters waiting to be
|
/* Queues used to hold received characters, and characters waiting to be
|
||||||
transmitted. */
|
transmitted. */
|
||||||
static QueueHandle_t xRxedChars;
|
static QueueHandle_t xRxedChars;
|
||||||
static QueueHandle_t xCharsForTx;
|
static QueueHandle_t xCharsForTx;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The queues are created in serialISR.c as they are used from the ISR.
|
* The queues are created in serialISR.c as they are used from the ISR.
|
||||||
* Obtain references to the queues and THRE Empty flag.
|
* Obtain references to the queues and THRE Empty flag.
|
||||||
*/
|
*/
|
||||||
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx );
|
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx );
|
||||||
|
|
||||||
|
@ -84,10 +84,10 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||||
serialISR.c (which is always compiled to ARM mode. */
|
serialISR.c (which is always compiled to ARM mode. */
|
||||||
vSerialISRCreateQueues( uxQueueLength, &xRxedChars, &xCharsForTx );
|
vSerialISRCreateQueues( uxQueueLength, &xRxedChars, &xCharsForTx );
|
||||||
|
|
||||||
if(
|
if(
|
||||||
( xRxedChars != serINVALID_QUEUE ) &&
|
( xRxedChars != serINVALID_QUEUE ) &&
|
||||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||||
( ulWantedBaud != ( unsigned long ) 0 )
|
( ulWantedBaud != ( unsigned long ) 0 )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
portENTER_CRITICAL();
|
portENTER_CRITICAL();
|
||||||
|
@ -109,10 +109,10 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||||
AT91C_BASE_US0->US_TCR = 0;
|
AT91C_BASE_US0->US_TCR = 0;
|
||||||
|
|
||||||
/* Input clock to baud rate generator is MCK */
|
/* Input clock to baud rate generator is MCK */
|
||||||
ulSpeed = configCPU_CLOCK_HZ * 10;
|
ulSpeed = configCPU_CLOCK_HZ * 10;
|
||||||
ulSpeed = ulSpeed / 16;
|
ulSpeed = ulSpeed / 16;
|
||||||
ulSpeed = ulSpeed / ulWantedBaud;
|
ulSpeed = ulSpeed / ulWantedBaud;
|
||||||
|
|
||||||
/* compute the error */
|
/* compute the error */
|
||||||
ulCD = ulSpeed / 10;
|
ulCD = ulSpeed / 10;
|
||||||
if ((ulSpeed - (ulCD * 10)) >= 5)
|
if ((ulSpeed - (ulCD * 10)) >= 5)
|
||||||
|
@ -131,10 +131,10 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||||
|
|
||||||
Store interrupt handler function address in USART0 vector register... */
|
Store interrupt handler function address in USART0 vector register... */
|
||||||
AT91C_BASE_AIC->AIC_SVR[ portUSART0_AIC_CHANNEL ] = (unsigned long)vUART_ISR_Wrapper;
|
AT91C_BASE_AIC->AIC_SVR[ portUSART0_AIC_CHANNEL ] = (unsigned long)vUART_ISR_Wrapper;
|
||||||
|
|
||||||
/* USART0 interrupt level-sensitive, priority 1... */
|
/* USART0 interrupt level-sensitive, priority 1... */
|
||||||
AT91C_BASE_AIC->AIC_SMR[ portUSART0_AIC_CHANNEL ] = AIC_SRCTYPE_INT_LEVEL_SENSITIVE | 1;
|
AT91C_BASE_AIC->AIC_SMR[ portUSART0_AIC_CHANNEL ] = AIC_SRCTYPE_INT_LEVEL_SENSITIVE | 1;
|
||||||
|
|
||||||
/* Clear some pending USART0 interrupts (just in case)... */
|
/* Clear some pending USART0 interrupts (just in case)... */
|
||||||
AT91C_BASE_US0->US_CR = US_RSTSTA;
|
AT91C_BASE_US0->US_CR = US_RSTSTA;
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
|
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR USART0.
|
||||||
|
|
||||||
This file contains all the serial port components that must be compiled
|
This file contains all the serial port components that must be compiled
|
||||||
to ARM mode. The components that can be compiled to either ARM or THUMB
|
to ARM mode. The components that can be compiled to either ARM or THUMB
|
||||||
|
@ -61,8 +61,8 @@
|
||||||
|
|
||||||
/* Queues used to hold received characters, and characters waiting to be
|
/* Queues used to hold received characters, and characters waiting to be
|
||||||
transmitted. */
|
transmitted. */
|
||||||
static QueueHandle_t xRxedChars;
|
static QueueHandle_t xRxedChars;
|
||||||
static QueueHandle_t xCharsForTx;
|
static QueueHandle_t xCharsForTx;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ static QueueHandle_t xCharsForTx;
|
||||||
be declared "naked". */
|
be declared "naked". */
|
||||||
void vUART_ISR_Wrapper( void ) __attribute__ ((naked));
|
void vUART_ISR_Wrapper( void ) __attribute__ ((naked));
|
||||||
|
|
||||||
/* The ISR function that actually performs the work. This must be separate
|
/* The ISR function that actually performs the work. This must be separate
|
||||||
from the wrapper to ensure the correct stack frame is set up. */
|
from the wrapper to ensure the correct stack frame is set up. */
|
||||||
void vUART_ISR_Handler( void ) __attribute__ ((noinline));
|
void vUART_ISR_Handler( void ) __attribute__ ((noinline));
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t
|
||||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
|
|
||||||
/* Pass back a reference to the queues so the serial API file can
|
/* Pass back a reference to the queues so the serial API file can
|
||||||
post/receive characters. */
|
post/receive characters. */
|
||||||
*pxRxedChars = xRxedChars;
|
*pxRxedChars = xRxedChars;
|
||||||
*pxCharsForTx = xCharsForTx;
|
*pxCharsForTx = xCharsForTx;
|
||||||
|
@ -93,7 +93,7 @@ void vUART_ISR_Wrapper( void )
|
||||||
/* Save the context of the interrupted task. */
|
/* Save the context of the interrupted task. */
|
||||||
portSAVE_CONTEXT();
|
portSAVE_CONTEXT();
|
||||||
|
|
||||||
/* Call the handler. This must be a separate function to ensure the
|
/* Call the handler. This must be a separate function to ensure the
|
||||||
stack frame is correctly set up. */
|
stack frame is correctly set up. */
|
||||||
__asm volatile( "bl vUART_ISR_Handler" );
|
__asm volatile( "bl vUART_ISR_Handler" );
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ unsigned long ulStatus;
|
||||||
{
|
{
|
||||||
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
||||||
AT91C_BASE_US0->US_IDR = US_TXRDY;
|
AT91C_BASE_US0->US_IDR = US_TXRDY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ulStatus & US_RXRDY)
|
if (ulStatus & US_RXRDY)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
-----------------------------------------------------------*/
|
-----------------------------------------------------------*/
|
||||||
|
@ -55,9 +55,6 @@
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
#define configIDLE_SHOULD_YIELD 1
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -35,9 +35,9 @@
|
||||||
const unsigned long led_mask[ NB_LED ]= { LED1, LED2, LED3, LED4 };
|
const unsigned long led_mask[ NB_LED ]= { LED1, LED2, LED3, LED4 };
|
||||||
|
|
||||||
void vParTestInitialise( void )
|
void vParTestInitialise( void )
|
||||||
{
|
{
|
||||||
/* Start with all LED's off. */
|
/* Start with all LED's off. */
|
||||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, LED_MASK );
|
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, LED_MASK );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, led_mask[ uxLED ] );
|
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, led_mask[ uxLED ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
Sample interrupt driven USB device driver. This is a minimal implementation
|
Sample interrupt driven USB device driver. This is a minimal implementation
|
||||||
for demonstration only. Although functional, it is not a full and compliant
|
for demonstration only. Although functional, it is not a full and compliant
|
||||||
implementation.
|
implementation.
|
||||||
|
|
||||||
The USB device enumerates as a simple 3 axis joystick, and once configured
|
The USB device enumerates as a simple 3 axis joystick, and once configured
|
||||||
transmits 3 axis of data which can be viewed from the USB host machine.
|
transmits 3 axis of data which can be viewed from the USB host machine.
|
||||||
|
|
||||||
|
@ -36,13 +36,13 @@
|
||||||
task. The interrupt service routine handles the USB hardware - taking a
|
task. The interrupt service routine handles the USB hardware - taking a
|
||||||
snapshot of the USB status at the point of the interrupt. The task receives
|
snapshot of the USB status at the point of the interrupt. The task receives
|
||||||
the status information from the interrupt for processing at the task level.
|
the status information from the interrupt for processing at the task level.
|
||||||
|
|
||||||
See the FreeRTOS.org WEB documentation for more information.
|
See the FreeRTOS.org WEB documentation for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Changes from V2.5.5
|
Changes from V2.5.5
|
||||||
|
|
||||||
+ Descriptors that have a length that is an exact multiple of usbFIFO_LENGTH
|
+ Descriptors that have a length that is an exact multiple of usbFIFO_LENGTH
|
||||||
can now be transmitted. To this end an extra parameter has been
|
can now be transmitted. To this end an extra parameter has been
|
||||||
added to the prvSendControlData() function, and the state
|
added to the prvSendControlData() function, and the state
|
||||||
|
@ -332,7 +332,7 @@ const char pxManufacturerStringDescriptor[] =
|
||||||
'R', 0x00,
|
'R', 0x00,
|
||||||
'T', 0x00,
|
'T', 0x00,
|
||||||
'O', 0x00,
|
'O', 0x00,
|
||||||
'S', 0x00
|
'S', 0x00
|
||||||
};
|
};
|
||||||
|
|
||||||
const char pxProductStringDescriptor[] =
|
const char pxProductStringDescriptor[] =
|
||||||
|
@ -571,18 +571,18 @@ unsigned long ulTemp, ulRxBytes;
|
||||||
/* Clear the interrupts from the ICR register. The bus end interrupt is
|
/* Clear the interrupts from the ICR register. The bus end interrupt is
|
||||||
cleared separately as it does not appear in the mask register. */
|
cleared separately as it does not appear in the mask register. */
|
||||||
AT91C_BASE_UDP->UDP_ICR = AT91C_BASE_UDP->UDP_IMR | AT91C_UDP_ENDBUSRES;
|
AT91C_BASE_UDP->UDP_ICR = AT91C_BASE_UDP->UDP_IMR | AT91C_UDP_ENDBUSRES;
|
||||||
|
|
||||||
/* If there are bytes in the FIFO then we have to retrieve them here.
|
/* If there are bytes in the FIFO then we have to retrieve them here.
|
||||||
Ideally this would be done at the task level. However we need to clear the
|
Ideally this would be done at the task level. However we need to clear the
|
||||||
RXSETUP interrupt before leaving the ISR, and this may cause the data in
|
RXSETUP interrupt before leaving the ISR, and this may cause the data in
|
||||||
the FIFO to be overwritten. Also the DIR bit has to be changed before the
|
the FIFO to be overwritten. Also the DIR bit has to be changed before the
|
||||||
RXSETUP bit is cleared (as per the SAM7 manual). */
|
RXSETUP bit is cleared (as per the SAM7 manual). */
|
||||||
ulTemp = pxMessage->ulCSR0;
|
ulTemp = pxMessage->ulCSR0;
|
||||||
|
|
||||||
/* Are there any bytes in the FIFO? */
|
/* Are there any bytes in the FIFO? */
|
||||||
ulRxBytes = ulTemp >> 16;
|
ulRxBytes = ulTemp >> 16;
|
||||||
ulRxBytes &= usbRX_COUNT_MASK;
|
ulRxBytes &= usbRX_COUNT_MASK;
|
||||||
|
|
||||||
/* With this minimal implementation we are only interested in receiving
|
/* With this minimal implementation we are only interested in receiving
|
||||||
setup bytes on the control end point. */
|
setup bytes on the control end point. */
|
||||||
if( ( ulRxBytes > 0 ) && ( ulTemp & AT91C_UDP_RXSETUP ) )
|
if( ( ulRxBytes > 0 ) && ( ulTemp & AT91C_UDP_RXSETUP ) )
|
||||||
|
@ -591,14 +591,14 @@ unsigned long ulTemp, ulRxBytes;
|
||||||
while( ulRxBytes > 0 )
|
while( ulRxBytes > 0 )
|
||||||
{
|
{
|
||||||
ulRxBytes--;
|
ulRxBytes--;
|
||||||
pxMessage->ucFifoData[ ulRxBytes ] = AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ];
|
pxMessage->ucFifoData[ ulRxBytes ] = AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The direction must be changed first. */
|
/* The direction must be changed first. */
|
||||||
usbCSR_SET_BIT( &ulTemp, ( AT91C_UDP_DIR ) );
|
usbCSR_SET_BIT( &ulTemp, ( AT91C_UDP_DIR ) );
|
||||||
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;
|
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Must write zero's to TXCOMP, STALLSENT, RXSETUP, and the RX DATA
|
/* Must write zero's to TXCOMP, STALLSENT, RXSETUP, and the RX DATA
|
||||||
registers to clear the interrupts in the CSR register. */
|
registers to clear the interrupts in the CSR register. */
|
||||||
usbCSR_CLEAR_BIT( &ulTemp, usbINT_CLEAR_MASK );
|
usbCSR_CLEAR_BIT( &ulTemp, usbINT_CLEAR_MASK );
|
||||||
|
@ -606,7 +606,7 @@ unsigned long ulTemp, ulRxBytes;
|
||||||
|
|
||||||
/* Also clear the interrupts in the CSR1 register. */
|
/* Also clear the interrupts in the CSR1 register. */
|
||||||
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];
|
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];
|
||||||
usbCSR_CLEAR_BIT( &ulTemp, usbINT_CLEAR_MASK );
|
usbCSR_CLEAR_BIT( &ulTemp, usbINT_CLEAR_MASK );
|
||||||
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ] = ulTemp;
|
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ] = ulTemp;
|
||||||
|
|
||||||
/* The message now contains the entire state and optional data from
|
/* The message now contains the entire state and optional data from
|
||||||
|
@ -618,7 +618,7 @@ unsigned long ulTemp, ulRxBytes;
|
||||||
it the highest priority task that is ready to execute. */
|
it the highest priority task that is ready to execute. */
|
||||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||||
|
|
||||||
/* Clear the AIC ready for the next interrupt. */
|
/* Clear the AIC ready for the next interrupt. */
|
||||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -652,7 +652,7 @@ xISRStatus *pxMessage;
|
||||||
if( pxMessage->ulISR & AT91C_UDP_ENDBUSRES )
|
if( pxMessage->ulISR & AT91C_UDP_ENDBUSRES )
|
||||||
{
|
{
|
||||||
/* Process an end of bus reset interrupt. */
|
/* Process an end of bus reset interrupt. */
|
||||||
prvResetEndPoints();
|
prvResetEndPoints();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -685,21 +685,21 @@ static signed char x = 0, y = 0, z = 0;
|
||||||
lState = usbYUP;
|
lState = usbYUP;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case usbXDOWN : x -= usbDATA_INC;
|
case usbXDOWN : x -= usbDATA_INC;
|
||||||
if( x <= -usbMAX_COORD )
|
if( x <= -usbMAX_COORD )
|
||||||
{
|
{
|
||||||
lState = usbYDOWN;
|
lState = usbYDOWN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case usbYUP : y += usbDATA_INC;
|
case usbYUP : y += usbDATA_INC;
|
||||||
if( y >= usbMAX_COORD )
|
if( y >= usbMAX_COORD )
|
||||||
{
|
{
|
||||||
lState = usbXDOWN;
|
lState = usbXDOWN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case usbYDOWN : y -= usbDATA_INC;
|
case usbYDOWN : y -= usbDATA_INC;
|
||||||
if( y <= -usbMAX_COORD )
|
if( y <= -usbMAX_COORD )
|
||||||
{
|
{
|
||||||
|
@ -718,7 +718,7 @@ static signed char x = 0, y = 0, z = 0;
|
||||||
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_1 ] = x;
|
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_1 ] = x;
|
||||||
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_1 ] = y;
|
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_1 ] = y;
|
||||||
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_1 ] = z;
|
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_1 ] = z;
|
||||||
|
|
||||||
/* Send the data. */
|
/* Send the data. */
|
||||||
portENTER_CRITICAL();
|
portENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
|
@ -801,10 +801,10 @@ unsigned long ulTemp;
|
||||||
static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||||
{
|
{
|
||||||
if( pxMessage->ulCSR0 & AT91C_UDP_RX_DATA_BK0 )
|
if( pxMessage->ulCSR0 & AT91C_UDP_RX_DATA_BK0 )
|
||||||
{
|
{
|
||||||
/* We only expect to receive zero length data here as ACK's.
|
/* We only expect to receive zero length data here as ACK's.
|
||||||
Set the data pointer to the end of the current Tx packet to
|
Set the data pointer to the end of the current Tx packet to
|
||||||
ensure we don't send out any more data. */
|
ensure we don't send out any more data. */
|
||||||
pxCharsForTx.ulNextCharIndex = pxCharsForTx.ulTotalDataLength;
|
pxCharsForTx.ulNextCharIndex = pxCharsForTx.ulTotalDataLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -824,33 +824,33 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||||
{
|
{
|
||||||
unsigned long ulTemp;
|
unsigned long ulTemp;
|
||||||
|
|
||||||
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];
|
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];
|
||||||
usbCSR_SET_BIT( &ulTemp, AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN );
|
usbCSR_SET_BIT( &ulTemp, AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN );
|
||||||
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ] = ulTemp;
|
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ] = ulTemp;
|
||||||
AT91F_UDP_EnableIt( AT91C_BASE_UDP, AT91C_UDP_EPINT1 );
|
AT91F_UDP_EnableIt( AT91C_BASE_UDP, AT91C_UDP_EPINT1 );
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
|
||||||
eDriverState = eREADY_TO_SEND;
|
eDriverState = eREADY_TO_SEND;
|
||||||
}
|
}
|
||||||
else if( eDriverState == eJUST_GOT_ADDRESS )
|
else if( eDriverState == eJUST_GOT_ADDRESS )
|
||||||
{
|
{
|
||||||
/* We sent an acknowledgement of a SET_ADDRESS request. Move
|
/* We sent an acknowledgement of a SET_ADDRESS request. Move
|
||||||
to the addressed state. */
|
to the addressed state. */
|
||||||
if( ulReceivedAddress != ( unsigned long ) 0 )
|
if( ulReceivedAddress != ( unsigned long ) 0 )
|
||||||
{
|
{
|
||||||
AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN;
|
AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AT91C_BASE_UDP->UDP_GLBSTATE = 0;
|
AT91C_BASE_UDP->UDP_GLBSTATE = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AT91C_BASE_UDP->UDP_FADDR = ( AT91C_UDP_FEN | ulReceivedAddress );
|
AT91C_BASE_UDP->UDP_FADDR = ( AT91C_UDP_FEN | ulReceivedAddress );
|
||||||
eDriverState = eNOTHING;
|
eDriverState = eNOTHING;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* The TXCOMP was not for any special type of transmission. See
|
/* The TXCOMP was not for any special type of transmission. See
|
||||||
if there is any more data to send. */
|
if there is any more data to send. */
|
||||||
prvSendNextSegment();
|
prvSendNextSegment();
|
||||||
|
@ -863,7 +863,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||||
unsigned char ucRequest;
|
unsigned char ucRequest;
|
||||||
unsigned long ulRxBytes;
|
unsigned long ulRxBytes;
|
||||||
|
|
||||||
/* A data packet is available. */
|
/* A data packet is available. */
|
||||||
ulRxBytes = pxMessage->ulCSR0 >> 16;
|
ulRxBytes = pxMessage->ulCSR0 >> 16;
|
||||||
ulRxBytes &= usbRX_COUNT_MASK;
|
ulRxBytes &= usbRX_COUNT_MASK;
|
||||||
|
|
||||||
|
@ -878,15 +878,15 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||||
xRequest.usValue = pxMessage->ucFifoData[ usbVALUE_HIGH_BYTE ];
|
xRequest.usValue = pxMessage->ucFifoData[ usbVALUE_HIGH_BYTE ];
|
||||||
xRequest.usValue <<= 8;
|
xRequest.usValue <<= 8;
|
||||||
xRequest.usValue |= pxMessage->ucFifoData[ usbVALUE_LOW_BYTE ];
|
xRequest.usValue |= pxMessage->ucFifoData[ usbVALUE_LOW_BYTE ];
|
||||||
|
|
||||||
xRequest.usIndex = pxMessage->ucFifoData[ usbINDEX_HIGH_BYTE ];
|
xRequest.usIndex = pxMessage->ucFifoData[ usbINDEX_HIGH_BYTE ];
|
||||||
xRequest.usIndex <<= 8;
|
xRequest.usIndex <<= 8;
|
||||||
xRequest.usIndex |= pxMessage->ucFifoData[ usbINDEX_LOW_BYTE ];
|
xRequest.usIndex |= pxMessage->ucFifoData[ usbINDEX_LOW_BYTE ];
|
||||||
|
|
||||||
xRequest.usLength = pxMessage->ucFifoData[ usbLENGTH_HIGH_BYTE ];
|
xRequest.usLength = pxMessage->ucFifoData[ usbLENGTH_HIGH_BYTE ];
|
||||||
xRequest.usLength <<= 8;
|
xRequest.usLength <<= 8;
|
||||||
xRequest.usLength |= pxMessage->ucFifoData[ usbLENGTH_LOW_BYTE ];
|
xRequest.usLength |= pxMessage->ucFifoData[ usbLENGTH_LOW_BYTE ];
|
||||||
|
|
||||||
/* Manipulate the ucRequestType and the ucRequest parameters to
|
/* Manipulate the ucRequestType and the ucRequest parameters to
|
||||||
generate a zero based request selection. This is just done to
|
generate a zero based request selection. This is just done to
|
||||||
break up the requests into subsections for clarity. The
|
break up the requests into subsections for clarity. The
|
||||||
|
@ -897,28 +897,28 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||||
|
|
||||||
switch( ucRequest )
|
switch( ucRequest )
|
||||||
{
|
{
|
||||||
case usbSTANDARD_DEVICE_REQUEST:
|
case usbSTANDARD_DEVICE_REQUEST:
|
||||||
/* Standard Device request */
|
/* Standard Device request */
|
||||||
prvHandleStandardDeviceRequest( &xRequest );
|
prvHandleStandardDeviceRequest( &xRequest );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case usbSTANDARD_INTERFACE_REQUEST:
|
case usbSTANDARD_INTERFACE_REQUEST:
|
||||||
/* Standard Interface request */
|
/* Standard Interface request */
|
||||||
prvHandleStandardInterfaceRequest( &xRequest );
|
prvHandleStandardInterfaceRequest( &xRequest );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case usbSTANDARD_END_POINT_REQUEST:
|
case usbSTANDARD_END_POINT_REQUEST:
|
||||||
/* Standard Endpoint request */
|
/* Standard Endpoint request */
|
||||||
prvHandleStandardEndPointRequest( &xRequest );
|
prvHandleStandardEndPointRequest( &xRequest );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case usbCLASS_INTERFACE_REQUEST:
|
case usbCLASS_INTERFACE_REQUEST:
|
||||||
/* Class Interface request */
|
/* Class Interface request */
|
||||||
prvHandleClassInterfaceRequest( &xRequest );
|
prvHandleClassInterfaceRequest( &xRequest );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* This is not something we want to respond to. */
|
default: /* This is not something we want to respond to. */
|
||||||
prvSendStall();
|
prvSendStall();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -933,7 +933,7 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
|
||||||
case usbDESCRIPTOR_TYPE_DEVICE:
|
case usbDESCRIPTOR_TYPE_DEVICE:
|
||||||
prvSendControlData( ( unsigned char * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
|
prvSendControlData( ( unsigned char * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case usbDESCRIPTOR_TYPE_CONFIGURATION:
|
case usbDESCRIPTOR_TYPE_CONFIGURATION:
|
||||||
prvSendControlData( ( unsigned char * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
|
prvSendControlData( ( unsigned char * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
|
||||||
break;
|
break;
|
||||||
|
@ -942,7 +942,7 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
|
||||||
|
|
||||||
/* The index to the string descriptor is the lower byte. */
|
/* The index to the string descriptor is the lower byte. */
|
||||||
switch( pxRequest->usValue & 0xff )
|
switch( pxRequest->usValue & 0xff )
|
||||||
{
|
{
|
||||||
case usbLANGUAGE_STRING:
|
case usbLANGUAGE_STRING:
|
||||||
prvSendControlData( ( unsigned char * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
|
prvSendControlData( ( unsigned char * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
|
||||||
break;
|
break;
|
||||||
|
@ -1005,13 +1005,13 @@ unsigned short usStatus = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case usbSET_ADDRESS_REQUEST:
|
case usbSET_ADDRESS_REQUEST:
|
||||||
|
|
||||||
/* Acknowledge the SET_ADDRESS, but (according to the manual) we
|
/* Acknowledge the SET_ADDRESS, but (according to the manual) we
|
||||||
cannot actually move to the addressed state until we get a TXCOMP
|
cannot actually move to the addressed state until we get a TXCOMP
|
||||||
interrupt from this NULL packet. Therefore we just remember the
|
interrupt from this NULL packet. Therefore we just remember the
|
||||||
address and set our state so we know we have received the address. */
|
address and set our state so we know we have received the address. */
|
||||||
prvUSBTransmitNull();
|
prvUSBTransmitNull();
|
||||||
eDriverState = eJUST_GOT_ADDRESS;
|
eDriverState = eJUST_GOT_ADDRESS;
|
||||||
ulReceivedAddress = ( unsigned long ) pxRequest->usValue;
|
ulReceivedAddress = ( unsigned long ) pxRequest->usValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1020,7 +1020,7 @@ unsigned short usStatus = 0;
|
||||||
/* Acknowledge the SET_CONFIGURATION, but (according to the manual)
|
/* Acknowledge the SET_CONFIGURATION, but (according to the manual)
|
||||||
we cannot actually move to the configured state until we get a
|
we cannot actually move to the configured state until we get a
|
||||||
TXCOMP interrupt from this NULL packet. Therefore we just remember the
|
TXCOMP interrupt from this NULL packet. Therefore we just remember the
|
||||||
config and set our state so we know we have received the go ahead. */
|
config and set our state so we know we have received the go ahead. */
|
||||||
ucUSBConfig = ( unsigned char ) ( pxRequest->usValue & 0xff );
|
ucUSBConfig = ( unsigned char ) ( pxRequest->usValue & 0xff );
|
||||||
eDriverState = eJUST_GOT_CONFIG;
|
eDriverState = eJUST_GOT_CONFIG;
|
||||||
prvUSBTransmitNull();
|
prvUSBTransmitNull();
|
||||||
|
@ -1048,7 +1048,7 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest )
|
||||||
case usbGET_IDLE_REQUEST:
|
case usbGET_IDLE_REQUEST:
|
||||||
case usbGET_PROTOCOL_REQUEST:
|
case usbGET_PROTOCOL_REQUEST:
|
||||||
case usbSET_REPORT_REQUEST:
|
case usbSET_REPORT_REQUEST:
|
||||||
case usbSET_PROTOCOL_REQUEST:
|
case usbSET_PROTOCOL_REQUEST:
|
||||||
default:
|
default:
|
||||||
|
|
||||||
prvSendStall();
|
prvSendStall();
|
||||||
|
@ -1092,7 +1092,7 @@ unsigned short usStatus = 0;
|
||||||
/* This minimal implementation does not respond to these. */
|
/* This minimal implementation does not respond to these. */
|
||||||
case usbGET_INTERFACE_REQUEST:
|
case usbGET_INTERFACE_REQUEST:
|
||||||
case usbSET_FEATURE_REQUEST:
|
case usbSET_FEATURE_REQUEST:
|
||||||
case usbSET_INTERFACE_REQUEST:
|
case usbSET_INTERFACE_REQUEST:
|
||||||
|
|
||||||
default:
|
default:
|
||||||
prvSendStall();
|
prvSendStall();
|
||||||
|
@ -1110,7 +1110,7 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )
|
||||||
case usbCLEAR_FEATURE_REQUEST:
|
case usbCLEAR_FEATURE_REQUEST:
|
||||||
case usbSET_FEATURE_REQUEST:
|
case usbSET_FEATURE_REQUEST:
|
||||||
|
|
||||||
default:
|
default:
|
||||||
prvSendStall();
|
prvSendStall();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1214,7 +1214,7 @@ volatile unsigned long ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||||
if( pxCharsForTx.ulTotalDataLength > pxCharsForTx.ulNextCharIndex )
|
if( pxCharsForTx.ulTotalDataLength > pxCharsForTx.ulNextCharIndex )
|
||||||
{
|
{
|
||||||
ulLengthLeftToSend = pxCharsForTx.ulTotalDataLength - pxCharsForTx.ulNextCharIndex;
|
ulLengthLeftToSend = pxCharsForTx.ulTotalDataLength - pxCharsForTx.ulNextCharIndex;
|
||||||
|
|
||||||
/* We can only send 8 bytes to the fifo at a time. */
|
/* We can only send 8 bytes to the fifo at a time. */
|
||||||
if( ulLengthLeftToSend > usbFIFO_LENGTH )
|
if( ulLengthLeftToSend > usbFIFO_LENGTH )
|
||||||
{
|
{
|
||||||
|
@ -1236,11 +1236,11 @@ volatile unsigned long ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||||
while( ulNextLength > ( unsigned long ) 0 )
|
while( ulNextLength > ( unsigned long ) 0 )
|
||||||
{
|
{
|
||||||
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ] = pxCharsForTx.ucTxBuffer[ pxCharsForTx.ulNextCharIndex ];
|
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ] = pxCharsForTx.ucTxBuffer[ pxCharsForTx.ulNextCharIndex ];
|
||||||
|
|
||||||
ulNextLength--;
|
ulNextLength--;
|
||||||
pxCharsForTx.ulNextCharIndex++;
|
pxCharsForTx.ulNextCharIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start the transmission. */
|
/* Start the transmission. */
|
||||||
portENTER_CRITICAL();
|
portENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||||
called. The demo applications included in the FreeRTOS.org download switch
|
called. The demo applications included in the FreeRTOS.org download switch
|
||||||
to supervisor mode prior to main being called. If you are not using one of
|
to supervisor mode prior to main being called. If you are not using one of
|
||||||
these demo application projects then ensure Supervisor mode is used.
|
these demo application projects then ensure Supervisor mode is used.
|
||||||
|
@ -36,17 +36,17 @@
|
||||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||||
* documentation provides more details of the demo application tasks. The SAM7
|
* documentation provides more details of the demo application tasks. The SAM7
|
||||||
* includes a sample USB that emulates a Joystick input to a USB host.
|
* includes a sample USB that emulates a Joystick input to a USB host.
|
||||||
*
|
*
|
||||||
* Main.c also creates a task called "Check". This only executes every three
|
* Main.c also creates a task called "Check". This only executes every three
|
||||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||||
* Its main function is to check that all the other tasks are still operational.
|
* Its main function is to check that all the other tasks are still operational.
|
||||||
* Each task (other than the "flash" tasks) maintains a unique count that is
|
* Each task (other than the "flash" tasks) maintains a unique count that is
|
||||||
* incremented each time the task successfully completes its function. Should
|
* incremented each time the task successfully completes its function. Should
|
||||||
* any error occur within such a task the count is permanently halted. The
|
* any error occur within such a task the count is permanently halted. The
|
||||||
* check task inspects the count of each task to ensure it has changed since
|
* check task inspects the count of each task to ensure it has changed since
|
||||||
* the last time the check task executed. If all the count variables have
|
* the last time the check task executed. If all the count variables have
|
||||||
* changed all the tasks are still executing error free, and the check task
|
* changed all the tasks are still executing error free, and the check task
|
||||||
* toggles the onboard LED. Should any task contain an error at any time
|
* toggles the onboard LED. Should any task contain an error at any time
|
||||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
#define mainCOM_TEST_LED ( 4 ) /* Off the board. */
|
#define mainCOM_TEST_LED ( 4 ) /* Off the board. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The task that executes at the highest priority and calls
|
* The task that executes at the highest priority and calls
|
||||||
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
||||||
* of the file.
|
* of the file.
|
||||||
*/
|
*/
|
||||||
|
@ -111,7 +111,7 @@ static long prvCheckOtherTasksAreStillRunning( void );
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Starts all the other tasks, then starts the scheduler.
|
* Starts all the other tasks, then starts the scheduler.
|
||||||
*/
|
*/
|
||||||
void main( void )
|
void main( void )
|
||||||
{
|
{
|
||||||
|
@ -130,17 +130,17 @@ void main( void )
|
||||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||||
vStartDynamicPriorityTasks();
|
vStartDynamicPriorityTasks();
|
||||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||||
|
|
||||||
/* Also start the USB demo which is just for the SAM7. */
|
/* Also start the USB demo which is just for the SAM7. */
|
||||||
xTaskCreate( vUSBDemoTask, "USB", configMINIMAL_STACK_SIZE, NULL, mainUSB_PRIORITY, NULL );
|
xTaskCreate( vUSBDemoTask, "USB", configMINIMAL_STACK_SIZE, NULL, mainUSB_PRIORITY, NULL );
|
||||||
|
|
||||||
/* Start the check task - which is defined in this file. */
|
/* Start the check task - which is defined in this file. */
|
||||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
/* Start the scheduler.
|
/* Start the scheduler.
|
||||||
|
|
||||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||||
called. The demo applications included in the FreeRTOS.org download switch
|
called. The demo applications included in the FreeRTOS.org download switch
|
||||||
to supervisor mode prior to main being called. If you are not using one of
|
to supervisor mode prior to main being called. If you are not using one of
|
||||||
these demo application projects then ensure Supervisor mode is used here. */
|
these demo application projects then ensure Supervisor mode is used here. */
|
||||||
|
@ -158,14 +158,14 @@ static void prvSetupHardware( void )
|
||||||
the correct default state. This line just ensures that this does not
|
the correct default state. This line just ensures that this does not
|
||||||
cause all interrupts to be masked at the start. */
|
cause all interrupts to be masked at the start. */
|
||||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||||
|
|
||||||
/* Most setup is performed by the low level init function called from the
|
/* Most setup is performed by the low level init function called from the
|
||||||
startup asm file. */
|
startup asm file. */
|
||||||
|
|
||||||
/* Configure the PIO Lines corresponding to LED1 to LED4 to be outputs as
|
/* Configure the PIO Lines corresponding to LED1 to LED4 to be outputs as
|
||||||
well as the UART Tx line. */
|
well as the UART Tx line. */
|
||||||
AT91F_PIO_CfgOutput( AT91C_BASE_PIOA, LED_MASK );
|
AT91F_PIO_CfgOutput( AT91C_BASE_PIOA, LED_MASK );
|
||||||
|
|
||||||
/* Enable the peripheral clock. */
|
/* Enable the peripheral clock. */
|
||||||
AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_PIOA );
|
AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_PIOA );
|
||||||
}
|
}
|
||||||
|
@ -187,15 +187,15 @@ TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||||
{
|
{
|
||||||
/* Delay until it is time to execute again. */
|
/* Delay until it is time to execute again. */
|
||||||
vTaskDelay( xDelayPeriod );
|
vTaskDelay( xDelayPeriod );
|
||||||
|
|
||||||
/* Check all the standard demo application tasks are executing without
|
/* Check all the standard demo application tasks are executing without
|
||||||
error. */
|
error. */
|
||||||
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
||||||
{
|
{
|
||||||
/* An error has been detected in one of the tasks - flash faster. */
|
/* An error has been detected in one of the tasks - flash faster. */
|
||||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,15 +20,15 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Standard includes. */
|
/* Standard includes. */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
/* Scheduler includes. */
|
/* Scheduler includes. */
|
||||||
|
@ -58,8 +58,8 @@
|
||||||
|
|
||||||
/* Queues used to hold received characters, and characters waiting to be
|
/* Queues used to hold received characters, and characters waiting to be
|
||||||
transmitted. */
|
transmitted. */
|
||||||
static QueueHandle_t xRxedChars;
|
static QueueHandle_t xRxedChars;
|
||||||
static QueueHandle_t xCharsForTx;
|
static QueueHandle_t xCharsForTx;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ extern void ( vUART_ISR )( void );
|
||||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
|
|
||||||
/* If the queues were created correctly then setup the serial port
|
/* If the queues were created correctly then setup the serial port
|
||||||
hardware. */
|
hardware. */
|
||||||
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
|
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
|
||||||
{
|
{
|
||||||
|
@ -115,7 +115,7 @@ extern void ( vUART_ISR )( void );
|
||||||
xReturn = ( xComPortHandle ) 0;
|
xReturn = ( xComPortHandle ) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This demo file only supports a single port but we have to return
|
/* This demo file only supports a single port but we have to return
|
||||||
something to comply with the standard demo header file. */
|
something to comply with the standard demo header file. */
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
@ -214,19 +214,19 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
{
|
{
|
||||||
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
||||||
vInterruptOff();
|
vInterruptOff();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ulStatus & AT91C_US_RXRDY )
|
if( ulStatus & AT91C_US_RXRDY )
|
||||||
{
|
{
|
||||||
/* The interrupt was caused by a character being received. Grab the
|
/* The interrupt was caused by a character being received. Grab the
|
||||||
character from the RHR and place it in the queue or received
|
character from the RHR and place it in the queue or received
|
||||||
characters. */
|
characters. */
|
||||||
cChar = serCOM0->US_RHR;
|
cChar = serCOM0->US_RHR;
|
||||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If a task was woken by either a character being received or a character
|
/* If a task was woken by either a character being received or a character
|
||||||
being transmitted then we may need to switch to another task. */
|
being transmitted then we may need to switch to another task. */
|
||||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||||
|
|
||||||
|
@ -237,4 +237,4 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
@ -56,9 +56,6 @@
|
||||||
#define configIDLE_SHOULD_YIELD 1
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
#define configQUEUE_REGISTRY_SIZE 0
|
#define configQUEUE_REGISTRY_SIZE 0
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
# * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
# * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
# *
|
# *
|
||||||
# * https://www.FreeRTOS.org
|
# * https://www.FreeRTOS.org
|
||||||
# * https://aws.amazon.com/freertos
|
# * https://github.com/FreeRTOS
|
||||||
# *
|
# *
|
||||||
# * 1 tab == 4 spaces!
|
# * 1 tab == 4 spaces!
|
||||||
# */
|
# */
|
||||||
|
@ -107,6 +107,6 @@ clean :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Changes from V2.5.2
|
Changes from V2.5.2
|
||||||
|
|
||||||
+ All LED's are turned off to start.
|
+ All LED's are turned off to start.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -69,9 +69,9 @@ unsigned long ulLED = partstFIRST_IO;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GPIO_IOSET = ulLED;
|
GPIO_IOSET = ulLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -93,8 +93,8 @@ unsigned long ulLED = partstFIRST_IO, ulCurrentState;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GPIO_IOSET = ulLED;
|
GPIO_IOSET = ulLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
Changes from V2.4.1
|
Changes from V2.4.1
|
||||||
|
|
||||||
+ Split serial.c into serial.c and serialISR.c. serial.c can be
|
+ Split serial.c into serial.c and serialISR.c. serial.c can be
|
||||||
compiled using ARM or THUMB modes. serialISR.c must always be
|
compiled using ARM or THUMB modes. serialISR.c must always be
|
||||||
compiled in ARM mode.
|
compiled in ARM mode.
|
||||||
+ Another small change to cSerialPutChar().
|
+ Another small change to cSerialPutChar().
|
||||||
|
@ -44,8 +44,8 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||||
|
|
||||||
This file contains all the serial port components that can be compiled to
|
This file contains all the serial port components that can be compiled to
|
||||||
either ARM or THUMB mode. Components that must be compiled to ARM mode are
|
either ARM or THUMB mode. Components that must be compiled to ARM mode are
|
||||||
|
@ -89,17 +89,17 @@
|
||||||
|
|
||||||
/* Queues used to hold received characters, and characters waiting to be
|
/* Queues used to hold received characters, and characters waiting to be
|
||||||
transmitted. */
|
transmitted. */
|
||||||
static QueueHandle_t xRxedChars;
|
static QueueHandle_t xRxedChars;
|
||||||
static QueueHandle_t xCharsForTx;
|
static QueueHandle_t xCharsForTx;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Communication flag between the interrupt service routine and serial API. */
|
/* Communication flag between the interrupt service routine and serial API. */
|
||||||
static volatile long *plTHREEmpty;
|
static volatile long *plTHREEmpty;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The queues are created in serialISR.c as they are used from the ISR.
|
* The queues are created in serialISR.c as they are used from the ISR.
|
||||||
* Obtain references to the queues and THRE Empty flag.
|
* Obtain references to the queues and THRE Empty flag.
|
||||||
*/
|
*/
|
||||||
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag );
|
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag );
|
||||||
|
|
||||||
|
@ -115,10 +115,10 @@ extern void ( vUART_ISR_Wrapper )( void );
|
||||||
serialISR.c (which is always compiled to ARM mode. */
|
serialISR.c (which is always compiled to ARM mode. */
|
||||||
vSerialISRCreateQueues( uxQueueLength, &xRxedChars, &xCharsForTx, &plTHREEmpty );
|
vSerialISRCreateQueues( uxQueueLength, &xRxedChars, &xCharsForTx, &plTHREEmpty );
|
||||||
|
|
||||||
if(
|
if(
|
||||||
( xRxedChars != serINVALID_QUEUE ) &&
|
( xRxedChars != serINVALID_QUEUE ) &&
|
||||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||||
( ulWantedBaud != ( unsigned long ) 0 )
|
( ulWantedBaud != ( unsigned long ) 0 )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
portENTER_CRITICAL();
|
portENTER_CRITICAL();
|
||||||
|
@ -212,21 +212,21 @@ signed portBASE_TYPE xReturn;
|
||||||
/* Is there space to write directly to the UART? */
|
/* Is there space to write directly to the UART? */
|
||||||
if( *plTHREEmpty == ( long ) pdTRUE )
|
if( *plTHREEmpty == ( long ) pdTRUE )
|
||||||
{
|
{
|
||||||
/* We wrote the character directly to the UART, so was
|
/* We wrote the character directly to the UART, so was
|
||||||
successful. */
|
successful. */
|
||||||
*plTHREEmpty = pdFALSE;
|
*plTHREEmpty = pdFALSE;
|
||||||
UART0_THR = cOutChar;
|
UART0_THR = cOutChar;
|
||||||
xReturn = pdPASS;
|
xReturn = pdPASS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* We cannot write directly to the UART, so queue the character.
|
/* We cannot write directly to the UART, so queue the character.
|
||||||
Block for a maximum of xBlockTime if there is no space in the
|
Block for a maximum of xBlockTime if there is no space in the
|
||||||
queue. */
|
queue. */
|
||||||
xReturn = xQueueSend( xCharsForTx, &cOutChar, xBlockTime );
|
xReturn = xQueueSend( xCharsForTx, &cOutChar, xBlockTime );
|
||||||
|
|
||||||
/* Depending on queue sizing and task prioritisation: While we
|
/* Depending on queue sizing and task prioritisation: While we
|
||||||
were blocked waiting to post interrupts were not disabled. It is
|
were blocked waiting to post interrupts were not disabled. It is
|
||||||
possible that the serial ISR has emptied the Tx queue, in which
|
possible that the serial ISR has emptied the Tx queue, in which
|
||||||
case we need to start the Tx off again. */
|
case we need to start the Tx off again. */
|
||||||
if( ( *plTHREEmpty == ( long ) pdTRUE ) && ( xReturn == pdPASS ) )
|
if( ( *plTHREEmpty == ( long ) pdTRUE ) && ( xReturn == pdPASS ) )
|
||||||
|
@ -254,4 +254,4 @@ void vSerialClose( xComPortHandle xPort )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||||
|
|
||||||
This file contains all the serial port components that must be compiled
|
This file contains all the serial port components that must be compiled
|
||||||
to ARM mode. The components that can be compiled to either ARM or THUMB
|
to ARM mode. The components that can be compiled to either ARM or THUMB
|
||||||
|
@ -59,15 +59,15 @@
|
||||||
|
|
||||||
/* Queues used to hold received characters, and characters waiting to be
|
/* Queues used to hold received characters, and characters waiting to be
|
||||||
transmitted. */
|
transmitted. */
|
||||||
static QueueHandle_t xRxedChars;
|
static QueueHandle_t xRxedChars;
|
||||||
static QueueHandle_t xCharsForTx;
|
static QueueHandle_t xCharsForTx;
|
||||||
static volatile long lTHREEmpty;
|
static volatile long lTHREEmpty;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The queues are created in serialISR.c as they are used from the ISR.
|
* The queues are created in serialISR.c as they are used from the ISR.
|
||||||
* Obtain references to the queues and THRE Empty flag.
|
* Obtain references to the queues and THRE Empty flag.
|
||||||
*/
|
*/
|
||||||
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag );
|
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars, QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag );
|
||||||
|
|
||||||
|
@ -78,14 +78,14 @@ void vUART_ISR_Wrapper( void ) __attribute__ ((naked));
|
||||||
void vUART_ISR_Handler( void ) __attribute__ ((noinline));
|
void vUART_ISR_Handler( void ) __attribute__ ((noinline));
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars,
|
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, QueueHandle_t *pxRxedChars,
|
||||||
QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag )
|
QueueHandle_t *pxCharsForTx, long volatile **pplTHREEmptyFlag )
|
||||||
{
|
{
|
||||||
/* Create the queues used to hold Rx and Tx characters. */
|
/* Create the queues used to hold Rx and Tx characters. */
|
||||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
|
|
||||||
/* Pass back a reference to the queues so the serial API file can
|
/* Pass back a reference to the queues so the serial API file can
|
||||||
post/receive characters. */
|
post/receive characters. */
|
||||||
*pxRxedChars = xRxedChars;
|
*pxRxedChars = xRxedChars;
|
||||||
*pxCharsForTx = xCharsForTx;
|
*pxCharsForTx = xCharsForTx;
|
||||||
|
@ -130,15 +130,15 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* There are no further characters
|
/* There are no further characters
|
||||||
queued to send so we can indicate
|
queued to send so we can indicate
|
||||||
that the THRE is available. */
|
that the THRE is available. */
|
||||||
lTHREEmpty = pdTRUE;
|
lTHREEmpty = pdTRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case serSOURCE_RX_TIMEOUT :
|
case serSOURCE_RX_TIMEOUT :
|
||||||
case serSOURCE_RX : /* A character was received. Place it in
|
case serSOURCE_RX : /* A character was received. Place it in
|
||||||
the queue of received characters. */
|
the queue of received characters. */
|
||||||
cChar = UART0_RBR;
|
cChar = UART0_RBR;
|
||||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||||
|
@ -162,4 +162,4 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -57,9 +57,6 @@
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
#define configIDLE_SHOULD_YIELD 1
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vParTestInitialise( void )
|
void vParTestInitialise( void )
|
||||||
{
|
{
|
||||||
/* The ports are setup within prvInitialiseHardware(), called by main(). */
|
/* The ports are setup within prvInitialiseHardware(), called by main(). */
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -64,9 +64,9 @@ unsigned long ulLED = partstFIRST_IO;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IO1CLR = ulLED;
|
IO1CLR = ulLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -88,9 +88,9 @@ unsigned long ulLED = partstFIRST_IO, ulCurrentState;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IO1SET = ulLED;
|
IO1SET = ulLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ void main( void )
|
||||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||||
vStartDynamicPriorityTasks();
|
vStartDynamicPriorityTasks();
|
||||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||||
|
|
||||||
/* Start the check task - which is defined in this file. */
|
/* Start the check task - which is defined in this file. */
|
||||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ static void prvSetupHardware( void )
|
||||||
|
|
||||||
/* Setup the peripheral bus to be the same as the PLL output. */
|
/* Setup the peripheral bus to be the same as the PLL output. */
|
||||||
APBDIV = mainBUS_CLK_FULL;
|
APBDIV = mainBUS_CLK_FULL;
|
||||||
|
|
||||||
/* Configure the RS2332 pins. All other pins remain at their default of 0. */
|
/* Configure the RS2332 pins. All other pins remain at their default of 0. */
|
||||||
PINSEL0 |= mainTX_ENABLE;
|
PINSEL0 |= mainTX_ENABLE;
|
||||||
PINSEL0 |= mainRX_ENABLE;
|
PINSEL0 |= mainRX_ENABLE;
|
||||||
|
@ -219,7 +219,7 @@ TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||||
{
|
{
|
||||||
/* Delay until it is time to execute again. */
|
/* Delay until it is time to execute again. */
|
||||||
vTaskDelay( xDelayPeriod );
|
vTaskDelay( xDelayPeriod );
|
||||||
|
|
||||||
/* Check all the standard demo application tasks are executing without
|
/* Check all the standard demo application tasks are executing without
|
||||||
error. */
|
error. */
|
||||||
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
||||||
|
@ -227,7 +227,7 @@ TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||||
/* An error has been detected in one of the tasks - flash faster. */
|
/* An error has been detected in one of the tasks - flash faster. */
|
||||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
@ -56,9 +56,6 @@
|
||||||
|
|
||||||
#define configQUEUE_REGISTRY_SIZE 0
|
#define configQUEUE_REGISTRY_SIZE 0
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -60,9 +60,9 @@ unsigned long ulLED = partstFIRST_IO;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IOCLR1 = ulLED;
|
IOCLR1 = ulLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -84,8 +84,8 @@ unsigned long ulLED = partstFIRST_IO, ulCurrentState;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IOSET1 = ulLED;
|
IOSET1 = ulLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||||
called. The demo applications included in the FreeRTOS.org download switch
|
called. The demo applications included in the FreeRTOS.org download switch
|
||||||
to supervisor mode prior to main being called. If you are not using one of
|
to supervisor mode prior to main being called. If you are not using one of
|
||||||
these demo application projects then ensure Supervisor mode is used.
|
these demo application projects then ensure Supervisor mode is used.
|
||||||
|
@ -36,17 +36,17 @@
|
||||||
/*
|
/*
|
||||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||||
* documentation provides more details of the demo application tasks.
|
* documentation provides more details of the demo application tasks.
|
||||||
*
|
*
|
||||||
* Main.c also creates a task called "Check". This only executes every three
|
* Main.c also creates a task called "Check". This only executes every three
|
||||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||||
* Its main function is to check that all the other tasks are still operational.
|
* Its main function is to check that all the other tasks are still operational.
|
||||||
* Each task (other than the "flash" tasks) maintains a unique count that is
|
* Each task (other than the "flash" tasks) maintains a unique count that is
|
||||||
* incremented each time the task successfully completes its function. Should
|
* incremented each time the task successfully completes its function. Should
|
||||||
* any error occur within such a task the count is permanently halted. The
|
* any error occur within such a task the count is permanently halted. The
|
||||||
* check task inspects the count of each task to ensure it has changed since
|
* check task inspects the count of each task to ensure it has changed since
|
||||||
* the last time the check task executed. If all the count variables have
|
* the last time the check task executed. If all the count variables have
|
||||||
* changed all the tasks are still executing error free, and the check task
|
* changed all the tasks are still executing error free, and the check task
|
||||||
* toggles the onboard LED. Should any task contain an error at any time
|
* toggles the onboard LED. Should any task contain an error at any time
|
||||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -106,7 +106,7 @@ then an error has been detected in at least one of the demo application tasks. *
|
||||||
static long prvCheckOtherTasksAreStillRunning( void );
|
static long prvCheckOtherTasksAreStillRunning( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The task that executes at the highest priority and calls
|
* The task that executes at the highest priority and calls
|
||||||
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
||||||
* of the file.
|
* of the file.
|
||||||
*/
|
*/
|
||||||
|
@ -125,7 +125,7 @@ static void prvSetupHardware( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Application entry point:
|
* Application entry point:
|
||||||
* Starts all the other tasks, then starts the scheduler.
|
* Starts all the other tasks, then starts the scheduler.
|
||||||
*/
|
*/
|
||||||
int main( void )
|
int main( void )
|
||||||
{
|
{
|
||||||
|
@ -141,14 +141,14 @@ int main( void )
|
||||||
vStartDynamicPriorityTasks();
|
vStartDynamicPriorityTasks();
|
||||||
|
|
||||||
/* Start the check task - which is defined in this file. This is the task
|
/* Start the check task - which is defined in this file. This is the task
|
||||||
that periodically checks to see that all the other tasks are executing
|
that periodically checks to see that all the other tasks are executing
|
||||||
without error. */
|
without error. */
|
||||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
/* Now all the tasks have been started - start the scheduler.
|
/* Now all the tasks have been started - start the scheduler.
|
||||||
|
|
||||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||||
called. The demo applications included in the FreeRTOS.org download switch
|
called. The demo applications included in the FreeRTOS.org download switch
|
||||||
to supervisor mode prior to main being called. If you are not using one of
|
to supervisor mode prior to main being called. If you are not using one of
|
||||||
these demo application projects then ensure Supervisor mode is used here. */
|
these demo application projects then ensure Supervisor mode is used here. */
|
||||||
|
@ -176,7 +176,7 @@ TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
/* The period of the delay depends on whether an error has been
|
/* The period of the delay depends on whether an error has been
|
||||||
detected or not. If an error has been detected then the period
|
detected or not. If an error has been detected then the period
|
||||||
is reduced to increase the LED flash rate. */
|
is reduced to increase the LED flash rate. */
|
||||||
vTaskDelay( xDelayPeriod );
|
vTaskDelay( xDelayPeriod );
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||||
|
|
||||||
Note this driver is used to test the FreeRTOS port. It is NOT intended to
|
Note this driver is used to test the FreeRTOS port. It is NOT intended to
|
||||||
be an example of an efficient implementation!
|
be an example of an efficient implementation!
|
||||||
|
@ -83,8 +83,8 @@
|
||||||
*/
|
*/
|
||||||
extern void vUART_ISREntry( void );
|
extern void vUART_ISREntry( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The C function called from the asm wrapper.
|
* The C function called from the asm wrapper.
|
||||||
*/
|
*/
|
||||||
void vUART_ISRHandler( void );
|
void vUART_ISRHandler( void );
|
||||||
|
|
||||||
|
@ -92,8 +92,8 @@ void vUART_ISRHandler( void );
|
||||||
|
|
||||||
/* Queues used to hold received characters, and characters waiting to be
|
/* Queues used to hold received characters, and characters waiting to be
|
||||||
transmitted. */
|
transmitted. */
|
||||||
static QueueHandle_t xRxedChars;
|
static QueueHandle_t xRxedChars;
|
||||||
static QueueHandle_t xCharsForTx;
|
static QueueHandle_t xCharsForTx;
|
||||||
|
|
||||||
/* Communication flag between the interrupt service routine and serial API. */
|
/* Communication flag between the interrupt service routine and serial API. */
|
||||||
static volatile long lTHREEmpty;
|
static volatile long lTHREEmpty;
|
||||||
|
@ -112,10 +112,10 @@ xComPortHandle xReturn = serHANDLE;
|
||||||
/* Initialise the THRE empty flag. */
|
/* Initialise the THRE empty flag. */
|
||||||
lTHREEmpty = pdTRUE;
|
lTHREEmpty = pdTRUE;
|
||||||
|
|
||||||
if(
|
if(
|
||||||
( xRxedChars != serINVALID_QUEUE ) &&
|
( xRxedChars != serINVALID_QUEUE ) &&
|
||||||
( xCharsForTx != serINVALID_QUEUE ) &&
|
( xCharsForTx != serINVALID_QUEUE ) &&
|
||||||
( ulWantedBaud != ( unsigned long ) 0 )
|
( ulWantedBaud != ( unsigned long ) 0 )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
portENTER_CRITICAL()
|
portENTER_CRITICAL()
|
||||||
|
@ -209,13 +209,13 @@ signed portBASE_TYPE xReturn;
|
||||||
/* Is there space to write directly to the UART? */
|
/* Is there space to write directly to the UART? */
|
||||||
if( lTHREEmpty == ( long ) pdTRUE )
|
if( lTHREEmpty == ( long ) pdTRUE )
|
||||||
{
|
{
|
||||||
/* We wrote the character directly to the UART, so was
|
/* We wrote the character directly to the UART, so was
|
||||||
successful. */
|
successful. */
|
||||||
lTHREEmpty = pdFALSE;
|
lTHREEmpty = pdFALSE;
|
||||||
U1THR = cOutChar;
|
U1THR = cOutChar;
|
||||||
xReturn = pdPASS;
|
xReturn = pdPASS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* We cannot write directly to the UART, so queue the character.
|
/* We cannot write directly to the UART, so queue the character.
|
||||||
Block for a maximum of xBlockTime if there is no space in the
|
Block for a maximum of xBlockTime if there is no space in the
|
||||||
|
@ -223,8 +223,8 @@ signed portBASE_TYPE xReturn;
|
||||||
task has it's own critical section management. */
|
task has it's own critical section management. */
|
||||||
xReturn = xQueueSend( xCharsForTx, &cOutChar, xBlockTime );
|
xReturn = xQueueSend( xCharsForTx, &cOutChar, xBlockTime );
|
||||||
|
|
||||||
/* Depending on queue sizing and task prioritisation: While we
|
/* Depending on queue sizing and task prioritisation: While we
|
||||||
were blocked waiting to post interrupts were not disabled. It is
|
were blocked waiting to post interrupts were not disabled. It is
|
||||||
possible that the serial ISR has emptied the Tx queue, in which
|
possible that the serial ISR has emptied the Tx queue, in which
|
||||||
case we need to start the Tx off again. */
|
case we need to start the Tx off again. */
|
||||||
if( lTHREEmpty == ( long ) pdTRUE )
|
if( lTHREEmpty == ( long ) pdTRUE )
|
||||||
|
@ -258,7 +258,7 @@ unsigned char ucInterrupt;
|
||||||
case serSOURCE_ERROR : /* Not handling this, but clear the interrupt. */
|
case serSOURCE_ERROR : /* Not handling this, but clear the interrupt. */
|
||||||
cChar = U1LSR;
|
cChar = U1LSR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case serSOURCE_THRE : /* The THRE is empty. If there is another
|
case serSOURCE_THRE : /* The THRE is empty. If there is another
|
||||||
character in the Tx queue, send it now. */
|
character in the Tx queue, send it now. */
|
||||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||||
|
@ -267,20 +267,20 @@ unsigned char ucInterrupt;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* There are no further characters
|
/* There are no further characters
|
||||||
queued to send so we can indicate
|
queued to send so we can indicate
|
||||||
that the THRE is available. */
|
that the THRE is available. */
|
||||||
lTHREEmpty = pdTRUE;
|
lTHREEmpty = pdTRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case serSOURCE_RX_TIMEOUT :
|
case serSOURCE_RX_TIMEOUT :
|
||||||
case serSOURCE_RX : /* A character was received. Place it in
|
case serSOURCE_RX : /* A character was received. Place it in
|
||||||
the queue of received characters. */
|
the queue of received characters. */
|
||||||
cChar = U1RBR;
|
cChar = U1RBR;
|
||||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default : /* There is nothing to do, leave the ISR. */
|
default : /* There is nothing to do, leave the ISR. */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -302,4 +302,4 @@ unsigned char ucInterrupt;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
; *
|
; *
|
||||||
; * https://www.FreeRTOS.org
|
; * https://www.FreeRTOS.org
|
||||||
; * https://aws.amazon.com/freertos
|
; * https://github.com/FreeRTOS
|
||||||
; *
|
; *
|
||||||
; * 1 tab == 4 spaces!
|
; * 1 tab == 4 spaces!
|
||||||
; */
|
; */
|
||||||
|
|
|
@ -69,9 +69,6 @@ the CPU frequency. */
|
||||||
#define configUSE_RECURSIVE_MUTEXES 1
|
#define configUSE_RECURSIVE_MUTEXES 1
|
||||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
#define isrCLEAR_EINT_1 2
|
#define isrCLEAR_EINT_1 2
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Interrupt routine that simply wakes vButtonHandlerTask on each interrupt
|
* Interrupt routine that simply wakes vButtonHandlerTask on each interrupt
|
||||||
* generated by a push of the built in button. The wrapper takes care of
|
* generated by a push of the built in button. The wrapper takes care of
|
||||||
* the ISR entry. This then calls the actual handler function to perform
|
* the ISR entry. This then calls the actual handler function to perform
|
||||||
* the work. This work should not be done in the wrapper itself unless
|
* the work. This work should not be done in the wrapper itself unless
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
@ -53,9 +53,6 @@
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
#define configIDLE_SHOULD_YIELD 1
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@
|
||||||
|
|
||||||
#define partstFIRST_LED_BIT 4
|
#define partstFIRST_LED_BIT 4
|
||||||
|
|
||||||
/* This demo application uses files that are common to all port demo
|
/* This demo application uses files that are common to all port demo
|
||||||
applications. These files assume 6 LED's are available, whereas I have
|
applications. These files assume 6 LED's are available, whereas I have
|
||||||
only 5 (including the LED built onto the development board). To prevent
|
only 5 (including the LED built onto the development board). To prevent
|
||||||
two tasks trying to use the same LED a bit of remapping is performed.
|
two tasks trying to use the same LED a bit of remapping is performed.
|
||||||
The ComTest tasks will try and use LED's 6 and 7. LED 6 is ignored and
|
The ComTest tasks will try and use LED's 6 and 7. LED 6 is ignored and
|
||||||
has no effect, LED 7 is mapped to LED3. The LED usage is described in
|
has no effect, LED 7 is mapped to LED3. The LED usage is described in
|
||||||
the port documentation available from the FreeRTOS.org WEB site. */
|
the port documentation available from the FreeRTOS.org WEB site. */
|
||||||
|
@ -61,7 +61,7 @@ the port documentation available from the FreeRTOS.org WEB site. */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vParTestInitialise( void )
|
void vParTestInitialise( void )
|
||||||
{
|
{
|
||||||
/* Configure the bits used to flash LED's on port 1 as output. */
|
/* Configure the bits used to flash LED's on port 1 as output. */
|
||||||
GPIO_Config(GPIO1, partstALL_LEDs, GPIO_OUT_OD);
|
GPIO_Config(GPIO1, partstALL_LEDs, GPIO_OUT_OD);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ TickType_t xLastWakeTime;
|
||||||
/* Delay until it is time to execute again. The delay period is
|
/* Delay until it is time to execute again. The delay period is
|
||||||
shorter following an error so the LED flashes faster. */
|
shorter following an error so the LED flashes faster. */
|
||||||
vTaskDelayUntil( &xLastWakeTime, xDelayPeriod );
|
vTaskDelayUntil( &xLastWakeTime, xDelayPeriod );
|
||||||
|
|
||||||
/* Check all the standard demo application tasks are executing without
|
/* Check all the standard demo application tasks are executing without
|
||||||
error. */
|
error. */
|
||||||
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
||||||
|
@ -189,7 +189,7 @@ TickType_t xLastWakeTime;
|
||||||
/* An error has been detected in one of the tasks - flash faster. */
|
/* An error has been detected in one of the tasks - flash faster. */
|
||||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ __arm void vSerialISR( void );
|
||||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||||
{
|
{
|
||||||
xComPortHandle xReturn;
|
xComPortHandle xReturn;
|
||||||
|
|
||||||
/* Create the queues used to hold Rx and Tx characters. */
|
/* Create the queues used to hold Rx and Tx characters. */
|
||||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
|
@ -209,7 +209,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
{
|
{
|
||||||
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
||||||
serINTERRUPT_OFF();
|
serINTERRUPT_OFF();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( usStatus & UART_RxBufFull )
|
if( usStatus & UART_RxBufFull )
|
||||||
|
@ -233,4 +233,4 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
@ -55,9 +55,6 @@
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
#define configIDLE_SHOULD_YIELD 0
|
#define configIDLE_SHOULD_YIELD 0
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Simple parallel port IO routines for the LED's
|
* Simple parallel port IO routines for the LED's
|
||||||
*-----------------------------------------------------------*/
|
*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#define partstNUM_LEDS 4
|
#define partstNUM_LEDS 4
|
||||||
|
@ -51,14 +51,14 @@ static GPIO_MAP xLEDMap[ partstNUM_LEDS ] =
|
||||||
{
|
{
|
||||||
{ ( GPIO_TypeDef * )GPIO1_BASE, GPIO_Pin_1, 0UL },
|
{ ( GPIO_TypeDef * )GPIO1_BASE, GPIO_Pin_1, 0UL },
|
||||||
{ ( GPIO_TypeDef * )GPIO0_BASE, GPIO_Pin_16, 0UL },
|
{ ( GPIO_TypeDef * )GPIO0_BASE, GPIO_Pin_16, 0UL },
|
||||||
{ ( GPIO_TypeDef * )GPIO2_BASE, GPIO_Pin_18, 0UL },
|
{ ( GPIO_TypeDef * )GPIO2_BASE, GPIO_Pin_18, 0UL },
|
||||||
{ ( GPIO_TypeDef * )GPIO2_BASE, GPIO_Pin_19, 0UL }
|
{ ( GPIO_TypeDef * )GPIO2_BASE, GPIO_Pin_19, 0UL }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vParTestInitialise( void )
|
void vParTestInitialise( void )
|
||||||
{
|
{
|
||||||
GPIO_InitTypeDef GPIO_InitStructure ;
|
GPIO_InitTypeDef GPIO_InitStructure ;
|
||||||
|
|
||||||
/* Configure the bits used to flash LED's on port 1 as output. */
|
/* Configure the bits used to flash LED's on port 1 as output. */
|
||||||
|
@ -97,7 +97,7 @@ void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GPIO_WriteBit( xLEDMap[ uxLED ].pxPort, xLEDMap[ uxLED ].ulPin, Bit_SET );
|
GPIO_WriteBit( xLEDMap[ uxLED ].pxPort, xLEDMap[ uxLED ].ulPin, Bit_SET );
|
||||||
xLEDMap[ uxLED ].ulValue = 1;
|
xLEDMap[ uxLED ].ulValue = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
@ -119,7 +119,7 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GPIO_WriteBit( xLEDMap[ uxLED ].pxPort, xLEDMap[ uxLED ].ulPin, Bit_SET );
|
GPIO_WriteBit( xLEDMap[ uxLED ].pxPort, xLEDMap[ uxLED ].ulPin, Bit_SET );
|
||||||
xLEDMap[ uxLED ].ulValue = 1;
|
xLEDMap[ uxLED ].ulValue = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port
|
||||||
xComPortHandle xReturn;
|
xComPortHandle xReturn;
|
||||||
UART_InitTypeDef UART_InitStructure;
|
UART_InitTypeDef UART_InitStructure;
|
||||||
GPIO_InitTypeDef GPIO_InitStructure;
|
GPIO_InitTypeDef GPIO_InitStructure;
|
||||||
EIC_IRQInitTypeDef EIC_IRQInitStructure;
|
EIC_IRQInitTypeDef EIC_IRQInitStructure;
|
||||||
|
|
||||||
/* Create the queues used to hold Rx and Tx characters. */
|
/* Create the queues used to hold Rx and Tx characters. */
|
||||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
|
@ -88,24 +88,24 @@ EIC_IRQInitTypeDef EIC_IRQInitStructure;
|
||||||
hardware. */
|
hardware. */
|
||||||
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
|
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
|
||||||
{
|
{
|
||||||
|
|
||||||
vConfigureQueues( xRxedChars, xCharsForTx, &xQueueEmpty );
|
vConfigureQueues( xRxedChars, xCharsForTx, &xQueueEmpty );
|
||||||
|
|
||||||
portENTER_CRITICAL();
|
portENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
/* Enable the UART0 Clock. */
|
/* Enable the UART0 Clock. */
|
||||||
MRCC_PeripheralClockConfig( MRCC_Peripheral_UART0, ENABLE );
|
MRCC_PeripheralClockConfig( MRCC_Peripheral_UART0, ENABLE );
|
||||||
|
|
||||||
/* Configure the UART0_Tx as alternate function */
|
/* Configure the UART0_Tx as alternate function */
|
||||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
|
||||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
|
||||||
GPIO_Init(GPIO0, &GPIO_InitStructure);
|
GPIO_Init(GPIO0, &GPIO_InitStructure);
|
||||||
|
|
||||||
/* Configure the UART0_Rx as input floating */
|
/* Configure the UART0_Rx as input floating */
|
||||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
||||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
|
||||||
GPIO_Init(GPIO0, &GPIO_InitStructure);
|
GPIO_Init(GPIO0, &GPIO_InitStructure);
|
||||||
|
|
||||||
/* Configure UART0. */
|
/* Configure UART0. */
|
||||||
UART_InitStructure.UART_WordLength = UART_WordLength_8D;
|
UART_InitStructure.UART_WordLength = UART_WordLength_8D;
|
||||||
UART_InitStructure.UART_StopBits = UART_StopBits_1;
|
UART_InitStructure.UART_StopBits = UART_StopBits_1;
|
||||||
|
@ -120,12 +120,12 @@ EIC_IRQInitTypeDef EIC_IRQInitStructure;
|
||||||
/* Enable the UART0 */
|
/* Enable the UART0 */
|
||||||
UART_Cmd(UART0, ENABLE);
|
UART_Cmd(UART0, ENABLE);
|
||||||
|
|
||||||
/* Configure the IEC for the UART interrupts. */
|
/* Configure the IEC for the UART interrupts. */
|
||||||
EIC_IRQInitStructure.EIC_IRQChannelCmd = ENABLE;
|
EIC_IRQInitStructure.EIC_IRQChannelCmd = ENABLE;
|
||||||
EIC_IRQInitStructure.EIC_IRQChannel = UART0_IRQChannel;
|
EIC_IRQInitStructure.EIC_IRQChannel = UART0_IRQChannel;
|
||||||
EIC_IRQInitStructure.EIC_IRQChannelPriority = 1;
|
EIC_IRQInitStructure.EIC_IRQChannelPriority = 1;
|
||||||
EIC_IRQInit(&EIC_IRQInitStructure);
|
EIC_IRQInit(&EIC_IRQInitStructure);
|
||||||
|
|
||||||
xQueueEmpty = pdTRUE;
|
xQueueEmpty = pdTRUE;
|
||||||
UART_ITConfig( UART0, UART_IT_Transmit | UART_IT_Receive, ENABLE );
|
UART_ITConfig( UART0, UART_IT_Transmit | UART_IT_Receive, ENABLE );
|
||||||
}
|
}
|
||||||
|
@ -201,13 +201,13 @@ portBASE_TYPE xReturn;
|
||||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xReturn = pdPASS;
|
xReturn = pdPASS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xQueueEmpty = pdFALSE;
|
xQueueEmpty = pdFALSE;
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
@ -226,4 +226,4 @@ void vSerialClose( xComPortHandle xPort )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -70,12 +70,12 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*pxQueueEmpty = pdTRUE;
|
*pxQueueEmpty = pdTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
UART_ClearITPendingBit( UART0, UART_IT_Transmit );
|
UART_ClearITPendingBit( UART0, UART_IT_Transmit );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( UART0->MIS & UART_IT_Receive )
|
if( UART0->MIS & UART_IT_Receive )
|
||||||
{
|
{
|
||||||
/* The interrupt was caused by a character being received. Grab the
|
/* The interrupt was caused by a character being received. Grab the
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
@ -53,9 +53,6 @@
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
#define configIDLE_SHOULD_YIELD 0
|
#define configIDLE_SHOULD_YIELD 0
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Simple parallel port IO routines for the LED's
|
* Simple parallel port IO routines for the LED's
|
||||||
*-----------------------------------------------------------*/
|
*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#define partstNUM_LEDS 4
|
#define partstNUM_LEDS 4
|
||||||
|
@ -51,14 +51,14 @@ static GPIO_MAP xLEDMap[ partstNUM_LEDS ] =
|
||||||
{
|
{
|
||||||
{ ( GPIO_TypeDef * )GPIO1_BASE, GPIO_Pin_1, 0UL },
|
{ ( GPIO_TypeDef * )GPIO1_BASE, GPIO_Pin_1, 0UL },
|
||||||
{ ( GPIO_TypeDef * )GPIO0_BASE, GPIO_Pin_16, 0UL },
|
{ ( GPIO_TypeDef * )GPIO0_BASE, GPIO_Pin_16, 0UL },
|
||||||
{ ( GPIO_TypeDef * )GPIO2_BASE, GPIO_Pin_18, 0UL },
|
{ ( GPIO_TypeDef * )GPIO2_BASE, GPIO_Pin_18, 0UL },
|
||||||
{ ( GPIO_TypeDef * )GPIO2_BASE, GPIO_Pin_19, 0UL }
|
{ ( GPIO_TypeDef * )GPIO2_BASE, GPIO_Pin_19, 0UL }
|
||||||
};
|
};
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vParTestInitialise( void )
|
void vParTestInitialise( void )
|
||||||
{
|
{
|
||||||
GPIO_InitTypeDef GPIO_InitStructure ;
|
GPIO_InitTypeDef GPIO_InitStructure ;
|
||||||
|
|
||||||
/* Configure the bits used to flash LED's on port 1 as output. */
|
/* Configure the bits used to flash LED's on port 1 as output. */
|
||||||
|
@ -97,7 +97,7 @@ void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GPIO_WriteBit( xLEDMap[ uxLED ].pxPort, xLEDMap[ uxLED ].ulPin, Bit_SET );
|
GPIO_WriteBit( xLEDMap[ uxLED ].pxPort, xLEDMap[ uxLED ].ulPin, Bit_SET );
|
||||||
xLEDMap[ uxLED ].ulValue = 1;
|
xLEDMap[ uxLED ].ulValue = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
@ -119,7 +119,7 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GPIO_WriteBit( xLEDMap[ uxLED ].pxPort, xLEDMap[ uxLED ].ulPin, Bit_SET );
|
GPIO_WriteBit( xLEDMap[ uxLED ].pxPort, xLEDMap[ uxLED ].ulPin, Bit_SET );
|
||||||
xLEDMap[ uxLED ].ulValue = 1;
|
xLEDMap[ uxLED ].ulValue = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port
|
||||||
xComPortHandle xReturn;
|
xComPortHandle xReturn;
|
||||||
UART_InitTypeDef UART_InitStructure;
|
UART_InitTypeDef UART_InitStructure;
|
||||||
GPIO_InitTypeDef GPIO_InitStructure;
|
GPIO_InitTypeDef GPIO_InitStructure;
|
||||||
EIC_IRQInitTypeDef EIC_IRQInitStructure;
|
EIC_IRQInitTypeDef EIC_IRQInitStructure;
|
||||||
|
|
||||||
/* Create the queues used to hold Rx and Tx characters. */
|
/* Create the queues used to hold Rx and Tx characters. */
|
||||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||||
|
@ -82,17 +82,17 @@ EIC_IRQInitTypeDef EIC_IRQInitStructure;
|
||||||
{
|
{
|
||||||
/* Enable the UART0 Clock. */
|
/* Enable the UART0 Clock. */
|
||||||
MRCC_PeripheralClockConfig( MRCC_Peripheral_UART0, ENABLE );
|
MRCC_PeripheralClockConfig( MRCC_Peripheral_UART0, ENABLE );
|
||||||
|
|
||||||
/* Configure the UART0_Tx as alternate function */
|
/* Configure the UART0_Tx as alternate function */
|
||||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
|
||||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
|
||||||
GPIO_Init(GPIO0, &GPIO_InitStructure);
|
GPIO_Init(GPIO0, &GPIO_InitStructure);
|
||||||
|
|
||||||
/* Configure the UART0_Rx as input floating */
|
/* Configure the UART0_Rx as input floating */
|
||||||
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
|
||||||
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
|
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
|
||||||
GPIO_Init(GPIO0, &GPIO_InitStructure);
|
GPIO_Init(GPIO0, &GPIO_InitStructure);
|
||||||
|
|
||||||
/* Configure UART0. */
|
/* Configure UART0. */
|
||||||
UART_InitStructure.UART_WordLength = UART_WordLength_8D;
|
UART_InitStructure.UART_WordLength = UART_WordLength_8D;
|
||||||
UART_InitStructure.UART_StopBits = UART_StopBits_1;
|
UART_InitStructure.UART_StopBits = UART_StopBits_1;
|
||||||
|
@ -107,12 +107,12 @@ EIC_IRQInitTypeDef EIC_IRQInitStructure;
|
||||||
/* Enable the UART0 */
|
/* Enable the UART0 */
|
||||||
UART_Cmd(UART0, ENABLE);
|
UART_Cmd(UART0, ENABLE);
|
||||||
|
|
||||||
/* Configure the IEC for the UART interrupts. */
|
/* Configure the IEC for the UART interrupts. */
|
||||||
EIC_IRQInitStructure.EIC_IRQChannelCmd = ENABLE;
|
EIC_IRQInitStructure.EIC_IRQChannelCmd = ENABLE;
|
||||||
EIC_IRQInitStructure.EIC_IRQChannel = UART0_IRQChannel;
|
EIC_IRQInitStructure.EIC_IRQChannel = UART0_IRQChannel;
|
||||||
EIC_IRQInitStructure.EIC_IRQChannelPriority = 1;
|
EIC_IRQInitStructure.EIC_IRQChannelPriority = 1;
|
||||||
EIC_IRQInit(&EIC_IRQInitStructure);
|
EIC_IRQInit(&EIC_IRQInitStructure);
|
||||||
|
|
||||||
xQueueEmpty = pdTRUE;
|
xQueueEmpty = pdTRUE;
|
||||||
UART_ITConfig( UART0, UART_IT_Transmit | UART_IT_Receive, ENABLE );
|
UART_ITConfig( UART0, UART_IT_Transmit | UART_IT_Receive, ENABLE );
|
||||||
}
|
}
|
||||||
|
@ -188,13 +188,13 @@ portBASE_TYPE xReturn;
|
||||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||||
{
|
{
|
||||||
xReturn = pdFAIL;
|
xReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xReturn = pdPASS;
|
xReturn = pdPASS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xQueueEmpty = pdFALSE;
|
xQueueEmpty = pdFALSE;
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
@ -228,12 +228,12 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xQueueEmpty = pdTRUE;
|
xQueueEmpty = pdTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
UART_ClearITPendingBit( UART0, UART_IT_Transmit );
|
UART_ClearITPendingBit( UART0, UART_IT_Transmit );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( UART0->MIS & UART_IT_Receive )
|
if( UART0->MIS & UART_IT_Receive )
|
||||||
{
|
{
|
||||||
/* The interrupt was caused by a character being received. Grab the
|
/* The interrupt was caused by a character being received. Grab the
|
||||||
|
@ -254,4 +254,4 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -52,7 +52,6 @@
|
||||||
#define configUSE_TRACE_FACILITY 0
|
#define configUSE_TRACE_FACILITY 0
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
#define configIDLE_SHOULD_YIELD 0
|
#define configIDLE_SHOULD_YIELD 0
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configUSE_MUTEXES 1
|
#define configUSE_MUTEXES 1
|
||||||
#define configCHECK_FOR_STACK_OVERFLOW 0
|
#define configCHECK_FOR_STACK_OVERFLOW 0
|
||||||
#define configUSE_RECURSIVE_MUTEXES 1
|
#define configUSE_RECURSIVE_MUTEXES 1
|
||||||
|
@ -60,7 +59,6 @@
|
||||||
#define configUSE_COUNTING_SEMAPHORES 1
|
#define configUSE_COUNTING_SEMAPHORES 1
|
||||||
|
|
||||||
#define configMAX_PRIORITIES ( 6 )
|
#define configMAX_PRIORITIES ( 6 )
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
*-----------------------------------------------------------*/
|
*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vParTestInitialise( void )
|
void vParTestInitialise( void )
|
||||||
{
|
{
|
||||||
unsigned long ul;
|
unsigned long ul;
|
||||||
|
|
||||||
for( ul = 0; ul < partstNUM_LEDS; ul++ )
|
for( ul = 0; ul < partstNUM_LEDS; ul++ )
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ xComPortHandle xReturn = serHANDLE;
|
||||||
hardware. */
|
hardware. */
|
||||||
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
|
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
|
||||||
{
|
{
|
||||||
PMC_EnablePeripheral( AT91C_ID_US0 );
|
PMC_EnablePeripheral( AT91C_ID_US0 );
|
||||||
portENTER_CRITICAL();
|
portENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
USART_Configure( serCOM0, ( AT91C_US_CHRL_8_BITS | AT91C_US_PAR_NONE ), ulWantedBaud, configCPU_CLOCK_HZ );
|
USART_Configure( serCOM0, ( AT91C_US_CHRL_8_BITS | AT91C_US_PAR_NONE ), ulWantedBaud, configCPU_CLOCK_HZ );
|
||||||
|
@ -164,7 +164,7 @@ signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar
|
||||||
{
|
{
|
||||||
/* Just to remove compiler warning. */
|
/* Just to remove compiler warning. */
|
||||||
( void ) pxPort;
|
( void ) pxPort;
|
||||||
|
|
||||||
/* Place the character in the queue of characters to be transmitted. */
|
/* Place the character in the queue of characters to be transmitted. */
|
||||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||||
{
|
{
|
||||||
|
@ -215,7 +215,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
{
|
{
|
||||||
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
||||||
vInterruptOff();
|
vInterruptOff();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ulStatus & AT91C_US_RXRDY )
|
if( ulStatus & AT91C_US_RXRDY )
|
||||||
|
@ -238,4 +238,4 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
@ -73,9 +73,6 @@
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
#define configIDLE_SHOULD_YIELD 1
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 0
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 0 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
@ -56,10 +56,6 @@
|
||||||
#define configUSE_16_BIT_TICKS 1
|
#define configUSE_16_BIT_TICKS 1
|
||||||
#define configIDLE_SHOULD_YIELD 1
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 1
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Changes from V2.0.0
|
Changes from V2.0.0
|
||||||
|
|
||||||
+ Use scheduler suspends in place of critical sections.
|
+ Use scheduler suspends in place of critical sections.
|
||||||
|
@ -110,7 +110,7 @@ unsigned char ucBit;
|
||||||
|
|
||||||
PORTB = ucCurrentOutputValue;
|
PORTB = ucCurrentOutputValue;
|
||||||
}
|
}
|
||||||
xTaskResumeAll();
|
xTaskResumeAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Changes from V1.2.0
|
Changes from V1.2.0
|
||||||
|
|
||||||
+ Changed the baud rate for the serial test from 19200 to 57600.
|
+ Changed the baud rate for the serial test from 19200 to 57600.
|
||||||
|
|
||||||
Changes from V1.2.3
|
Changes from V1.2.3
|
||||||
|
@ -71,10 +71,6 @@ Changes from V2.2.0
|
||||||
Changes from V2.6.1
|
Changes from V2.6.1
|
||||||
|
|
||||||
+ The IAR and WinAVR AVR ports are now maintained separately.
|
+ The IAR and WinAVR AVR ports are now maintained separately.
|
||||||
|
|
||||||
Changes from V4.0.5
|
|
||||||
|
|
||||||
+ Modified to demonstrate the use of co-routines.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -88,14 +84,12 @@ Changes from V4.0.5
|
||||||
/* Scheduler include files. */
|
/* Scheduler include files. */
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "croutine.h"
|
|
||||||
|
|
||||||
/* Demo file headers. */
|
/* Demo file headers. */
|
||||||
#include "PollQ.h"
|
#include "PollQ.h"
|
||||||
#include "integer.h"
|
#include "integer.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "comtest.h"
|
#include "comtest.h"
|
||||||
#include "crflash.h"
|
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
#include "regtest.h"
|
#include "regtest.h"
|
||||||
|
@ -127,9 +121,6 @@ again. */
|
||||||
the demo application is not unexpectedly resetting. */
|
the demo application is not unexpectedly resetting. */
|
||||||
#define mainRESET_COUNT_ADDRESS ( ( void * ) 0x50 )
|
#define mainRESET_COUNT_ADDRESS ( ( void * ) 0x50 )
|
||||||
|
|
||||||
/* The number of coroutines to create. */
|
|
||||||
#define mainNUM_FLASH_COROUTINES ( 3 )
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The task function for the "Check" task.
|
* The task function for the "Check" task.
|
||||||
*/
|
*/
|
||||||
|
@ -148,9 +139,9 @@ static void prvCheckOtherTasksAreStillRunning( void );
|
||||||
static void prvIncrementResetCount( void );
|
static void prvIncrementResetCount( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Idle hook is used to scheduler co-routines.
|
* Idle hook (empty)
|
||||||
*/
|
*/
|
||||||
void vApplicationIdleHook( void );
|
void vApplicationIdleHook( void );
|
||||||
|
|
||||||
short main( void )
|
short main( void )
|
||||||
{
|
{
|
||||||
|
@ -164,13 +155,10 @@ short main( void )
|
||||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||||
vStartRegTestTasks();
|
vStartRegTestTasks();
|
||||||
|
|
||||||
/* Create the tasks defined within this file. */
|
/* Create the tasks defined within this file. */
|
||||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
/* Create the co-routines that flash the LED's. */
|
|
||||||
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
|
|
||||||
|
|
||||||
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
||||||
as 1 in portmacro.h. To use the cooperative scheduler define
|
as 1 in portmacro.h. To use the cooperative scheduler define
|
||||||
configUSE_PREEMPTION as 0. */
|
configUSE_PREEMPTION as 0. */
|
||||||
|
@ -197,7 +185,7 @@ static volatile unsigned long ulDummyVariable = 3UL;
|
||||||
integer tasks get some exercise. The result here is not important -
|
integer tasks get some exercise. The result here is not important -
|
||||||
see the demo application documentation for more info. */
|
see the demo application documentation for more info. */
|
||||||
ulDummyVariable *= 3;
|
ulDummyVariable *= 3;
|
||||||
|
|
||||||
prvCheckOtherTasksAreStillRunning();
|
prvCheckOtherTasksAreStillRunning();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,7 +214,7 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE;
|
||||||
{
|
{
|
||||||
xErrorHasOccurred = pdTRUE;
|
xErrorHasOccurred = pdTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xErrorHasOccurred == pdFALSE )
|
if( xErrorHasOccurred == pdFALSE )
|
||||||
{
|
{
|
||||||
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
||||||
|
@ -244,20 +232,20 @@ const unsigned char ucWrite1 = ( unsigned char ) 0x04;
|
||||||
const unsigned char ucWrite2 = ( unsigned char ) 0x02;
|
const unsigned char ucWrite2 = ( unsigned char ) 0x02;
|
||||||
|
|
||||||
/* Increment the EEPROM value at 0x00.
|
/* Increment the EEPROM value at 0x00.
|
||||||
|
|
||||||
Setup the EEPROM address. */
|
Setup the EEPROM address. */
|
||||||
EEARH = 0x00;
|
EEARH = 0x00;
|
||||||
EEARL = 0x00;
|
EEARL = 0x00;
|
||||||
|
|
||||||
/* Set the read enable bit. */
|
/* Set the read enable bit. */
|
||||||
EECR |= ucReadBit;
|
EECR |= ucReadBit;
|
||||||
|
|
||||||
/* Wait for the read. */
|
/* Wait for the read. */
|
||||||
while( EECR & ucReadBit );
|
while( EECR & ucReadBit );
|
||||||
|
|
||||||
/* The byte is ready. */
|
/* The byte is ready. */
|
||||||
ucCount = EEDR;
|
ucCount = EEDR;
|
||||||
|
|
||||||
/* Increment the reset count, then write the byte back. */
|
/* Increment the reset count, then write the byte back. */
|
||||||
ucCount++;
|
ucCount++;
|
||||||
EEDR = ucCount;
|
EEDR = ucCount;
|
||||||
|
@ -268,6 +256,5 @@ const unsigned char ucWrite2 = ( unsigned char ) 0x02;
|
||||||
|
|
||||||
void vApplicationIdleHook( void )
|
void vApplicationIdleHook( void )
|
||||||
{
|
{
|
||||||
vCoRoutineSchedule();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ portBASE_TYPE xRegTestError = pdFALSE;
|
||||||
void vStartRegTestTasks( void )
|
void vStartRegTestTasks( void )
|
||||||
{
|
{
|
||||||
xTaskCreate( prvRegisterCheck1, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
xTaskCreate( prvRegisterCheck1, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||||
xTaskCreate( prvRegisterCheck2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
xTaskCreate( prvRegisterCheck2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ portBASE_TYPE xReturn;
|
||||||
{
|
{
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -75,7 +75,7 @@ static void prvRegisterCheck1( void *pvParameters )
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
asm( "LDI r31, 5" );
|
asm( "LDI r31, 5" );
|
||||||
asm( "MOV r0, r31" );
|
asm( "MOV r0, r31" );
|
||||||
asm( "LDI r31, 6" );
|
asm( "LDI r31, 6" );
|
||||||
asm( "MOV r1, r31" );
|
asm( "MOV r1, r31" );
|
||||||
|
@ -218,7 +218,7 @@ static void prvRegisterCheck2( void *pvParameters )
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
asm( "LDI r31, 1" );
|
asm( "LDI r31, 1" );
|
||||||
asm( "MOV r0, r31" );
|
asm( "MOV r0, r31" );
|
||||||
asm( "LDI r31, 2" );
|
asm( "LDI r31, 2" );
|
||||||
asm( "MOV r1, r31" );
|
asm( "MOV r1, r31" );
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -971,9 +971,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\crflash.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_1.c</name>
|
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_1.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -998,9 +995,6 @@
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<name>Kernel Source</name>
|
<name>Kernel Source</name>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\..\Source\croutine.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\list.c</name>
|
<name>$PROJ_DIR$\..\..\Source\list.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -1018,5 +1012,3 @@
|
||||||
</file>
|
</file>
|
||||||
</group>
|
</group>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ static QueueHandle_t xCharsForTx;
|
||||||
ucByte = UCSRB; \
|
ucByte = UCSRB; \
|
||||||
ucByte |= serTX_INT_ENABLE; \
|
ucByte |= serTX_INT_ENABLE; \
|
||||||
outb( UCSRB, ucByte ); \
|
outb( UCSRB, ucByte ); \
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#define vInterruptOff() \
|
#define vInterruptOff() \
|
||||||
|
@ -84,12 +84,12 @@ unsigned char ucByte;
|
||||||
data sheet. */
|
data sheet. */
|
||||||
ulBaudRateCounter = ( configCPU_CLOCK_HZ / ( serBAUD_DIV_CONSTANT * ulWantedBaud ) ) - ( unsigned long ) 1;
|
ulBaudRateCounter = ( configCPU_CLOCK_HZ / ( serBAUD_DIV_CONSTANT * ulWantedBaud ) ) - ( unsigned long ) 1;
|
||||||
|
|
||||||
/* Set the baud rate. */
|
/* Set the baud rate. */
|
||||||
ucByte = ( unsigned char ) ( ulBaudRateCounter & ( unsigned long ) 0xff );
|
ucByte = ( unsigned char ) ( ulBaudRateCounter & ( unsigned long ) 0xff );
|
||||||
outb( UBRRL, ucByte );
|
outb( UBRRL, ucByte );
|
||||||
|
|
||||||
ulBaudRateCounter >>= ( unsigned long ) 8;
|
ulBaudRateCounter >>= ( unsigned long ) 8;
|
||||||
ucByte = ( unsigned char ) ( ulBaudRateCounter & ( unsigned long ) 0xff );
|
ucByte = ( unsigned char ) ( ulBaudRateCounter & ( unsigned long ) 0xff );
|
||||||
outb( UBRRH, ucByte );
|
outb( UBRRH, ucByte );
|
||||||
|
|
||||||
/* Enable the Rx interrupt. The Tx interrupt will get enabled
|
/* Enable the Rx interrupt. The Tx interrupt will get enabled
|
||||||
|
@ -100,7 +100,7 @@ unsigned char ucByte;
|
||||||
outb( UCSRC, serUCSRC_SELECT | serEIGHT_DATA_BITS );
|
outb( UCSRC, serUCSRC_SELECT | serEIGHT_DATA_BITS );
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
|
||||||
/* Unlike other ports, this serial code does not allow for more than one
|
/* Unlike other ports, this serial code does not allow for more than one
|
||||||
com port. We therefore don't return a pointer to a port structure and can
|
com port. We therefore don't return a pointer to a port structure and can
|
||||||
instead just return NULL. */
|
instead just return NULL. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
@ -55,10 +55,6 @@
|
||||||
#define configIDLE_SHOULD_YIELD 1
|
#define configIDLE_SHOULD_YIELD 1
|
||||||
#define configQUEUE_REGISTRY_SIZE 0
|
#define configQUEUE_REGISTRY_SIZE 0
|
||||||
|
|
||||||
/* Co-routine definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 1
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
|
||||||
|
|
||||||
/* Set the following definitions to 1 to include the API function, or zero
|
/* Set the following definitions to 1 to include the API function, or zero
|
||||||
to exclude the API function. */
|
to exclude the API function. */
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Changes from V2.0.0
|
Changes from V2.0.0
|
||||||
|
|
||||||
+ Use scheduler suspends in place of critical sections.
|
+ Use scheduler suspends in place of critical sections.
|
||||||
|
@ -39,6 +39,7 @@ Changes from V2.6.0
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
|
#include <avr/io.h>
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Simple parallel port IO routines.
|
* Simple parallel port IO routines.
|
||||||
|
@ -68,7 +69,7 @@ unsigned char ucBit = ( unsigned char ) 1;
|
||||||
|
|
||||||
if( uxLED <= partstMAX_OUTPUT_LED )
|
if( uxLED <= partstMAX_OUTPUT_LED )
|
||||||
{
|
{
|
||||||
ucBit <<= uxLED;
|
ucBit <<= uxLED;
|
||||||
|
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
{
|
{
|
||||||
|
@ -110,7 +111,7 @@ unsigned char ucBit;
|
||||||
|
|
||||||
PORTB = ucCurrentOutputValue;
|
PORTB = ucCurrentOutputValue;
|
||||||
}
|
}
|
||||||
xTaskResumeAll();
|
xTaskResumeAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -68,10 +68,6 @@ Changes from V2.6.1
|
||||||
|
|
||||||
+ The IAR and WinAVR AVR ports are now maintained separately.
|
+ The IAR and WinAVR AVR ports are now maintained separately.
|
||||||
|
|
||||||
Changes from V4.0.5
|
|
||||||
|
|
||||||
+ Modified to demonstrate the use of co-routines.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -85,14 +81,12 @@ Changes from V4.0.5
|
||||||
/* Scheduler include files. */
|
/* Scheduler include files. */
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "croutine.h"
|
|
||||||
|
|
||||||
/* Demo file headers. */
|
/* Demo file headers. */
|
||||||
#include "PollQ.h"
|
#include "PollQ.h"
|
||||||
#include "integer.h"
|
#include "integer.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "comtest.h"
|
#include "comtest.h"
|
||||||
#include "crflash.h"
|
|
||||||
#include "print.h"
|
#include "print.h"
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
#include "regtest.h"
|
#include "regtest.h"
|
||||||
|
@ -124,9 +118,6 @@ again. */
|
||||||
the demo application is not unexpectedly resetting. */
|
the demo application is not unexpectedly resetting. */
|
||||||
#define mainRESET_COUNT_ADDRESS ( ( void * ) 0x50 )
|
#define mainRESET_COUNT_ADDRESS ( ( void * ) 0x50 )
|
||||||
|
|
||||||
/* The number of coroutines to create. */
|
|
||||||
#define mainNUM_FLASH_COROUTINES ( 3 )
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The task function for the "Check" task.
|
* The task function for the "Check" task.
|
||||||
*/
|
*/
|
||||||
|
@ -145,7 +136,7 @@ static void prvCheckOtherTasksAreStillRunning( void );
|
||||||
static void prvIncrementResetCount( void );
|
static void prvIncrementResetCount( void );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The idle hook is used to scheduler co-routines.
|
* The idle hook is unused.
|
||||||
*/
|
*/
|
||||||
void vApplicationIdleHook( void );
|
void vApplicationIdleHook( void );
|
||||||
|
|
||||||
|
@ -167,9 +158,6 @@ short main( void )
|
||||||
/* Create the tasks defined within this file. */
|
/* Create the tasks defined within this file. */
|
||||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
/* Create the co-routines that flash the LED's. */
|
|
||||||
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
|
|
||||||
|
|
||||||
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
||||||
as 1 in portmacro.h. To use the cooperative scheduler define
|
as 1 in portmacro.h. To use the cooperative scheduler define
|
||||||
configUSE_PREEMPTION as 0. */
|
configUSE_PREEMPTION as 0. */
|
||||||
|
@ -247,6 +235,5 @@ unsigned char ucCount;
|
||||||
|
|
||||||
void vApplicationIdleHook( void )
|
void vApplicationIdleHook( void )
|
||||||
{
|
{
|
||||||
vCoRoutineSchedule();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# WinAVR Sample makefile written by Eric B. Weddington, Jörg Wunsch, et al.
|
# WinAVR Sample makefile written by Eric B. Weddington, J<EFBFBD>rg Wunsch, et al.
|
||||||
# Released to the Public Domain
|
# Released to the Public Domain
|
||||||
# Please read the make user manual!
|
# Please read the make user manual!
|
||||||
#
|
#
|
||||||
|
@ -57,10 +57,8 @@ regtest.c \
|
||||||
$(SOURCE_DIR)/tasks.c \
|
$(SOURCE_DIR)/tasks.c \
|
||||||
$(SOURCE_DIR)/queue.c \
|
$(SOURCE_DIR)/queue.c \
|
||||||
$(SOURCE_DIR)/list.c \
|
$(SOURCE_DIR)/list.c \
|
||||||
$(SOURCE_DIR)/croutine.c \
|
|
||||||
$(SOURCE_DIR)/portable/MemMang/heap_1.c \
|
$(SOURCE_DIR)/portable/MemMang/heap_1.c \
|
||||||
$(PORT_DIR)/port.c \
|
$(PORT_DIR)/port.c \
|
||||||
$(DEMO_DIR)/crflash.c \
|
|
||||||
$(DEMO_DIR)/integer.c \
|
$(DEMO_DIR)/integer.c \
|
||||||
$(DEMO_DIR)/PollQ.c \
|
$(DEMO_DIR)/PollQ.c \
|
||||||
$(DEMO_DIR)/comtest.c
|
$(DEMO_DIR)/comtest.c
|
||||||
|
@ -83,12 +81,12 @@ $(DEMO_DIR)/comtest.c
|
||||||
# Even though the DOS/Win* filesystem matches both .s and .S the same,
|
# Even though the DOS/Win* filesystem matches both .s and .S the same,
|
||||||
# it will preserve the spelling of the filenames, and gcc itself does
|
# it will preserve the spelling of the filenames, and gcc itself does
|
||||||
# care about how the name is spelled on its command-line.
|
# care about how the name is spelled on its command-line.
|
||||||
ASRC =
|
ASRC =
|
||||||
|
|
||||||
|
|
||||||
# List any extra directories to look for include files here.
|
# List any extra directories to look for include files here.
|
||||||
# Each directory must be seperated by a space.
|
# Each directory must be seperated by a space.
|
||||||
EXTRAINCDIRS =
|
EXTRAINCDIRS =
|
||||||
|
|
||||||
|
|
||||||
# Optional compiler flags.
|
# Optional compiler flags.
|
||||||
|
@ -128,7 +126,7 @@ CFLAGS += -std=gnu99
|
||||||
# for use in COFF files, additional information about filenames
|
# for use in COFF files, additional information about filenames
|
||||||
# and function names needs to be present in the assembler source
|
# and function names needs to be present in the assembler source
|
||||||
# files -- see avr-libc docs [FIXME: not yet described there]
|
# files -- see avr-libc docs [FIXME: not yet described there]
|
||||||
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,7 +154,7 @@ LDFLAGS += -lm
|
||||||
|
|
||||||
# Programming support using avrdude. Settings and variables.
|
# Programming support using avrdude. Settings and variables.
|
||||||
|
|
||||||
# Programming hardware: alf avr910 avrisp bascom bsd
|
# Programming hardware: alf avr910 avrisp bascom bsd
|
||||||
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
|
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
|
||||||
#
|
#
|
||||||
# Type: avrdude -c ?
|
# Type: avrdude -c ?
|
||||||
|
@ -183,7 +181,7 @@ AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
|
||||||
#AVRDUDE_FLAGS += -V
|
#AVRDUDE_FLAGS += -V
|
||||||
|
|
||||||
# Increase verbosity level. Please use this when submitting bug
|
# Increase verbosity level. Please use this when submitting bug
|
||||||
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
|
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
|
||||||
# to submit bug reports.
|
# to submit bug reports.
|
||||||
#AVRDUDE_FLAGS += -v -v
|
#AVRDUDE_FLAGS += -v -v
|
||||||
|
|
||||||
|
@ -227,7 +225,7 @@ ELFSIZE = $(SIZE) -A $(TARGET).elf
|
||||||
MSG_ERRORS_NONE = Errors: none
|
MSG_ERRORS_NONE = Errors: none
|
||||||
MSG_BEGIN = -------- begin --------
|
MSG_BEGIN = -------- begin --------
|
||||||
MSG_END = -------- end --------
|
MSG_END = -------- end --------
|
||||||
MSG_SIZE_BEFORE = Size before:
|
MSG_SIZE_BEFORE = Size before:
|
||||||
MSG_SIZE_AFTER = Size after:
|
MSG_SIZE_AFTER = Size after:
|
||||||
MSG_COFF = Converting to AVR COFF:
|
MSG_COFF = Converting to AVR COFF:
|
||||||
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
|
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
|
||||||
|
@ -244,7 +242,7 @@ MSG_CLEANING = Cleaning project:
|
||||||
|
|
||||||
|
|
||||||
# Define all object files.
|
# Define all object files.
|
||||||
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
|
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
|
||||||
|
|
||||||
# Define all listing files.
|
# Define all listing files.
|
||||||
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
|
LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
|
||||||
|
@ -286,7 +284,7 @@ sizeafter:
|
||||||
|
|
||||||
|
|
||||||
# Display compiler version information.
|
# Display compiler version information.
|
||||||
gccversion :
|
gccversion :
|
||||||
@$(CC) --version
|
@$(CC) --version
|
||||||
|
|
||||||
|
|
||||||
|
@ -298,7 +296,7 @@ COFFCONVERT=$(OBJCOPY) --debugging \
|
||||||
--change-section-address .data-0x800000 \
|
--change-section-address .data-0x800000 \
|
||||||
--change-section-address .bss-0x800000 \
|
--change-section-address .bss-0x800000 \
|
||||||
--change-section-address .noinit-0x800000 \
|
--change-section-address .noinit-0x800000 \
|
||||||
--change-section-address .eeprom-0x810000
|
--change-section-address .eeprom-0x810000
|
||||||
|
|
||||||
|
|
||||||
coff: $(TARGET).elf
|
coff: $(TARGET).elf
|
||||||
|
@ -315,7 +313,7 @@ extcoff: $(TARGET).elf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Program the device.
|
# Program the device.
|
||||||
program: $(TARGET).hex $(TARGET).eep
|
program: $(TARGET).hex $(TARGET).eep
|
||||||
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
|
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
|
||||||
|
|
||||||
|
@ -324,26 +322,26 @@ program: $(TARGET).hex $(TARGET).eep
|
||||||
|
|
||||||
# Create final output files (.hex, .eep) from ELF output file.
|
# Create final output files (.hex, .eep) from ELF output file.
|
||||||
%.hex: %.elf
|
%.hex: %.elf
|
||||||
@echo
|
@echo
|
||||||
@echo $(MSG_FLASH) $@
|
@echo $(MSG_FLASH) $@
|
||||||
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
||||||
|
|
||||||
%.eep: %.elf
|
%.eep: %.elf
|
||||||
@echo
|
@echo
|
||||||
@echo $(MSG_EEPROM) $@
|
@echo $(MSG_EEPROM) $@
|
||||||
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
|
||||||
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
||||||
|
|
||||||
# Create extended listing file from ELF output file.
|
# Create extended listing file from ELF output file.
|
||||||
%.lss: %.elf
|
%.lss: %.elf
|
||||||
@echo
|
@echo
|
||||||
@echo $(MSG_EXTENDED_LISTING) $@
|
@echo $(MSG_EXTENDED_LISTING) $@
|
||||||
$(OBJDUMP) -h -S $< > $@
|
$(OBJDUMP) -h -S $< > $@
|
||||||
|
|
||||||
# Create a symbol table from ELF output file.
|
# Create a symbol table from ELF output file.
|
||||||
%.sym: %.elf
|
%.sym: %.elf
|
||||||
@echo
|
@echo
|
||||||
@echo $(MSG_SYMBOL_TABLE) $@
|
@echo $(MSG_SYMBOL_TABLE) $@
|
||||||
avr-nm -n $< > $@
|
avr-nm -n $< > $@
|
||||||
|
|
||||||
|
|
||||||
|
@ -384,8 +382,8 @@ program: $(TARGET).hex $(TARGET).eep
|
||||||
clean: begin clean_list finished end
|
clean: begin clean_list finished end
|
||||||
|
|
||||||
clean_list :
|
clean_list :
|
||||||
@echo
|
@echo
|
||||||
@echo $(MSG_CLEANING)
|
@echo $(MSG_CLEANING)
|
||||||
$(REMOVE) $(TARGET).hex
|
$(REMOVE) $(TARGET).hex
|
||||||
$(REMOVE) $(TARGET).eep
|
$(REMOVE) $(TARGET).eep
|
||||||
$(REMOVE) $(TARGET).obj
|
$(REMOVE) $(TARGET).obj
|
||||||
|
@ -403,8 +401,8 @@ clean_list :
|
||||||
$(REMOVE) $(SRC:.c=.d)
|
$(REMOVE) $(SRC:.c=.d)
|
||||||
|
|
||||||
|
|
||||||
# Automatically generate C source code dependencies.
|
# Automatically generate C source code dependencies.
|
||||||
# (Code originally taken from the GNU make user manual and modified
|
# (Code originally taken from the GNU make user manual and modified
|
||||||
# (See README.txt Credits).)
|
# (See README.txt Credits).)
|
||||||
#
|
#
|
||||||
# Note that this will work with sh (bash) and sed that is shipped with WinAVR
|
# Note that this will work with sh (bash) and sed that is shipped with WinAVR
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Changes from V1.2.3
|
Changes from V1.2.3
|
||||||
|
|
||||||
+ The function xPortInitMinimal() has been renamed to
|
+ The function xPortInitMinimal() has been renamed to
|
||||||
xSerialPortInitMinimal() and the function xPortInit() has been renamed
|
xSerialPortInitMinimal() and the function xPortInit() has been renamed
|
||||||
to xSerialPortInit().
|
to xSerialPortInit().
|
||||||
|
|
||||||
|
@ -66,8 +66,8 @@ Changes from V2.6.0
|
||||||
#define serUCSRC_SELECT ( ( unsigned char ) 0x80 )
|
#define serUCSRC_SELECT ( ( unsigned char ) 0x80 )
|
||||||
#define serEIGHT_DATA_BITS ( ( unsigned char ) 0x06 )
|
#define serEIGHT_DATA_BITS ( ( unsigned char ) 0x06 )
|
||||||
|
|
||||||
static QueueHandle_t xRxedChars;
|
static QueueHandle_t xRxedChars;
|
||||||
static QueueHandle_t xCharsForTx;
|
static QueueHandle_t xCharsForTx;
|
||||||
|
|
||||||
#define vInterruptOn() \
|
#define vInterruptOn() \
|
||||||
{ \
|
{ \
|
||||||
|
@ -76,7 +76,7 @@ static QueueHandle_t xCharsForTx;
|
||||||
ucByte = UCSRB; \
|
ucByte = UCSRB; \
|
||||||
ucByte |= serTX_INT_ENABLE; \
|
ucByte |= serTX_INT_ENABLE; \
|
||||||
UCSRB = ucByte; \
|
UCSRB = ucByte; \
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
#define vInterruptOff() \
|
#define vInterruptOff() \
|
||||||
|
@ -104,12 +104,12 @@ unsigned char ucByte;
|
||||||
data sheet. */
|
data sheet. */
|
||||||
ulBaudRateCounter = ( configCPU_CLOCK_HZ / ( serBAUD_DIV_CONSTANT * ulWantedBaud ) ) - ( unsigned long ) 1;
|
ulBaudRateCounter = ( configCPU_CLOCK_HZ / ( serBAUD_DIV_CONSTANT * ulWantedBaud ) ) - ( unsigned long ) 1;
|
||||||
|
|
||||||
/* Set the baud rate. */
|
/* Set the baud rate. */
|
||||||
ucByte = ( unsigned char ) ( ulBaudRateCounter & ( unsigned long ) 0xff );
|
ucByte = ( unsigned char ) ( ulBaudRateCounter & ( unsigned long ) 0xff );
|
||||||
UBRRL = ucByte;
|
UBRRL = ucByte;
|
||||||
|
|
||||||
ulBaudRateCounter >>= ( unsigned long ) 8;
|
ulBaudRateCounter >>= ( unsigned long ) 8;
|
||||||
ucByte = ( unsigned char ) ( ulBaudRateCounter & ( unsigned long ) 0xff );
|
ucByte = ( unsigned char ) ( ulBaudRateCounter & ( unsigned long ) 0xff );
|
||||||
UBRRH = ucByte;
|
UBRRH = ucByte;
|
||||||
|
|
||||||
/* Enable the Rx interrupt. The Tx interrupt will get enabled
|
/* Enable the Rx interrupt. The Tx interrupt will get enabled
|
||||||
|
@ -120,7 +120,7 @@ unsigned char ucByte;
|
||||||
UCSRC = ( serUCSRC_SELECT | serEIGHT_DATA_BITS );
|
UCSRC = ( serUCSRC_SELECT | serEIGHT_DATA_BITS );
|
||||||
}
|
}
|
||||||
portEXIT_CRITICAL();
|
portEXIT_CRITICAL();
|
||||||
|
|
||||||
/* Unlike other ports, this serial code does not allow for more than one
|
/* Unlike other ports, this serial code does not allow for more than one
|
||||||
com port. We therefore don't return a pointer to a port structure and can
|
com port. We therefore don't return a pointer to a port structure and can
|
||||||
instead just return NULL. */
|
instead just return NULL. */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* FreeRTOS V202112.00
|
* FreeRTOS V202112.00
|
||||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
@ -10,8 +10,7 @@
|
||||||
* subject to the following conditions:
|
* subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
* copies or substantial portions of the Software. If you wish to use our Amazon
|
* copies or substantial portions of the Software.
|
||||||
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
|
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
@ -21,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -40,18 +39,18 @@
|
||||||
/*
|
/*
|
||||||
* Timer instance | Value
|
* Timer instance | Value
|
||||||
* ----------------|---------
|
* ----------------|---------
|
||||||
* TCB0 | 0
|
* TCB0 | 0
|
||||||
* TCB1 | 1
|
* TCB1 | 1
|
||||||
* TCB2 | 2
|
* TCB2 | 2
|
||||||
* TCB3 | 3
|
* TCB3 | 3
|
||||||
* RTC | 4
|
* RTC | 4
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define configUSE_TIMER_INSTANCE 0
|
#define configUSE_TIMER_INSTANCE 0
|
||||||
#define configUSE_PREEMPTION 1
|
#define configUSE_PREEMPTION 1
|
||||||
|
|
||||||
/* NOTE: You can choose the following clock frequencies (Hz):
|
/* NOTE: You can choose the following clock frequencies (Hz):
|
||||||
20000000, 10000000, 5000000, 2000000.
|
20000000, 10000000, 5000000, 2000000.
|
||||||
For other frequency values, update clock_config.h with your own settings. */
|
For other frequency values, update clock_config.h with your own settings. */
|
||||||
#define configCPU_CLOCK_HZ 10000000
|
#define configCPU_CLOCK_HZ 10000000
|
||||||
|
|
||||||
|
@ -90,10 +89,6 @@ For other frequency values, update clock_config.h with your own settings. */
|
||||||
#define configUSE_TRACE_FACILITY 0
|
#define configUSE_TRACE_FACILITY 0
|
||||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
||||||
|
|
||||||
/* Co-routine related definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 1
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES 2
|
|
||||||
|
|
||||||
/* Software timer related definitions. */
|
/* Software timer related definitions. */
|
||||||
#define configUSE_TIMERS 1
|
#define configUSE_TIMERS 1
|
||||||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -155,10 +155,6 @@
|
||||||
<Compile Include="main.c">
|
<Compile Include="main.c">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\..\..\Source\croutine.c">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>Source\croutine.c</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Source\event_groups.c">
|
<Compile Include="..\..\..\Source\event_groups.c">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>Source\event_groups.c</Link>
|
<Link>Source\event_groups.c</Link>
|
||||||
|
@ -203,10 +199,6 @@
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>Source\include\atomic.h</Link>
|
<Link>Source\include\atomic.h</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\..\..\Source\include\croutine.h">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>Source\include\croutine.h</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Source\include\deprecated_definitions.h">
|
<Compile Include="..\..\..\Source\include\deprecated_definitions.h">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>Source\include\deprecated_definitions.h</Link>
|
<Link>Source\include\deprecated_definitions.h</Link>
|
||||||
|
@ -312,14 +304,6 @@
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>Common\Minimal\PollQ.c</Link>
|
<Link>Common\Minimal\PollQ.c</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\..\..\Demo\Common\include\crflash.h">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>Common\include\crflash.h</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Demo\Common\Minimal\crflash.c">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>Common\Minimal\crflash.c</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Demo\Common\include\recmutex.h">
|
<Compile Include="..\..\..\Demo\Common\include\recmutex.h">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>Common\include\recmutex.h</Link>
|
<Link>Common\include\recmutex.h</Link>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ void main_blinky( void )
|
||||||
{
|
{
|
||||||
/* Create the queue. */
|
/* Create the queue. */
|
||||||
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
||||||
|
|
||||||
if( xQueue != NULL )
|
if( xQueue != NULL )
|
||||||
{
|
{
|
||||||
/* Start the two tasks as described in the comments at the top of this
|
/* Start the two tasks as described in the comments at the top of this
|
||||||
|
|
|
@ -1,13 +1,37 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS V202112.00
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* https://www.FreeRTOS.org
|
||||||
|
* https://github.com/FreeRTOS
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include <avr/eeprom.h>
|
#include <avr/eeprom.h>
|
||||||
|
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "croutine.h"
|
|
||||||
#include "PollQ.h"
|
#include "PollQ.h"
|
||||||
#include "integer.h"
|
#include "integer.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "comtest.h"
|
#include "comtest.h"
|
||||||
#include "crflash.h"
|
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
#include "regtest.h"
|
#include "regtest.h"
|
||||||
|
|
||||||
|
@ -37,9 +61,6 @@ again. */
|
||||||
the demo application is not unexpectedly resetting. */
|
the demo application is not unexpectedly resetting. */
|
||||||
#define mainRESET_COUNT_ADDRESS ( 0x1400 )
|
#define mainRESET_COUNT_ADDRESS ( 0x1400 )
|
||||||
|
|
||||||
/* The number of coroutines to create. */
|
|
||||||
#define mainNUM_FLASH_COROUTINES ( 3 )
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The task function for the "Check" task.
|
* The task function for the "Check" task.
|
||||||
*/
|
*/
|
||||||
|
@ -66,13 +87,10 @@ void main_minimal( void )
|
||||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||||
vStartRegTestTasks();
|
vStartRegTestTasks();
|
||||||
|
|
||||||
/* Create the tasks defined within this file. */
|
/* Create the tasks defined within this file. */
|
||||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
/* Create the co-routines that flash the LED's. */
|
|
||||||
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
|
|
||||||
|
|
||||||
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
||||||
as 1 in portmacro.h. To use the cooperative scheduler define
|
as 1 in portmacro.h. To use the cooperative scheduler define
|
||||||
configUSE_PREEMPTION as 0. */
|
configUSE_PREEMPTION as 0. */
|
||||||
|
@ -84,7 +102,7 @@ void init_minimal( void )
|
||||||
/* Configure UART pins: PB0 Rx, PB1 Tx */
|
/* Configure UART pins: PB0 Rx, PB1 Tx */
|
||||||
PORTB.DIR &= ~PIN1_bm;
|
PORTB.DIR &= ~PIN1_bm;
|
||||||
PORTB.DIR |= PIN0_bm;
|
PORTB.DIR |= PIN0_bm;
|
||||||
|
|
||||||
vParTestInitialise();
|
vParTestInitialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +123,7 @@ static volatile unsigned long ulDummyVariable = 3UL;
|
||||||
integer tasks get some exercise. The result here is not important -
|
integer tasks get some exercise. The result here is not important -
|
||||||
see the demo application documentation for more info. */
|
see the demo application documentation for more info. */
|
||||||
ulDummyVariable *= 3;
|
ulDummyVariable *= 3;
|
||||||
|
|
||||||
prvCheckOtherTasksAreStillRunning();
|
prvCheckOtherTasksAreStillRunning();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,7 +152,7 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE;
|
||||||
{
|
{
|
||||||
xErrorHasOccurred = pdTRUE;
|
xErrorHasOccurred = pdTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xErrorHasOccurred == pdFALSE )
|
if( xErrorHasOccurred == pdFALSE )
|
||||||
{
|
{
|
||||||
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
||||||
|
@ -156,5 +174,4 @@ unsigned char ucResetCount;
|
||||||
|
|
||||||
void vApplicationIdleHook( void )
|
void vApplicationIdleHook( void )
|
||||||
{
|
{
|
||||||
vCoRoutineSchedule();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ portBASE_TYPE xReturn;
|
||||||
{
|
{
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* FreeRTOS V202112.00
|
* FreeRTOS V202112.00
|
||||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
@ -10,8 +10,7 @@
|
||||||
* subject to the following conditions:
|
* subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
* copies or substantial portions of the Software. If you wish to use our Amazon
|
* copies or substantial portions of the Software.
|
||||||
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
|
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
@ -21,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -40,23 +39,23 @@
|
||||||
/*
|
/*
|
||||||
* Timer instance | Value
|
* Timer instance | Value
|
||||||
* ----------------|---------
|
* ----------------|---------
|
||||||
* TCB0 | 0
|
* TCB0 | 0
|
||||||
* TCB1 | 1
|
* TCB1 | 1
|
||||||
* TCB2 | 2
|
* TCB2 | 2
|
||||||
* TCB3 | 3
|
* TCB3 | 3
|
||||||
* RTC | 4
|
* RTC | 4
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define configUSE_TIMER_INSTANCE 0
|
#define configUSE_TIMER_INSTANCE 0
|
||||||
#define configCALL_STACK_SIZE 30
|
#define configCALL_STACK_SIZE 30
|
||||||
|
|
||||||
#define configUSE_PREEMPTION 1
|
#define configUSE_PREEMPTION 1
|
||||||
|
|
||||||
/* NOTE: You can choose the following clock frequencies (Hz):
|
/* NOTE: You can choose the following clock frequencies (Hz):
|
||||||
20000000, 10000000, 5000000, 2000000.
|
20000000, 10000000, 5000000, 2000000.
|
||||||
For other frequency values, update clock_config.h with your own settings. */
|
For other frequency values, update clock_config.h with your own settings. */
|
||||||
#define configCPU_CLOCK_HZ 10000000
|
#define configCPU_CLOCK_HZ 10000000
|
||||||
|
|
||||||
#define configTICK_RATE_HZ 1000
|
#define configTICK_RATE_HZ 1000
|
||||||
#define configMAX_PRIORITIES 4
|
#define configMAX_PRIORITIES 4
|
||||||
#define configMINIMAL_STACK_SIZE 110
|
#define configMINIMAL_STACK_SIZE 110
|
||||||
|
@ -92,10 +91,6 @@ For other frequency values, update clock_config.h with your own settings. */
|
||||||
#define configUSE_TRACE_FACILITY 0
|
#define configUSE_TRACE_FACILITY 0
|
||||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
||||||
|
|
||||||
/* Co-routine related definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 1
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES 2
|
|
||||||
|
|
||||||
/* Software timer related definitions. */
|
/* Software timer related definitions. */
|
||||||
#define configUSE_TIMERS 1
|
#define configUSE_TIMERS 1
|
||||||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2121,9 +2121,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\include\comtest.h</name>
|
<name>$PROJ_DIR$\..\Common\include\comtest.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\Common\include\crflash.h</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\include\integer.h</name>
|
<name>$PROJ_DIR$\..\Common\include\integer.h</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2148,9 +2145,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\crflash.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2199,9 +2193,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\atomic.h</name>
|
<name>$PROJ_DIR$\..\..\Source\include\atomic.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\croutine.h</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\deprecated_definitions.h</name>
|
<name>$PROJ_DIR$\..\..\Source\include\deprecated_definitions.h</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2278,9 +2269,6 @@
|
||||||
</file>
|
</file>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\..\Source\croutine.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\event_groups.c</name>
|
<name>$PROJ_DIR$\..\..\Source\event_groups.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
|
|
@ -2169,9 +2169,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\include\comtest.h</name>
|
<name>$PROJ_DIR$\..\Common\include\comtest.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\Common\include\crflash.h</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\include\integer.h</name>
|
<name>$PROJ_DIR$\..\Common\include\integer.h</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2196,9 +2193,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\crflash.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2247,9 +2241,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\atomic.h</name>
|
<name>$PROJ_DIR$\..\..\Source\include\atomic.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\croutine.h</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\deprecated_definitions.h</name>
|
<name>$PROJ_DIR$\..\..\Source\include\deprecated_definitions.h</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2326,9 +2317,6 @@
|
||||||
</file>
|
</file>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\..\Source\croutine.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\event_groups.c</name>
|
<name>$PROJ_DIR$\..\..\Source\event_groups.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ void main_blinky( void )
|
||||||
{
|
{
|
||||||
/* Create the queue. */
|
/* Create the queue. */
|
||||||
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
||||||
|
|
||||||
if( xQueue != NULL )
|
if( xQueue != NULL )
|
||||||
{
|
{
|
||||||
/* Start the two tasks as described in the comments at the top of this
|
/* Start the two tasks as described in the comments at the top of this
|
||||||
|
@ -114,7 +114,7 @@ void main_blinky( void )
|
||||||
more details on the FreeRTOS heap http://www.freertos.org/a00111.html. The
|
more details on the FreeRTOS heap http://www.freertos.org/a00111.html. The
|
||||||
mode from which main() is called is set in the C start up code and must be
|
mode from which main() is called is set in the C start up code and must be
|
||||||
a privileged mode (not user mode). */
|
a privileged mode (not user mode). */
|
||||||
for( ;; );
|
for( ;; );
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_blinky( void )
|
void init_blinky( void )
|
||||||
|
|
|
@ -1,12 +1,36 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS V202112.00
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* https://www.FreeRTOS.org
|
||||||
|
* https://github.com/FreeRTOS
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "croutine.h"
|
|
||||||
|
|
||||||
#include "PollQ.h"
|
#include "PollQ.h"
|
||||||
#include "integer.h"
|
#include "integer.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "comtest.h"
|
#include "comtest.h"
|
||||||
#include "crflash.h"
|
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
#include "regtest.h"
|
#include "regtest.h"
|
||||||
|
|
||||||
|
@ -36,9 +60,6 @@ again. */
|
||||||
the demo application is not unexpectedly resetting. */
|
the demo application is not unexpectedly resetting. */
|
||||||
#define mainRESET_COUNT_ADDRESS ( 0x1400 )
|
#define mainRESET_COUNT_ADDRESS ( 0x1400 )
|
||||||
|
|
||||||
/* The number of coroutines to create. */
|
|
||||||
#define mainNUM_FLASH_COROUTINES ( 3 )
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The task function for the "Check" task.
|
* The task function for the "Check" task.
|
||||||
*/
|
*/
|
||||||
|
@ -65,13 +86,10 @@ void main_minimal( void )
|
||||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||||
vStartRegTestTasks();
|
vStartRegTestTasks();
|
||||||
|
|
||||||
/* Create the tasks defined within this file. */
|
/* Create the tasks defined within this file. */
|
||||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
/* Create the co-routines that flash the LED's. */
|
|
||||||
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
|
|
||||||
|
|
||||||
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
||||||
as 1 in portmacro.h. To use the cooperative scheduler define
|
as 1 in portmacro.h. To use the cooperative scheduler define
|
||||||
configUSE_PREEMPTION as 0. */
|
configUSE_PREEMPTION as 0. */
|
||||||
|
@ -83,7 +101,7 @@ void init_minimal( void )
|
||||||
/* Configure UART pins: PB0 Rx, PB1 Tx */
|
/* Configure UART pins: PB0 Rx, PB1 Tx */
|
||||||
PORTB.DIR &= ~PIN1_bm;
|
PORTB.DIR &= ~PIN1_bm;
|
||||||
PORTB.DIR |= PIN0_bm;
|
PORTB.DIR |= PIN0_bm;
|
||||||
|
|
||||||
vParTestInitialise();
|
vParTestInitialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +122,7 @@ static volatile unsigned long ulDummyVariable = 3UL;
|
||||||
integer tasks get some exercise. The result here is not important -
|
integer tasks get some exercise. The result here is not important -
|
||||||
see the demo application documentation for more info. */
|
see the demo application documentation for more info. */
|
||||||
ulDummyVariable *= 3;
|
ulDummyVariable *= 3;
|
||||||
|
|
||||||
prvCheckOtherTasksAreStillRunning();
|
prvCheckOtherTasksAreStillRunning();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +151,7 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE;
|
||||||
{
|
{
|
||||||
xErrorHasOccurred = pdTRUE;
|
xErrorHasOccurred = pdTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xErrorHasOccurred == pdFALSE )
|
if( xErrorHasOccurred == pdFALSE )
|
||||||
{
|
{
|
||||||
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
||||||
|
@ -153,5 +171,4 @@ static unsigned char __eeprom ucResetCount @ mainRESET_COUNT_ADDRESS;
|
||||||
|
|
||||||
void vApplicationIdleHook( void )
|
void vApplicationIdleHook( void )
|
||||||
{
|
{
|
||||||
vCoRoutineSchedule();
|
|
||||||
}
|
}
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ portBASE_TYPE xReturn;
|
||||||
{
|
{
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* FreeRTOS V202112.00
|
* FreeRTOS V202112.00
|
||||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
@ -10,8 +10,7 @@
|
||||||
* subject to the following conditions:
|
* subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
* copies or substantial portions of the Software. If you wish to use our Amazon
|
* copies or substantial portions of the Software.
|
||||||
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
|
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
@ -21,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -40,18 +39,18 @@
|
||||||
/*
|
/*
|
||||||
* Timer instance | Value
|
* Timer instance | Value
|
||||||
* ----------------|---------
|
* ----------------|---------
|
||||||
* TCB0 | 0
|
* TCB0 | 0
|
||||||
* TCB1 | 1
|
* TCB1 | 1
|
||||||
* TCB2 | 2
|
* TCB2 | 2
|
||||||
* TCB3 | 3
|
* TCB3 | 3
|
||||||
* RTC | 4
|
* RTC | 4
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define configUSE_TIMER_INSTANCE 0
|
#define configUSE_TIMER_INSTANCE 0
|
||||||
#define configUSE_PREEMPTION 1
|
#define configUSE_PREEMPTION 1
|
||||||
|
|
||||||
/* NOTE: You can choose the following clock frequencies (Hz):
|
/* NOTE: You can choose the following clock frequencies (Hz):
|
||||||
20000000, 10000000, 5000000, 2000000.
|
20000000, 10000000, 5000000, 2000000.
|
||||||
For other frequency values, update clock_config.h with your own settings. */
|
For other frequency values, update clock_config.h with your own settings. */
|
||||||
#define configCPU_CLOCK_HZ 10000000
|
#define configCPU_CLOCK_HZ 10000000
|
||||||
|
|
||||||
|
@ -90,10 +89,6 @@ For other frequency values, update clock_config.h with your own settings. */
|
||||||
#define configUSE_TRACE_FACILITY 0
|
#define configUSE_TRACE_FACILITY 0
|
||||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
||||||
|
|
||||||
/* Co-routine related definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 1
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES 2
|
|
||||||
|
|
||||||
/* Software timer related definitions. */
|
/* Software timer related definitions. */
|
||||||
#define configUSE_TIMERS 1
|
#define configUSE_TIMERS 1
|
||||||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ void main_blinky( void )
|
||||||
{
|
{
|
||||||
/* Create the queue. */
|
/* Create the queue. */
|
||||||
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
||||||
|
|
||||||
if( xQueue != NULL )
|
if( xQueue != NULL )
|
||||||
{
|
{
|
||||||
/* Start the two tasks as described in the comments at the top of this
|
/* Start the two tasks as described in the comments at the top of this
|
||||||
|
|
|
@ -1,13 +1,37 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS V202112.00
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* https://www.FreeRTOS.org
|
||||||
|
* https://github.com/FreeRTOS
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include <avr/eeprom.h>
|
#include <avr/eeprom.h>
|
||||||
|
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "croutine.h"
|
|
||||||
#include "PollQ.h"
|
#include "PollQ.h"
|
||||||
#include "integer.h"
|
#include "integer.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "comtest.h"
|
#include "comtest.h"
|
||||||
#include "crflash.h"
|
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
#include "regtest.h"
|
#include "regtest.h"
|
||||||
|
|
||||||
|
@ -37,9 +61,6 @@ again. */
|
||||||
the demo application is not unexpectedly resetting. */
|
the demo application is not unexpectedly resetting. */
|
||||||
#define mainRESET_COUNT_ADDRESS ( 0x1400 )
|
#define mainRESET_COUNT_ADDRESS ( 0x1400 )
|
||||||
|
|
||||||
/* The number of coroutines to create. */
|
|
||||||
#define mainNUM_FLASH_COROUTINES ( 3 )
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The task function for the "Check" task.
|
* The task function for the "Check" task.
|
||||||
*/
|
*/
|
||||||
|
@ -66,13 +87,10 @@ void main_minimal( void )
|
||||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||||
vStartRegTestTasks();
|
vStartRegTestTasks();
|
||||||
|
|
||||||
/* Create the tasks defined within this file. */
|
/* Create the tasks defined within this file. */
|
||||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
/* Create the co-routines that flash the LED's. */
|
|
||||||
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
|
|
||||||
|
|
||||||
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
||||||
as 1 in portmacro.h. To use the cooperative scheduler define
|
as 1 in portmacro.h. To use the cooperative scheduler define
|
||||||
configUSE_PREEMPTION as 0. */
|
configUSE_PREEMPTION as 0. */
|
||||||
|
@ -84,7 +102,7 @@ void init_minimal( void )
|
||||||
/* Configure UART pins: PB0 Rx, PB1 Tx */
|
/* Configure UART pins: PB0 Rx, PB1 Tx */
|
||||||
PORTB.DIR &= ~PIN1_bm;
|
PORTB.DIR &= ~PIN1_bm;
|
||||||
PORTB.DIR |= PIN0_bm;
|
PORTB.DIR |= PIN0_bm;
|
||||||
|
|
||||||
vParTestInitialise();
|
vParTestInitialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +123,7 @@ static volatile unsigned long ulDummyVariable = 3UL;
|
||||||
integer tasks get some exercise. The result here is not important -
|
integer tasks get some exercise. The result here is not important -
|
||||||
see the demo application documentation for more info. */
|
see the demo application documentation for more info. */
|
||||||
ulDummyVariable *= 3;
|
ulDummyVariable *= 3;
|
||||||
|
|
||||||
prvCheckOtherTasksAreStillRunning();
|
prvCheckOtherTasksAreStillRunning();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,7 +152,7 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE;
|
||||||
{
|
{
|
||||||
xErrorHasOccurred = pdTRUE;
|
xErrorHasOccurred = pdTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xErrorHasOccurred == pdFALSE )
|
if( xErrorHasOccurred == pdFALSE )
|
||||||
{
|
{
|
||||||
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
||||||
|
@ -156,5 +174,4 @@ unsigned char ucResetCount;
|
||||||
|
|
||||||
void vApplicationIdleHook( void )
|
void vApplicationIdleHook( void )
|
||||||
{
|
{
|
||||||
vCoRoutineSchedule();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
<itemPath>../Common/include/comtest2.h</itemPath>
|
<itemPath>../Common/include/comtest2.h</itemPath>
|
||||||
<itemPath>../Common/include/comtest_strings.h</itemPath>
|
<itemPath>../Common/include/comtest_strings.h</itemPath>
|
||||||
<itemPath>../Common/include/countsem.h</itemPath>
|
<itemPath>../Common/include/countsem.h</itemPath>
|
||||||
<itemPath>../Common/include/crflash.h</itemPath>
|
|
||||||
<itemPath>../Common/include/crhook.h</itemPath>
|
|
||||||
<itemPath>../Common/include/death.h</itemPath>
|
<itemPath>../Common/include/death.h</itemPath>
|
||||||
<itemPath>../Common/include/dynamic.h</itemPath>
|
<itemPath>../Common/include/dynamic.h</itemPath>
|
||||||
<itemPath>../Common/include/fileIO.h</itemPath>
|
<itemPath>../Common/include/fileIO.h</itemPath>
|
||||||
|
@ -50,7 +48,6 @@
|
||||||
<itemPath>../Common/Minimal/PollQ.c</itemPath>
|
<itemPath>../Common/Minimal/PollQ.c</itemPath>
|
||||||
<itemPath>../Common/Minimal/TaskNotify.c</itemPath>
|
<itemPath>../Common/Minimal/TaskNotify.c</itemPath>
|
||||||
<itemPath>../Common/Minimal/comtest.c</itemPath>
|
<itemPath>../Common/Minimal/comtest.c</itemPath>
|
||||||
<itemPath>../Common/Minimal/crflash.c</itemPath>
|
|
||||||
<itemPath>../Common/Minimal/integer.c</itemPath>
|
<itemPath>../Common/Minimal/integer.c</itemPath>
|
||||||
<itemPath>../Common/Minimal/recmutex.c</itemPath>
|
<itemPath>../Common/Minimal/recmutex.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
|
@ -60,7 +57,6 @@
|
||||||
<itemPath>../../Source/include/FreeRTOS.h</itemPath>
|
<itemPath>../../Source/include/FreeRTOS.h</itemPath>
|
||||||
<itemPath>../../Source/include/StackMacros.h</itemPath>
|
<itemPath>../../Source/include/StackMacros.h</itemPath>
|
||||||
<itemPath>../../Source/include/atomic.h</itemPath>
|
<itemPath>../../Source/include/atomic.h</itemPath>
|
||||||
<itemPath>../../Source/include/croutine.h</itemPath>
|
|
||||||
<itemPath>../../Source/include/deprecated_definitions.h</itemPath>
|
<itemPath>../../Source/include/deprecated_definitions.h</itemPath>
|
||||||
<itemPath>../../Source/include/event_groups.h</itemPath>
|
<itemPath>../../Source/include/event_groups.h</itemPath>
|
||||||
<itemPath>../../Source/include/list.h</itemPath>
|
<itemPath>../../Source/include/list.h</itemPath>
|
||||||
|
@ -89,7 +85,6 @@
|
||||||
<itemPath>../../Source/portable/MemMang/heap_1.c</itemPath>
|
<itemPath>../../Source/portable/MemMang/heap_1.c</itemPath>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
</logicalFolder>
|
</logicalFolder>
|
||||||
<itemPath>../../Source/croutine.c</itemPath>
|
|
||||||
<itemPath>../../Source/event_groups.c</itemPath>
|
<itemPath>../../Source/event_groups.c</itemPath>
|
||||||
<itemPath>../../Source/list.c</itemPath>
|
<itemPath>../../Source/list.c</itemPath>
|
||||||
<itemPath>../../Source/queue.c</itemPath>
|
<itemPath>../../Source/queue.c</itemPath>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ portBASE_TYPE xReturn;
|
||||||
{
|
{
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
* application requirements.
|
* application requirements.
|
||||||
*
|
*
|
||||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||||
*
|
*
|
||||||
* See http://www.freertos.org/a00110.html
|
* See http://www.freertos.org/a00110.html
|
||||||
*----------------------------------------------------------*/
|
*----------------------------------------------------------*/
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
/* FreeRTOS software timer. */
|
/* FreeRTOS software timer. */
|
||||||
#define configUSE_TIMERS 1
|
#define configUSE_TIMERS 1
|
||||||
#define configTIMER_TASK_PRIORITY 2
|
#define configTIMER_TASK_PRIORITY 2
|
||||||
#define configTIMER_QUEUE_LENGTH 5
|
#define configTIMER_QUEUE_LENGTH 5
|
||||||
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
|
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
|
||||||
|
|
||||||
/* FreeRTOS memory allocation scheme. */
|
/* FreeRTOS memory allocation scheme. */
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ATmega328PB Xplained Mini board has a user LED at PB5.
|
* ATmega328PB Xplained Mini board has a user LED at PB5.
|
||||||
* Everything below is specific for this setup only.
|
* Everything below is specific for this setup only.
|
||||||
* LED is lit when PB5 is set to a high.
|
* LED is lit when PB5 is set to a high.
|
||||||
*/
|
*/
|
||||||
|
@ -55,11 +55,11 @@ void vParTestSetLED( UBaseType_t uxLED, BaseType_t xValue )
|
||||||
{
|
{
|
||||||
/* There's only one LED on this board. */
|
/* There's only one LED on this board. */
|
||||||
( void ) uxLED;
|
( void ) uxLED;
|
||||||
|
|
||||||
/* Turn on user LED.
|
/* Turn on user LED.
|
||||||
The compound action is guaranteed to be not interrupted by other tasks. */
|
The compound action is guaranteed to be not interrupted by other tasks. */
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
|
|
||||||
if ( xValue == 0 )
|
if ( xValue == 0 )
|
||||||
{
|
{
|
||||||
/* Turn off, only when input value is zero. */
|
/* Turn off, only when input value is zero. */
|
||||||
|
@ -74,7 +74,7 @@ void vParTestSetLED( UBaseType_t uxLED, BaseType_t xValue )
|
||||||
PORTB |= partestLED_PORTB_DIR_REG_BIT;
|
PORTB |= partestLED_PORTB_DIR_REG_BIT;
|
||||||
uCurrentLedOutputVal = partestLED_ON;
|
uCurrentLedOutputVal = partestLED_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
xTaskResumeAll();
|
xTaskResumeAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,11 +84,11 @@ void vParTestToggleLED( UBaseType_t uxLED )
|
||||||
{
|
{
|
||||||
/* There's only one LED on this board. */
|
/* There's only one LED on this board. */
|
||||||
( void ) uxLED;
|
( void ) uxLED;
|
||||||
|
|
||||||
/* Toggle user LED.
|
/* Toggle user LED.
|
||||||
The compound action is guaranteed to be not interrupted by other tasks. */
|
The compound action is guaranteed to be not interrupted by other tasks. */
|
||||||
vTaskSuspendAll();
|
vTaskSuspendAll();
|
||||||
|
|
||||||
if ( uCurrentLedOutputVal == partestLED_ON )
|
if ( uCurrentLedOutputVal == partestLED_ON )
|
||||||
{
|
{
|
||||||
/* Turn off. */
|
/* Turn off. */
|
||||||
|
@ -103,7 +103,7 @@ void vParTestToggleLED( UBaseType_t uxLED )
|
||||||
PORTB |= partestLED_PORTB_DIR_REG_BIT;
|
PORTB |= partestLED_PORTB_DIR_REG_BIT;
|
||||||
uCurrentLedOutputVal = partestLED_ON;
|
uCurrentLedOutputVal = partestLED_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
xTaskResumeAll();
|
xTaskResumeAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,10 +204,6 @@
|
||||||
</ToolchainSettings>
|
</ToolchainSettings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="..\..\..\Source\croutine.c">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>FreeRTOS\croutine.c</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Source\event_groups.c">
|
<Compile Include="..\..\..\Source\event_groups.c">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>FreeRTOS\event_groups.c</Link>
|
<Link>FreeRTOS\event_groups.c</Link>
|
||||||
|
@ -216,10 +212,6 @@
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>FreeRTOS\include\atomic.h</Link>
|
<Link>FreeRTOS\include\atomic.h</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\..\..\Source\include\croutine.h">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>FreeRTOS\include\croutine.h</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Source\include\deprecated_definitions.h">
|
<Compile Include="..\..\..\Source\include\deprecated_definitions.h">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>FreeRTOS\include\deprecated_definitions.h</Link>
|
<Link>FreeRTOS\include\deprecated_definitions.h</Link>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -31,13 +31,13 @@
|
||||||
/* Demo file headers. */
|
/* Demo file headers. */
|
||||||
#include "regtest.h"
|
#include "regtest.h"
|
||||||
|
|
||||||
/* The minimum stack size required by a register test task.
|
/* The minimum stack size required by a register test task.
|
||||||
*
|
*
|
||||||
* The value should be at least the sum of:
|
* The value should be at least the sum of:
|
||||||
* - Number of bytes used to save register context.
|
* - Number of bytes used to save register context.
|
||||||
* Refer to port.c, r0-r31 and/or RAMPZ and/or EIND.
|
* Refer to port.c, r0-r31 and/or RAMPZ and/or EIND.
|
||||||
* - Number of bytes used in nested function call.
|
* - Number of bytes used in nested function call.
|
||||||
* Refer to GCC Developer Option -fstack-usage.
|
* Refer to GCC Developer Option -fstack-usage.
|
||||||
*/
|
*/
|
||||||
#define REGTEST_MIN_STACK_SIZE ( ( unsigned short ) 50 )
|
#define REGTEST_MIN_STACK_SIZE ( ( unsigned short ) 50 )
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@
|
||||||
static void prvRegisterCheck1( void *pvParameters );
|
static void prvRegisterCheck1( void *pvParameters );
|
||||||
static void prvRegisterCheck2( void *pvParameters );
|
static void prvRegisterCheck2( void *pvParameters );
|
||||||
|
|
||||||
/* Set to a none zero value should an error be found.
|
/* Set to a none zero value should an error be found.
|
||||||
* Using two variables to identify offending task and register combination.
|
* Using two variables to identify offending task and register combination.
|
||||||
*/
|
*/
|
||||||
UBaseType_t uxRegTestError1 = 0;
|
UBaseType_t uxRegTestError1 = 0;
|
||||||
UBaseType_t uxRegTestError2 = 0;
|
UBaseType_t uxRegTestError2 = 0;
|
||||||
|
@ -63,7 +63,7 @@ void vStartRegTestTasks( void )
|
||||||
* context is not restored correctly, error is more likely to be caught.
|
* context is not restored correctly, error is more likely to be caught.
|
||||||
*/
|
*/
|
||||||
xTaskCreate( prvRegisterCheck1, "Reg1", REGTEST_MIN_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
xTaskCreate( prvRegisterCheck1, "Reg1", REGTEST_MIN_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||||
xTaskCreate( prvRegisterCheck2, "Reg2", REGTEST_MIN_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
xTaskCreate( prvRegisterCheck2, "Reg2", REGTEST_MIN_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -72,14 +72,14 @@ BaseType_t xAreRegTestTasksStillRunning( void )
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
|
|
||||||
/* If a register was found to contain an unexpected value then the
|
/* If a register was found to contain an unexpected value then the
|
||||||
* uxRegTestError variable would have been set to a none zero value.
|
* uxRegTestError variable would have been set to a none zero value.
|
||||||
*
|
*
|
||||||
* This check guarantees no false positive, but does not guarantee test
|
* This check guarantees no false positive, but does not guarantee test
|
||||||
* has actually run. Could have a counter to track how many times the loop
|
* has actually run. Could have a counter to track how many times the loop
|
||||||
* has been entered and ensure that the number is monotonically incrementing.
|
* has been entered and ensure that the number is monotonically incrementing.
|
||||||
* And then it'll subject to integer overflow issue. To make things simple
|
* And then it'll subject to integer overflow issue. To make things simple
|
||||||
* straight forward, set a breakpoint at the end of the loop in prvRegisterCheck1()
|
* straight forward, set a breakpoint at the end of the loop in prvRegisterCheck1()
|
||||||
* and prvRegisterCheck2(). Make sure both can be hit.
|
* and prvRegisterCheck2(). Make sure both can be hit.
|
||||||
*/
|
*/
|
||||||
if( uxRegTestError1 == 0 && uxRegTestError2 == 0 )
|
if( uxRegTestError1 == 0 && uxRegTestError2 == 0 )
|
||||||
{
|
{
|
||||||
|
@ -89,7 +89,7 @@ BaseType_t xReturn;
|
||||||
{
|
{
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -100,13 +100,13 @@ static void prvRegisterCheck1( void *pvParameters )
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
/* Load register r0-r30 with known value.
|
/* Load register r0-r30 with known value.
|
||||||
* r31 is used to first load immediate value then copy into r0-15.
|
* r31 is used to first load immediate value then copy into r0-15.
|
||||||
*
|
*
|
||||||
* LDI Rd,K
|
* LDI Rd,K
|
||||||
* Rd<--K (16 <= d <= 31, 0 <= K <= 255)
|
* Rd<--K (16 <= d <= 31, 0 <= K <= 255)
|
||||||
*/
|
*/
|
||||||
asm( "LDI r31, 0x80" );
|
asm( "LDI r31, 0x80" );
|
||||||
asm( "MOV r0, r31" );
|
asm( "MOV r0, r31" );
|
||||||
asm( "LDI r31, 0x81" );
|
asm( "LDI r31, 0x81" );
|
||||||
asm( "MOV r1, r31" );
|
asm( "MOV r1, r31" );
|
||||||
|
@ -155,7 +155,7 @@ static void prvRegisterCheck1( void *pvParameters )
|
||||||
asm( "LDI r30, 0x9E" );
|
asm( "LDI r30, 0x9E" );
|
||||||
|
|
||||||
/* Check whether register r0-30 still contain known good values.
|
/* Check whether register r0-30 still contain known good values.
|
||||||
* If not, update uxRegTestError1 with the unique value.
|
* If not, update uxRegTestError1 with the unique value.
|
||||||
*/
|
*/
|
||||||
asm( "LDI r31, 0x80" );
|
asm( "LDI r31, 0x80" );
|
||||||
asm( "CPSE r31, r0" );
|
asm( "CPSE r31, r0" );
|
||||||
|
@ -250,7 +250,7 @@ static void prvRegisterCheck1( void *pvParameters )
|
||||||
asm( "LDI r31, 0x9E" );
|
asm( "LDI r31, 0x9E" );
|
||||||
asm( "CPSE r31, r30" );
|
asm( "CPSE r31, r30" );
|
||||||
asm( "STS uxRegTestError1, r30" );
|
asm( "STS uxRegTestError1, r30" );
|
||||||
|
|
||||||
/* Give other tasks of the same priority a chance to run. */
|
/* Give other tasks of the same priority a chance to run. */
|
||||||
taskYIELD();
|
taskYIELD();
|
||||||
}
|
}
|
||||||
|
@ -263,13 +263,13 @@ static void prvRegisterCheck2( void *pvParameters )
|
||||||
|
|
||||||
for( ;; )
|
for( ;; )
|
||||||
{
|
{
|
||||||
/* Load register r0-r30 with known value.
|
/* Load register r0-r30 with known value.
|
||||||
* r31 is used to first load immediate value then copy into r0-15.
|
* r31 is used to first load immediate value then copy into r0-15.
|
||||||
*
|
*
|
||||||
* LDI Rd,K
|
* LDI Rd,K
|
||||||
* Rd<--K (16 <= d <= 31, 0 <= K <= 255)
|
* Rd<--K (16 <= d <= 31, 0 <= K <= 255)
|
||||||
*/
|
*/
|
||||||
asm( "LDI r31, 0" );
|
asm( "LDI r31, 0" );
|
||||||
asm( "MOV r0, r31" );
|
asm( "MOV r0, r31" );
|
||||||
asm( "LDI r31, 1" );
|
asm( "LDI r31, 1" );
|
||||||
asm( "MOV r1, r31" );
|
asm( "MOV r1, r31" );
|
||||||
|
@ -316,9 +316,9 @@ static void prvRegisterCheck2( void *pvParameters )
|
||||||
asm( "LDI r28, 28" );
|
asm( "LDI r28, 28" );
|
||||||
asm( "LDI r29, 29" );
|
asm( "LDI r29, 29" );
|
||||||
asm( "LDI r30, 30" );
|
asm( "LDI r30, 30" );
|
||||||
|
|
||||||
/* Check whether register r0-30 still contain known good values.
|
/* Check whether register r0-30 still contain known good values.
|
||||||
* If not, update uxRegTestError2 with the unique value.
|
* If not, update uxRegTestError2 with the unique value.
|
||||||
*/
|
*/
|
||||||
asm( "LDI r31, 0" );
|
asm( "LDI r31, 0" );
|
||||||
asm( "CPSE r31, r0" );
|
asm( "CPSE r31, r0" );
|
||||||
|
@ -413,7 +413,7 @@ static void prvRegisterCheck2( void *pvParameters )
|
||||||
asm( "LDI r31, 30" );
|
asm( "LDI r31, 30" );
|
||||||
asm( "CPSE r31, r30" );
|
asm( "CPSE r31, r30" );
|
||||||
asm( "STS uxRegTestError2, r30" );
|
asm( "STS uxRegTestError2, r30" );
|
||||||
|
|
||||||
/* Give other tasks of the same priority a chance to run. */
|
/* Give other tasks of the same priority a chance to run. */
|
||||||
taskYIELD();
|
taskYIELD();
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* FreeRTOS V202112.00
|
* FreeRTOS V202112.00
|
||||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
@ -10,8 +10,7 @@
|
||||||
* subject to the following conditions:
|
* subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
* copies or substantial portions of the Software. If you wish to use our Amazon
|
* copies or substantial portions of the Software.
|
||||||
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
|
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
@ -21,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -40,12 +39,12 @@
|
||||||
/*
|
/*
|
||||||
* Timer instance | Value
|
* Timer instance | Value
|
||||||
* ----------------|---------
|
* ----------------|---------
|
||||||
* TCB0 | 0
|
* TCB0 | 0
|
||||||
* TCB1 | 1
|
* TCB1 | 1
|
||||||
* TCB2 | 2
|
* TCB2 | 2
|
||||||
* TCB3 | 3
|
* TCB3 | 3
|
||||||
* TCB4 | 4
|
* TCB4 | 4
|
||||||
* RTC | 5
|
* RTC | 5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define configUSE_TIMER_INSTANCE 0
|
#define configUSE_TIMER_INSTANCE 0
|
||||||
|
@ -92,10 +91,6 @@ For other frequency values, update clock_config.h with your own settings */
|
||||||
#define configUSE_TRACE_FACILITY 0
|
#define configUSE_TRACE_FACILITY 0
|
||||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
||||||
|
|
||||||
/* Co-routine related definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 1
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES 2
|
|
||||||
|
|
||||||
/* Software timer related definitions. */
|
/* Software timer related definitions. */
|
||||||
#define configUSE_TIMERS 1
|
#define configUSE_TIMERS 1
|
||||||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -152,10 +152,6 @@
|
||||||
<Compile Include="FreeRTOSConfig.h">
|
<Compile Include="FreeRTOSConfig.h">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\..\..\Source\croutine.c">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>freeRTOS\croutine.c</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Source\event_groups.c">
|
<Compile Include="..\..\..\Source\event_groups.c">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>freeRTOS\event_groups.c</Link>
|
<Link>freeRTOS\event_groups.c</Link>
|
||||||
|
@ -200,10 +196,6 @@
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>freeRTOS\include\atomic.h</Link>
|
<Link>freeRTOS\include\atomic.h</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\..\..\Source\include\croutine.h">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>freeRTOS\include\croutine.h</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Source\include\deprecated_definitions.h">
|
<Compile Include="..\..\..\Source\include\deprecated_definitions.h">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>freeRTOS\include\deprecated_definitions.h</Link>
|
<Link>freeRTOS\include\deprecated_definitions.h</Link>
|
||||||
|
@ -316,14 +308,6 @@
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>Common\Minimal\PollQ.c</Link>
|
<Link>Common\Minimal\PollQ.c</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\..\..\Demo\Common\include\crflash.h">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>Common\include\crflash.h</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Demo\Common\Minimal\crflash.c">
|
|
||||||
<SubType>compile</SubType>
|
|
||||||
<Link>Common\Minimal\crflash.c</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\..\..\Demo\Common\include\serial.h">
|
<Compile Include="..\..\..\Demo\Common\include\serial.h">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>Common\include\serial.h</Link>
|
<Link>Common\include\serial.h</Link>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ void main_blinky( void )
|
||||||
{
|
{
|
||||||
/* Create the queue. */
|
/* Create the queue. */
|
||||||
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( uint32_t ) );
|
||||||
|
|
||||||
if( xQueue != NULL )
|
if( xQueue != NULL )
|
||||||
{
|
{
|
||||||
/* Start the two tasks as described in the comments at the top of this
|
/* Start the two tasks as described in the comments at the top of this
|
||||||
|
|
|
@ -1,13 +1,36 @@
|
||||||
|
/*
|
||||||
|
* FreeRTOS V202112.00
|
||||||
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* https://www.FreeRTOS.org
|
||||||
|
* https://github.com/FreeRTOS
|
||||||
|
*
|
||||||
|
*/
|
||||||
#include <avr/eeprom.h>
|
#include <avr/eeprom.h>
|
||||||
|
|
||||||
#include "FreeRTOS.h"
|
#include "FreeRTOS.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "croutine.h"
|
|
||||||
#include "PollQ.h"
|
#include "PollQ.h"
|
||||||
#include "integer.h"
|
#include "integer.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "comtest.h"
|
#include "comtest.h"
|
||||||
#include "crflash.h"
|
|
||||||
#include "partest.h"
|
#include "partest.h"
|
||||||
#include "regtest.h"
|
#include "regtest.h"
|
||||||
|
|
||||||
|
@ -37,9 +60,6 @@ again. */
|
||||||
the demo application is not unexpectedly resetting. */
|
the demo application is not unexpectedly resetting. */
|
||||||
#define mainRESET_COUNT_ADDRESS ( 0x1400 )
|
#define mainRESET_COUNT_ADDRESS ( 0x1400 )
|
||||||
|
|
||||||
/* The number of coroutines to create. */
|
|
||||||
#define mainNUM_FLASH_COROUTINES ( 3 )
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The task function for the "Check" task.
|
* The task function for the "Check" task.
|
||||||
*/
|
*/
|
||||||
|
@ -66,13 +86,10 @@ void main_minimal( void )
|
||||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||||
vStartRegTestTasks();
|
vStartRegTestTasks();
|
||||||
|
|
||||||
/* Create the tasks defined within this file. */
|
/* Create the tasks defined within this file. */
|
||||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||||
|
|
||||||
/* Create the co-routines that flash the LED's. */
|
|
||||||
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
|
|
||||||
|
|
||||||
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
|
||||||
as 1 in portmacro.h. To use the cooperative scheduler define
|
as 1 in portmacro.h. To use the cooperative scheduler define
|
||||||
configUSE_PREEMPTION as 0. */
|
configUSE_PREEMPTION as 0. */
|
||||||
|
@ -84,7 +101,7 @@ void init_minimal( void )
|
||||||
/* Configure UART pins: PC1 Rx, PC0 Tx */
|
/* Configure UART pins: PC1 Rx, PC0 Tx */
|
||||||
PORTC.DIR &= ~PIN0_bm;
|
PORTC.DIR &= ~PIN0_bm;
|
||||||
PORTC.DIR |= PIN1_bm;
|
PORTC.DIR |= PIN1_bm;
|
||||||
|
|
||||||
vParTestInitialise();
|
vParTestInitialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +122,7 @@ static volatile unsigned long ulDummyVariable = 3UL;
|
||||||
integer tasks get some exercise. The result here is not important -
|
integer tasks get some exercise. The result here is not important -
|
||||||
see the demo application documentation for more info. */
|
see the demo application documentation for more info. */
|
||||||
ulDummyVariable *= 3;
|
ulDummyVariable *= 3;
|
||||||
|
|
||||||
prvCheckOtherTasksAreStillRunning();
|
prvCheckOtherTasksAreStillRunning();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,7 +151,7 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE;
|
||||||
{
|
{
|
||||||
xErrorHasOccurred = pdTRUE;
|
xErrorHasOccurred = pdTRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xErrorHasOccurred == pdFALSE )
|
if( xErrorHasOccurred == pdFALSE )
|
||||||
{
|
{
|
||||||
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
/* Toggle the LED if everything is okay so we know if an error occurs even if not
|
||||||
|
@ -156,5 +173,4 @@ unsigned char ucResetCount;
|
||||||
|
|
||||||
void vApplicationIdleHook( void )
|
void vApplicationIdleHook( void )
|
||||||
{
|
{
|
||||||
vCoRoutineSchedule();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ portBASE_TYPE xReturn;
|
||||||
{
|
{
|
||||||
xReturn = pdFALSE;
|
xReturn = pdFALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* FreeRTOS V202112.00
|
* FreeRTOS V202112.00
|
||||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
@ -10,8 +10,7 @@
|
||||||
* subject to the following conditions:
|
* subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
* copies or substantial portions of the Software. If you wish to use our Amazon
|
* copies or substantial portions of the Software.
|
||||||
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
|
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
@ -21,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -40,12 +39,12 @@
|
||||||
/*
|
/*
|
||||||
* Timer instance | Value
|
* Timer instance | Value
|
||||||
* ----------------|---------
|
* ----------------|---------
|
||||||
* TCB0 | 0
|
* TCB0 | 0
|
||||||
* TCB1 | 1
|
* TCB1 | 1
|
||||||
* TCB2 | 2
|
* TCB2 | 2
|
||||||
* TCB3 | 3
|
* TCB3 | 3
|
||||||
* TCB4 | 4
|
* TCB4 | 4
|
||||||
* RTC | 5
|
* RTC | 5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define configUSE_TIMER_INSTANCE 0
|
#define configUSE_TIMER_INSTANCE 0
|
||||||
|
@ -94,10 +93,6 @@ For other frequency values, update clock_config.h with your own settings */
|
||||||
#define configUSE_TRACE_FACILITY 0
|
#define configUSE_TRACE_FACILITY 0
|
||||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
||||||
|
|
||||||
/* Co-routine related definitions. */
|
|
||||||
#define configUSE_CO_ROUTINES 1
|
|
||||||
#define configMAX_CO_ROUTINE_PRIORITIES 2
|
|
||||||
|
|
||||||
/* Software timer related definitions. */
|
/* Software timer related definitions. */
|
||||||
#define configUSE_TIMERS 1
|
#define configUSE_TIMERS 1
|
||||||
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*
|
*
|
||||||
* https://www.FreeRTOS.org
|
* https://www.FreeRTOS.org
|
||||||
* https://aws.amazon.com/freertos
|
* https://github.com/FreeRTOS
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -2126,9 +2126,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\include\comtest.h</name>
|
<name>$PROJ_DIR$\..\Common\include\comtest.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\Common\include\crflash.h</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\include\integer.h</name>
|
<name>$PROJ_DIR$\..\Common\include\integer.h</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2159,9 +2156,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\crflash.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2183,9 +2177,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\atomic.h</name>
|
<name>$PROJ_DIR$\..\..\Source\include\atomic.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\croutine.h</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\deprecated_definitions.h</name>
|
<name>$PROJ_DIR$\..\..\Source\include\deprecated_definitions.h</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2262,9 +2253,6 @@
|
||||||
</file>
|
</file>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\..\Source\croutine.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\event_groups.c</name>
|
<name>$PROJ_DIR$\..\..\Source\event_groups.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
|
|
@ -2169,9 +2169,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\include\comtest.h</name>
|
<name>$PROJ_DIR$\..\Common\include\comtest.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\Common\include\crflash.h</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\include\integer.h</name>
|
<name>$PROJ_DIR$\..\Common\include\integer.h</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2202,9 +2199,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\crflash.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2226,9 +2220,6 @@
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\atomic.h</name>
|
<name>$PROJ_DIR$\..\..\Source\include\atomic.h</name>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\croutine.h</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\include\deprecated_definitions.h</name>
|
<name>$PROJ_DIR$\..\..\Source\include\deprecated_definitions.h</name>
|
||||||
</file>
|
</file>
|
||||||
|
@ -2305,9 +2296,6 @@
|
||||||
</file>
|
</file>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<file>
|
|
||||||
<name>$PROJ_DIR$\..\..\Source\croutine.c</name>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<name>$PROJ_DIR$\..\..\Source\event_groups.c</name>
|
<name>$PROJ_DIR$\..\..\Source\event_groups.c</name>
|
||||||
</file>
|
</file>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue