Speeduino
Loading...
Searching...
No Matches
Functions
pinMapping.cpp File Reference
#include "pinMapping.h"
#include "../../board_definition.h"
#include "../../preprocessor.h"

Functions

uint8_t pinTranslate (uint8_t rawPin)
 Translate between the pin list that appears in TS and the actual pin numbers.
 
uint8_t pinTranslateAnalog (uint8_t rawPin)
 Translate a pin number (0 - 22) to the relevant Ax (analog) pin reference.
 

Function Documentation

◆ pinTranslate()

uint8_t pinTranslate ( uint8_t  rawPin)

Translate between the pin list that appears in TS and the actual pin numbers.

For the digital IO, this will simply return the same number as the rawPin value as those are mapped directly. For analog pins, it will translate them into the correct internal pin number.

Parameters
rawPinHigh level pin number
Returns
Translated / usable pin number
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pinTranslateAnalog()

uint8_t pinTranslateAnalog ( uint8_t  rawPin)

Translate a pin number (0 - 22) to the relevant Ax (analog) pin reference.

This is required as some ARM chips do not have all analog pins in order (EG pin A15 != A14 + 1).

Parameters
rawPin
Returns
uint8_t
Here is the call graph for this function:
Here is the caller graph for this function: