summaryrefslogtreecommitdiff
path: root/firmware/s1224/include/afsk_profile.h
blob: da0fc29c48fdd0cb2682d170a9981aa093bd66a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 */
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com