AVRly - AVR Development Resources
|
Driver for a small, low power AM radio transmitter, to broadcast monophonic square wave tones over a short distance. More...
#include <avr/power.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "am_radio.h"
#include "pin_defines.h"
Go to the source code of this file.
Functions | |
void | init_am_radio (frequency_khz_t carrier_freq) |
Initialises timer/counter for radio transmission at a specified carrier frequency. More... | |
ISR (TIMER1_COMPA_vect) | |
void | am_radio_set_tempo (uint8_t bpm) |
Sets tempo for musical tones to be transmitted (in BPM). More... | |
void | am_radio_transmit_note (note_pitch_t pitch, note_duration_t note_length) |
Transmits a square wave, monophonic note for the specified duration. More... | |
void | am_radio_rest (note_duration_t rest_length) |
Waits a specified duration before playing the next note. More... | |
void | arpeggio_in_c_test (void) |
Test sequence, transmits an arpeggio scale in C major. More... | |
Driver for a small, low power AM radio transmitter, to broadcast monophonic square wave tones over a short distance.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition in file am_radio.c.
void init_am_radio | ( | frequency_khz_t | carrier_freq | ) |
Initialises timer/counter for radio transmission at a specified carrier frequency.
Definition at line 47 of file am_radio.c.
ISR | ( | TIMER1_COMPA_vect | ) |
Definition at line 71 of file am_radio.c.
void am_radio_set_tempo | ( | uint8_t | bpm | ) |
Sets tempo for musical tones to be transmitted (in BPM).
Definition at line 80 of file am_radio.c.
void am_radio_transmit_note | ( | note_pitch_t | pitch, |
note_duration_t | note_length | ||
) |
Transmits a square wave, monophonic note for the specified duration.
Definition at line 94 of file am_radio.c.
void am_radio_rest | ( | note_duration_t | rest_length | ) |
Waits a specified duration before playing the next note.
Definition at line 119 of file am_radio.c.
void arpeggio_in_c_test | ( | void | ) |
Test sequence, transmits an arpeggio scale in C major.
Definition at line 131 of file am_radio.c.