pico-tracker/firmware/inc/contestia.h

59 wiersze
2.0 KiB
C

/*
* Outputs contestia to the si_trx
* Copyright (C) 2015 Richard Meadows <richardeoin>
*
* 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.
*/
#ifndef CONTESTIA_H
#define CONTESTIA_H
/* /\** */
/* * Contestia 8/1000 */
/* *\/ */
/* #define CONTESTIA_NUMBER_OF_TONES 8 */
/* #define CONTESTIA_CHARACTERS_PER_BLOCK 3 */
/* #define CONTESTIA_CHANNEL_SPACING 16 // Corresponds to 124.88 Hz */
/* #define CONTESTIA_SYMBOL_RATE 125 */
/**
* Contestia 16/1000
*/
#define CONTESTIA_NUMBER_OF_TONES 16
#define CONTESTIA_CHARACTERS_PER_BLOCK 4
#define CONTESTIA_CHANNEL_SPACING 8 // Corresponds to 62.44 Hz
#define CONTESTIA_SYMBOL_RATE 62.5
/* /\** */
/* * Contestia 32/1000 */
/* *\/ */
/* #define CONTESTIA_NUMBER_OF_TONES 32 */
/* #define CONTESTIA_CHARACTERS_PER_BLOCK 5 */
/* #define CONTESTIA_CHANNEL_SPACING 4 // Corresponds to 31.22 Hz */
/* #define CONTESTIA_SYMBOL_RATE 31.25 */
void contestia_start(char* data);
void contestia_preamble(void);
uint8_t contestia_tick(void);
void contestiaize(char* string);
#endif /* CONTESTIA_H */