You are here

тест отображения кода

/* This is an example of a transmit function in a generic
peripheral driver.  An RTOS task calls the transmit function,
then waits in the Blocked state (so not using an CPU time) 
until it is notified that the transmission is complete.  The
transmission is performed by a DMA, and the DMA end interrupt
is used to notify the task. */

/* Stores the handle of the task that will be notified when the
transmission is complete. */
static TaskHandle_t xTaskToNotify = NULL;

/* The peripheral driver's transmit function. */
void StartTransmission( uint8_t *pcData, size_t xDataLength )
{
    /* At this point xTaskToNotify should be NULL as no transmission
    is in progress.  A mutex can be used to guard access to the
    peripheral if necessary. */
    configASSERT( xTaskToNotify == NULL );

    /* Store the handle of the calling task. */
    xTaskToNotify = xTaskGetCurrentTaskHandle();

    /* Start the transmission - an interrupt is generated when the
    transmission is complete. */
    vStartTransmit( pcData, xDatalength );
}

/* This is an example of a transmit function in a generic
peripheral driver.  An RTOS task calls the transmit function,
then waits in the Blocked state (so not using an CPU time) 
until it is notified that the transmission is complete.  The
transmission is performed by a DMA, and the DMA end interrupt
is used to notify the task. */

/* Stores the handle of the task that will be notified when the
transmission is complete. */
static TaskHandle_t xTaskToNotify = NULL;

/* The peripheral driver's transmit function. */
void StartTransmission( uint8_t *pcData, size_t xDataLength )
{
    /* At this point xTaskToNotify should be NULL as no transmission
    is in progress.  A mutex can be used to guard access to the
    peripheral if necessary. */
    configASSERT( xTaskToNotify == NULL );

    /* Store the handle of the calling task. */
    xTaskToNotify = xTaskGetCurrentTaskHandle();

    /* Start the transmission - an interrupt is generated when the
    transmission is complete. */
    vStartTransmit( pcData, xDatalength );
}

/*******************************************************************************
* @brief    LED flash Continuous loop
* @param    None
* @retval   None
*/
void LED_flash_1s_continuousLoop( led_t *phLed )
{
    while( 1 ) 
    {
        LED_on( phLed );
        HAL_Delay( 100 );
        LED_off( phLed );
        HAL_Delay( 900 );
    };
}
/*******************************************************************************
* @brief    LED flash Continuous loop
* @param    None
* @retval   None
*/
void LED_flash_1s_continuousLoop( led_t *phLed )
{
    while( 1 ) 
    {
        LED_on( phLed );
        HAL_Delay( 100 );
        LED_off( phLed );
        HAL_Delay( 900 );
    };
}
/*******************************************************************************
* @brief    LED flash Continuous loop
* @param    None
* @retval   None
*/
void LED_flash_1s_continuousLoop( led_t *phLed )
{
    while( 1 ) 
    {
        LED_on( phLed );
        HAL_Delay( 100 );
        LED_off( phLed );
        HAL_Delay( 900 );
    };
}​
/*******************************************************************************
* @brief    LED flash Continuous loop
* @param    None
* @retval   None
*/
void LED_flash_1s_continuousLoop( led_t *phLed )
{
    while( 1 ) 
    {
        LED_on( phLed );
        HAL_Delay( 100 );
        LED_off( phLed );
        HAL_Delay( 900 );
    };
}
/* The peripheral driver's transmit function. */
void StartTransmission( uint8_t *pcData, size_t xDataLength )
{
    /* At this point xTaskToNotify should be NULL as no transmission
    is in progress.  A mutex can be used to guard access to the
    peripheral if necessary. */
    configASSERT( xTaskToNotify == NULL );
 
    /* Store the handle of the calling task. */
    xTaskToNotify = <a href="https://www.freertos.org/a00021.html#xTaskGetCurrentTaskHandle">xTaskGetCurrentTaskHandle()</a>;
 
    /* Start the transmission - an interrupt is generated when the
    transmission is complete. */
    vStartTransmit( pcData, xDatalength );
}
/* The peripheral driver's transmit function. */
void StartTransmission( uint8_t *pcData, size_t xDataLength )
{
    /* At this point xTaskToNotify should be NULL as no transmission
    is in progress.  A mutex can be used to guard access to the
    peripheral if necessary. */
    configASSERT( xTaskToNotify == NULL );

    /* Store the handle of the calling task. */
    xTaskToNotify = xTaskGetCurrentTaskHandle();

    /* Start the transmission - an interrupt is generated when the
    transmission is complete. */
    vStartTransmit( pcData, xDatalength );
}
Hobby's category: