COSA
An Object-Oriented Platform for Arduino Programming
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Tone.hh
Go to the documentation of this file.
1
21
#ifndef COSA_TONE_HH
22
#define COSA_TONE_HH
23
24
#include "
Cosa/Types.h
"
25
69
class
Tone
{
70
public
:
72
static
const
uint8_t
VOLUME_MAX
= 10;
73
77
static
void
begin
();
78
87
static
void
play
(uint16_t freq,
88
uint8_t volume = VOLUME_MAX / 2,
89
uint16_t duration = 0,
90
bool
background =
false
);
91
95
static
void
silent
();
96
97
private
:
101
Tone
();
102
103
static
uint32_t s_expires;
104
static
const
uint8_t s_map[] PROGMEM;
105
friend
void
TIMER1_COMPA_vect
(
void
);
106
};
107
#endif
108
Types.h
Tone::play
static void play(uint16_t freq, uint8_t volume=VOLUME_MAX/2, uint16_t duration=0, bool background=false)
Definition:
Tone.cpp:67
Tone::VOLUME_MAX
static const uint8_t VOLUME_MAX
Definition:
Tone.hh:72
Tone::silent
static void silent()
Definition:
Tone.cpp:109
Tone::begin
static void begin()
Definition:
Tone.cpp:60
Tone::TIMER1_COMPA_vect
friend void TIMER1_COMPA_vect(void)
Tone
Definition:
Tone.hh:69
cores
cosa
Cosa
Tone.hh
Generated on Thu Aug 31 2017 17:02:03 for COSA by
1.8.11