Refactor dds into dds and fgen

driver module started
This commit is contained in:
2025-06-20 18:02:50 -05:00
parent 658cedfa3b
commit 0556b06cab
22 changed files with 299 additions and 466 deletions

View File

@@ -36,6 +36,9 @@ void io_update(void);
#define _P1(p1, p2) p1
#define _P2(p1, p2) p2
#define PORT(port_pin) _P1 port_pin
#define PIN(port_pin) _P2 port_pin
#define GPIO_WRITE(port_pin, value) GPIO_PinWrite(GPIO, _P1 port_pin, _P2 port_pin, value )
#define GPIO_READ(port_pin) GPIO_PinRead (GPIO, _P1 port_pin, _P2 port_pin)
@@ -80,14 +83,38 @@ void io_update(void);
#define TOP_SR_NC1 0b01000000
#define TOP_SR_NC2 0b10000000
#define _TAP1_LF_ON (BOTTOM_SR, TAP_102_LF | TAP_204_LF)
#define _TAP2_LF_ON (BOTTOM_SR, TAP_102_LF)
#define _TAP3_LF_ON (BOTTOM_SR, TAP_204_LF)
#define _TAP4_LF_ON (BOTTOM_SR, 0)
#define _TAP1_LF_ON (BOT_SR, TAP_102_LF | TAP_204_LF)
#define _TAP2_LF_ON (BOT_SR, TAP_102_LF)
#define _TAP3_LF_ON (BOT_SR, TAP_204_LF)
#define _TAP4_LF_ON (BOT_SR, 0)
#define BYPASS_ON (MID_SR , LF_BYPASS)
#define BACKLIGHT_ON (BOT_SR, BKLITE_ON)
#define AMP_AB_ON (TOP_SR, MUX_AB_AMP)
#define BROADCAST_AMP_EN (MID_SR, ANT_AMP_EN)
#define BROADCAST_AMP_PWR (TOP_SR, ANT_AMP_SW)
#define AMP_D_EN (MID_SR, DAMP_EN)
#define _AMP_PSU_ON (BOT_SR, AMP_PSU)
#define BYPASS_ON (MID_SR, LF_BYPASS)
#define EXPANDER_SET(port_pins, update) io_expanderSet (_P1 port_pins, _P2 port_pins, update)
#define EXPANDER_CLEAR(port_pins, update) io_expanderClear(_P1 port_pins, _P2 port_pins, update)
typedef struct
{
uint32_t port;
uint32_t pin;
} gpio_pin_t;
void io_expanderClearAll(bool update);
void io_backlightOn(bool on, bool update);
void io_ampABOn(bool on, bool update);
void io_ampDOn(bool on, bool update);
void io_broadcastOn(bool on, bool update);
void io_ampPsuOn(bool on, bool update);
#endif