Configuring and trigger GPIO on FreeRTOS

On my MQTT broker I wanted to have also a visual view of incoming packets along with monitoring the WiFi connection.

To do that I need to control the RGB led connected on my Witty module.

Controlling the GPIO assume two steps:

1. Configuring the GPIO

        #include "gpio.h"
        #define LED13_GPIO 13

    GPIO_ConfigTypeDef led13;
    led13.GPIO_Pin = GPIO_Pin_13;
    led13.GPIO_Mode = GPIO_Mode_Output;
    led13.GPIO_Pullup = GPIO_PullUp_DIS;
    led13.GPIO_IntrType = GPIO_PIN_INTR_DISABLE;


2. Triggering the GPIO 

    vTaskDelay(100 / portTICK_RATE_MS);


0 Response to "Configuring and trigger GPIO on FreeRTOS "

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel