Macros | Fonctions | Variables
Référence du fichier Tone.cpp
#include "Tone.h"
#include "variant.h"

Macros

#define WAIT_TC16_REGS_SYNC(x)   while(x->COUNT16.STATUS.bit.SYNCBUSY);
 
#define TONE_TC   TC3
 
#define TONE_TC_IRQn   TC3_IRQn
 
#define TONE_TC_TOP   0xFFFF
 
#define TONE_TC_CHANNEL   0
 

Fonctions

void TC3_Handler (void)
 
void toneAccurateClock (uint32_t accurateSystemCoreClockFrequency)
 
void tone (uint32_t outputPin, uint32_t frequency, uint32_t duration)
 
void noTone (uint32_t outputPin)
 

Variables

uint32_t toneMaxFrequency = F_CPU / 2
 
uint32_t lastOutputPin = 0xFFFFFFFF
 
volatile uint32_t * portToggleRegister
 
volatile uint32_t * portClearRegister
 
volatile uint32_t portBitMask
 
volatile int64_t toggleCount
 
volatile bool toneIsActive = false
 
volatile bool firstTimeRunning = false
 

Documentation des macros

◆ TONE_TC

#define TONE_TC   TC3

◆ TONE_TC_CHANNEL

#define TONE_TC_CHANNEL   0

◆ TONE_TC_IRQn

#define TONE_TC_IRQn   TC3_IRQn

◆ TONE_TC_TOP

#define TONE_TC_TOP   0xFFFF

◆ WAIT_TC16_REGS_SYNC

#define WAIT_TC16_REGS_SYNC (   x)    while(x->COUNT16.STATUS.bit.SYNCBUSY);

Documentation des fonctions

◆ noTone()

void noTone ( uint32_t  outputPin)

◆ TC3_Handler()

void TC3_Handler ( void  )

◆ tone()

void tone ( uint32_t  outputPin,
uint32_t  frequency,
uint32_t  duration 
)

◆ toneAccurateClock()

void toneAccurateClock ( uint32_t  accurateSystemCoreClockFrequency)

Documentation des variables

◆ firstTimeRunning

volatile bool firstTimeRunning = false

◆ lastOutputPin

uint32_t lastOutputPin = 0xFFFFFFFF

◆ portBitMask

volatile uint32_t portBitMask

◆ portClearRegister

volatile uint32_t* portClearRegister

◆ portToggleRegister

volatile uint32_t* portToggleRegister

◆ toggleCount

volatile int64_t toggleCount

◆ toneIsActive

volatile bool toneIsActive = false

◆ toneMaxFrequency

uint32_t toneMaxFrequency = F_CPU / 2