Skip to content

File wiring_custom.c

FileList > arduino > src > wiring > wiring_custom.c

Go to the source code of this file.

  • #include "wiring_private.h"

Public Attributes

Type Name
int _analogReadResolution = = 10
int _analogWritePeriod = = 20000
int _analogWriteResolution = = 8

Public Static Attributes

Type Name
unsigned long periodicTasks = = {0, 0}

Public Functions

Type Name
__attribute__ ((weak))
int analogRead (pin_size_t pinNumber)
Read voltage from ADC and return a value between 0 and the current reading resolution.
void analogReadResolution (int res)
Set resolution of values (in bits) returned by analogRead(). Defaults to 10 bit (0-1023).
void analogWriteFrequency (int hz)
Set PWM output frequency (in Hz). Defaults to 50 Hz (20,000 uS).
void analogWritePeriod (int us)
Set PWM output frequency (cycle period) in microseconds. Defaults to 20,000 uS (50 Hz).
void analogWriteResolution (int res)
Set resolution of values (in bits) expected by analogWrite(). Defaults to 8 bit (0-255).
PinInfo * pinByGpio (uint32_t gpio)
Find PinInfo struct by GPIO number. Returns NULL if not found.
PinInfo * pinByIndex (uint32_t index)
Get PinInfo struct for the specified index. Returns NULL if pin index is invalid.
bool pinEnabled (PinInfo * pin, uint32_t mask)
Check if pin has all features represented by 'mask' enabled.
uint32_t pinIndex (PinInfo * pin)
Get index of PinInfo in the global pin info table.
PinInfo * pinInfo (pin_size_t pinNumber)
Get PinInfo struct for the specified number. Returns NULL if pin number is invalid.
void pinModeRemove (pin_size_t pinNumber, uint32_t mask)
Disable modes specified by 'mask'.
bool pinSupported (PinInfo * pin, uint32_t mask)
Check if pin supports all features represented by 'mask'.
void runPeriodicTasks ()
Run periodic tasks, like printing free heap or checking millis() overflow.

Public Attributes Documentation

variable _analogReadResolution

int _analogReadResolution;

variable _analogWritePeriod

int _analogWritePeriod;

variable _analogWriteResolution

int _analogWriteResolution;

Public Static Attributes Documentation

variable periodicTasks

unsigned long periodicTasks[];

Public Functions Documentation

function __attribute__

__attribute__ (
    (weak)
) 

function analogRead

int analogRead (
    pin_size_t pinNumber
) 

function analogReadResolution

void analogReadResolution (
    int res
) 

function analogWriteFrequency

void analogWriteFrequency (
    int hz
) 

function analogWritePeriod

void analogWritePeriod (
    int us
) 

function analogWriteResolution

void analogWriteResolution (
    int res
) 

function pinByGpio

PinInfo * pinByGpio (
    uint32_t gpio
) 

function pinByIndex

PinInfo * pinByIndex (
    uint32_t index
) 

function pinEnabled

bool pinEnabled (
    PinInfo * pin,
    uint32_t mask
) 

function pinIndex

uint32_t pinIndex (
    PinInfo * pin
) 

function pinInfo

PinInfo * pinInfo (
    pin_size_t pinNumber
) 

function pinModeRemove

void pinModeRemove (
    pin_size_t pinNumber,
    uint32_t mask
) 

function pinSupported

bool pinSupported (
    PinInfo * pin,
    uint32_t mask
) 

function runPeriodicTasks

Run periodic tasks, like printing free heap or checking millis() overflow.

void runPeriodicTasks () 

This is called during delaying operations, like yield() or delay().


The documentation for this class was generated from the following file cores/common/arduino/src/wiring/wiring_custom.c