Modbus Vault v1.0
Loading...
Searching...
No Matches
debug_pins.h File Reference

Debug using GPIO toggling. More...

#include "driver/gpio.h"
#include "sdkconfig.h"
Include dependency graph for debug_pins.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PINS_TABLE(ENTRY)
 Debug pins table.
 
#define AS_ENUM(pin_name, pin_num)   pin_name = pin_num,
 
#define DEBUG_GPIO_SET(pin)
 
#define DEBUG_GPIO_CLR(pin)
 

Enumerations

enum  debug_pins_t { DEBUG_PINS_FRAME_CAPTURE = (GPIO_NUM_6) , DEBUG_PINS_FRAME_SERIALIZED = (GPIO_NUM_7) , DEBUG_PINS_FRAME_PUBLISHED = (GPIO_NUM_8) , DEBUG_PINS_FRAME_LOGGED = (GPIO_NUM_9) }
 Debug pins Enums. More...
 

Functions

esp_err_t init_debug_pins (void)
 Initiate debug pins if any.
 

Detailed Description

Debug using GPIO toggling.

Author
Abanoub Salah

This module handles debugging code using pins toggling for different modules.

Macro Definition Documentation

◆ AS_ENUM

#define AS_ENUM (   pin_name,
  pin_num 
)    pin_name = pin_num,

We will extract both name and number from table

◆ DEBUG_GPIO_CLR

#define DEBUG_GPIO_CLR (   pin)

Does nothing

◆ DEBUG_GPIO_SET

#define DEBUG_GPIO_SET (   pin)

Does nothing

◆ PINS_TABLE

#define PINS_TABLE (   ENTRY)
Value:
ENTRY (DEBUG_PINS_FRAME_CAPTURE, (GPIO_NUM_6)) \
ENTRY (DEBUG_PINS_FRAME_SERIALIZED, (GPIO_NUM_7)) \
ENTRY (DEBUG_PINS_FRAME_PUBLISHED, (GPIO_NUM_8)) \
ENTRY (DEBUG_PINS_FRAME_LOGGED, (GPIO_NUM_9))

Debug pins table.

Note
  • Entry format as follows
    • ENTRY (pin_name, pin_num)
  • Where
    • pin_name: Enum used within code
    • pin_num: Pin number

Enumeration Type Documentation

◆ debug_pins_t

Debug pins Enums.

Note
To add a pin simply add an entry to PINS_TABLE above and start using it within your code

Function Documentation

◆ init_debug_pins()

esp_err_t init_debug_pins ( void  )

Initiate debug pins if any.

Returns
esp_err_t Initialize result
Return values
ESP_OKInitialize success
ESP_ERR_INVALID_ARGProvided invalid argument(s)
Here is the caller graph for this function: