diff options
Diffstat (limited to 'firmware/s1224/include/afsk_profile.h')
| -rw-r--r-- | firmware/s1224/include/afsk_profile.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/firmware/s1224/include/afsk_profile.h b/firmware/s1224/include/afsk_profile.h new file mode 100644 index 0000000..da0fc29 --- /dev/null +++ b/firmware/s1224/include/afsk_profile.h @@ -0,0 +1,35 @@ +/** + * Mark/space tone pairs per build (Hz) — see product README. + * SPDX-License-Identifier: GPL-3.0-or-later + */ +#ifndef S1224_AFSK_PROFILE_H +#define S1224_AFSK_PROFILE_H + +#include <stdint.h> + +#ifndef S1224_BITRATE +#define S1224_BITRATE 1200 +#endif + +typedef struct { + uint32_t baud; + uint32_t mark_hz; + uint32_t space_hz; + const char *profile_name; +} afsk_profile_t; + +static inline afsk_profile_t afsk_profile_get(void) +{ +#if S1224_BITRATE == 300 + return (afsk_profile_t){300, 1600, 1800, "HF-300 (1600/1800)"}; +#elif S1224_BITRATE == 1200 + return (afsk_profile_t){1200, 1200, 2200, "Bell202-1200"}; +#elif S1224_BITRATE == 2400 + /* c1224 Y2 / 6.5536 MHz field overclock class — NOT Dire Wolf 2400 */ + return (afsk_profile_t){2400, 1775, 3250, "Y2-class-2400"}; +#else +#error "S1224_BITRATE must be 300, 1200, or 2400" +#endif +} + +#endif /* S1224_AFSK_PROFILE_H */ |
