basic rffc5071 tx/rx control from USB

This commit is contained in:
Michael Ossmann
2013-03-07 12:34:32 -07:00
parent 155a688d11
commit 2039b23e20

View File

@ -187,6 +187,8 @@ void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode) {
gpio_set(PORT_LED1_3, PIN_LED2);
usb_endpoint_init(&usb_endpoint_bulk_in);
rffc5071_rx(switchctrl);
rffc5071_set_frequency(1700, 0); // 2600 MHz IF - 1700 MHz LO = 900 MHz RF
max2837_start();
max2837_rx();
} else if (transceiver_mode == TRANSCEIVER_MODE_TX) {
@ -194,6 +196,8 @@ void set_transceiver_mode(const transceiver_mode_t new_transceiver_mode) {
gpio_set(PORT_LED1_3, PIN_LED3);
usb_endpoint_init(&usb_endpoint_bulk_out);
rffc5071_tx(switchctrl);
rffc5071_set_frequency(1700, 0); // 2600 MHz IF - 1700 MHz LO = 900 MHz RF
max2837_start();
max2837_tx();
} else {
@ -666,8 +670,6 @@ int main(void) {
#ifdef JAWBREAKER
switchctrl = SWITCHCTRL_AMP_BYPASS;
#endif
rffc5071_rx(switchctrl);
rffc5071_set_frequency(1700, 0); // 2600 MHz IF - 1700 MHz LO = 900 MHz RF
while(true) {
// Wait until buffer 0 is transmitted/received.