summaryrefslogtreecommitdiffstats
path: root/firmware/microblaze
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-16 13:49:39 -0700
committerJosh Blum <josh@joshknows.com>2010-03-16 13:49:39 -0700
commit8be3b883f5b1a889f4f07611e8954449cc07c2b3 (patch)
tree0622e8702105a6e43569b902b16700a0072d4cbd /firmware/microblaze
parentfc40ff2f1327d01c72c4d7dbc07a14e473251981 (diff)
downloaduhd-8be3b883f5b1a889f4f07611e8954449cc07c2b3.tar.gz
uhd-8be3b883f5b1a889f4f07611e8954449cc07c2b3.tar.bz2
uhd-8be3b883f5b1a889f4f07611e8954449cc07c2b3.zip
Added ability to set the subdevices in use for rx and tx dboards.
This is used to calculate and set the ddc and duc muxes. Also, minor fix for burning addrs (wrong pointer....)
Diffstat (limited to 'firmware/microblaze')
-rw-r--r--firmware/microblaze/apps/txrx.c11
-rw-r--r--firmware/microblaze/lib/ethernet.c4
2 files changed, 11 insertions, 4 deletions
diff --git a/firmware/microblaze/apps/txrx.c b/firmware/microblaze/apps/txrx.c
index 97376ffbd..8949f1263 100644
--- a/firmware/microblaze/apps/txrx.c
+++ b/firmware/microblaze/apps/txrx.c
@@ -427,7 +427,6 @@ void handle_udp_ctrl_packet(
case USRP2_CTRL_ID_SETUP_THIS_DDC_FOR_ME_BRO:
dsp_rx_regs->freq = ctrl_data_in->data.ddc_args.freq_word;
dsp_rx_regs->scale_iq = ctrl_data_in->data.ddc_args.scale_iq;
- dsp_rx_regs->rx_mux = 0x00 | (0x01 << 2); //TODO fill in from control
//setup the interp and half band filters
{
@@ -471,7 +470,6 @@ void handle_udp_ctrl_packet(
case USRP2_CTRL_ID_SETUP_THIS_DUC_FOR_ME_BRO:
dsp_tx_regs->freq = ctrl_data_in->data.duc_args.freq_word;
dsp_tx_regs->scale_iq = ctrl_data_in->data.duc_args.scale_iq;
- dsp_tx_regs->tx_mux = 0x01; //TODO fill in from control
//setup the interp and half band filters
{
@@ -504,6 +502,15 @@ void handle_udp_ctrl_packet(
ctrl_data_out.id = USRP2_CTRL_ID_SWEET_I_GOT_THAT_TIME_DUDE;
break;
+ /*******************************************************************
+ * MUX Config
+ ******************************************************************/
+ case USRP2_CTRL_ID_UPDATE_THOSE_MUX_SETTINGS_BRO:
+ dsp_rx_regs->rx_mux = ctrl_data_in->data.mux_args.rx_mux;
+ dsp_tx_regs->tx_mux = ctrl_data_in->data.mux_args.tx_mux;
+ ctrl_data_out.id = USRP2_CTRL_ID_UPDATED_THE_MUX_SETTINGS_DUDE;
+ break;
+
default:
ctrl_data_out.id = USRP2_CTRL_ID_HUH_WHAT;
diff --git a/firmware/microblaze/lib/ethernet.c b/firmware/microblaze/lib/ethernet.c
index 757a36ce4..0e731c68c 100644
--- a/firmware/microblaze/lib/ethernet.c
+++ b/firmware/microblaze/lib/ethernet.c
@@ -316,7 +316,7 @@ ethernet_mac_addr(void)
bool
ethernet_set_mac_addr(const eth_mac_addr_t *t)
{
- bool ok = eeprom_write(I2C_ADDR_MBOARD, MBOARD_MAC_ADDR, &t, sizeof(eth_mac_addr_t));
+ bool ok = eeprom_write(I2C_ADDR_MBOARD, MBOARD_MAC_ADDR, t, sizeof(eth_mac_addr_t));
if (ok){
src_mac_addr = *t;
src_mac_addr_initialized = true;
@@ -356,7 +356,7 @@ const struct ip_addr *get_ip_addr(void)
}
bool set_ip_addr(const struct ip_addr *t){
- bool ok = eeprom_write(I2C_ADDR_MBOARD, MBOARD_IP_ADDR, &t, sizeof(struct ip_addr));
+ bool ok = eeprom_write(I2C_ADDR_MBOARD, MBOARD_IP_ADDR, t, sizeof(struct ip_addr));
if (ok){
src_ip_addr = *t;
src_ip_addr_initialized = true;