Loading...
Searching...
No Matches
Direct pin control for debugging/profiling

Detailed Description

Warning
This module does not verify the given pin number, so make sure the pin numbers you use are actually configured!

Files

file  dbgpin.h
 GPIO wrapper for debugging/profiling purposes.
 

Functions

static void dbgpin_set (unsigned pin)
 Set the given debug pin to HIGH.
 
static void dbgpin_clear (unsigned pin)
 Set the given debug pin to LOW.
 
static void dbgpin_toggle (unsigned pin)
 Toggle the given debug pin.
 
static void dbgpin_pulse (unsigned pin)
 Output a pulse on the given debug pin (toggles the pin twice)
 
static void dbgpin_signal (unsigned pin, unsigned num)
 Output a specified number of pulses on the given debug pin.
 
static size_t dbgpin_count (void)
 Get the number of configured debug pins.
 
static void dbgpin_init (void)
 Initialize the configured input pins.
 

Function Documentation

◆ dbgpin_clear()

static void dbgpin_clear ( unsigned  pin)
inlinestatic

Set the given debug pin to LOW.

Parameters
[in]pinpin to set, pin number is offset to the list of defined debug pins in DBGPIN_PINS

Definition at line 56 of file dbgpin.h.

◆ dbgpin_count()

static size_t dbgpin_count ( void  )
inlinestatic

Get the number of configured debug pins.

Returns
number of configured debug pins

Definition at line 105 of file dbgpin.h.

◆ dbgpin_init()

static void dbgpin_init ( void  )
inlinestatic

Initialize the configured input pins.

Definition at line 114 of file dbgpin.h.

◆ dbgpin_pulse()

static void dbgpin_pulse ( unsigned  pin)
inlinestatic

Output a pulse on the given debug pin (toggles the pin twice)

Parameters
[in]pinpin to set, pin number is offset to the list of defined debug pins in DBGPIN_PINS

Definition at line 80 of file dbgpin.h.

◆ dbgpin_set()

static void dbgpin_set ( unsigned  pin)
inlinestatic

Set the given debug pin to HIGH.

Parameters
[in]pinpin to set, pin number is offset to the list of defined debug pins in DBGPIN_PINS

Definition at line 44 of file dbgpin.h.

◆ dbgpin_signal()

static void dbgpin_signal ( unsigned  pin,
unsigned  num 
)
inlinestatic

Output a specified number of pulses on the given debug pin.

Parameters
[in]pinpin to set, pin number is offset to the list of defined debug pins in DBGPIN_PINS
[in]numnumber of pulses to output

Definition at line 93 of file dbgpin.h.

◆ dbgpin_toggle()

static void dbgpin_toggle ( unsigned  pin)
inlinestatic

Toggle the given debug pin.

Parameters
[in]pinpin to set, pin number is offset to the list of defined debug pins in DBGPIN_PINS

Definition at line 68 of file dbgpin.h.