summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hal/phy/maximus/inc/maximus_phy_ctx.h9
-rw-r--r--hal/phy/maximus/src/maximus_pbdma.c4
-rw-r--r--hal/phy/maximus/src/maximus_phy_ctrl.c14
-rw-r--r--hal/phy/maximus/test/src/test_pbdma.c2
-rw-r--r--maximus/stationtest/src/test_send.c4
-rw-r--r--maximus/stationtest/src/test_tx_rx.c4
6 files changed, 14 insertions, 23 deletions
diff --git a/hal/phy/maximus/inc/maximus_phy_ctx.h b/hal/phy/maximus/inc/maximus_phy_ctx.h
index a84352130f..89ed03bf06 100644
--- a/hal/phy/maximus/inc/maximus_phy_ctx.h
+++ b/hal/phy/maximus/inc/maximus_phy_ctx.h
@@ -215,15 +215,6 @@ struct maximus_phy_ctrl_t
};
typedef struct maximus_phy_ctrl_t maximus_phy_ctrl_t;
-enum maximus_phy_chandata_type_t
-{
- MAXIMUS_PHY_CHANDATA_TYPE_NONE = 0x00,
- MAXIMUS_PHY_CHANDATA_TYPE_FREQUENCY_NOISE = 0x01,
- MAXIMUS_PHY_CHANDATA_TYPE_TIME_NOISE = 0x02,
- MAXIMUS_PHY_CHANDATA_TYPE_NB = 0x03
-};
-typedef enum maximus_phy_chandata_type_t maximus_phy_chandata_type_t;
-
/** PB DMA structure for Maximus */
struct maximus_pbdma_t
{
diff --git a/hal/phy/maximus/src/maximus_pbdma.c b/hal/phy/maximus/src/maximus_pbdma.c
index 9445ba19f7..7da493ca4d 100644
--- a/hal/phy/maximus/src/maximus_pbdma.c
+++ b/hal/phy/maximus/src/maximus_pbdma.c
@@ -154,11 +154,11 @@ phy_pbdma_start_chandata (phy_t *ctx, phy_chandata_t *first_chandata)
{
dbg_assert_ptr(ctx);
dbg_assert_ptr(first_chandata);
- dbg_assert((MAXIMUS_PHY_CHANDATA_TYPE_NONE < first_chandata->type) && (MAXIMUS_PHY_CHANDATA_TYPE_NB > first_chandata->type));
+ dbg_assert((PHY_CHANDATA_TYPE_NO_MEMORY_READ < first_chandata->type) && (PHY_CHANDATA_TYPE_NRJ_SYMBOL >= first_chandata->type));
MAXIMUS_PHY_TRACE (PBDMA_START_CHANDATA);
if ((NULL == ctx)
|| (NULL == first_chandata)
- || (MAXIMUS_PHY_CHANDATA_TYPE_NONE >= first_chandata->type) || (MAXIMUS_PHY_CHANDATA_TYPE_NB <= first_chandata->type))
+ || (PHY_CHANDATA_TYPE_NO_MEMORY_READ >= first_chandata->type) || (PHY_CHANDATA_TYPE_NRJ_SYMBOL < first_chandata->type))
{
errno = EINVAL;
station_log(&my_station, STATION_LOG_ERROR, STATION_LOGTYPE_PHY,
diff --git a/hal/phy/maximus/src/maximus_phy_ctrl.c b/hal/phy/maximus/src/maximus_phy_ctrl.c
index 43c4064551..2b1316f5b5 100644
--- a/hal/phy/maximus/src/maximus_phy_ctrl.c
+++ b/hal/phy/maximus/src/maximus_phy_ctrl.c
@@ -1018,21 +1018,21 @@ maximus_phy_recv_noise (phy_t *ctx, sci_msg_t *msg)
MAXIMUS_PHY_TRACE (M_RECV_CHANDATA, my_station.current_tick_tck);
unsigned short int current_size; // in octets
- maximus_phy_chandata_type_t current_type;
+ phy_chandata_type_t current_type;
phy_chandata_t *current_chandata;
unsigned short int total_size[2]; // in octets
total_size[0] = 0;
total_size[1] = 0;
unsigned short int max_size[2]; // in octets
- max_size[MAXIMUS_PHY_CHANDATA_TYPE_FREQUENCY_NOISE - 1] = PHY_CARRIER_NB*sizeof(u16); // in octets
- max_size[MAXIMUS_PHY_CHANDATA_TYPE_TIME_NOISE - 1] = MAC_MAX_SYMB_PER_MPDU*sizeof(u16); // in octets
+ max_size[PHY_CHANDATA_TYPE_NRJ - 1] = PHY_CARRIER_NB*sizeof(u16); // in octets
+ max_size[PHY_CHANDATA_TYPE_NRJ_SYMBOL - 1] = MAC_MAX_SYMB_PER_MPDU*sizeof(u16); // in octets
/* For a chandata transfer, all data are received into one SCI message. */
u8 frequency_noise[PHY_CARRIER_NB*sizeof(u16)];
u8 time_noise[MAC_MAX_SYMB_PER_MPDU*sizeof(u16)];
u8 * noise[2];
- noise[MAXIMUS_PHY_CHANDATA_TYPE_FREQUENCY_NOISE - 1] = frequency_noise;
- noise[MAXIMUS_PHY_CHANDATA_TYPE_TIME_NOISE - 1] = time_noise;
+ noise[PHY_CHANDATA_TYPE_NRJ - 1] = frequency_noise;
+ noise[PHY_CHANDATA_TYPE_NRJ_SYMBOL - 1] = time_noise;
// when message is received, frequency_noise is read
memcpy(frequency_noise, msg->data_begin, PHY_CARRIER_NB*sizeof(u16));
@@ -1052,8 +1052,8 @@ maximus_phy_recv_noise (phy_t *ctx, sci_msg_t *msg)
{
current_size = 4*current_chandata->size; // current_chandata->size in words
current_type = current_chandata->type;
- if ((MAXIMUS_PHY_CHANDATA_TYPE_NONE >= current_type)
- || (MAXIMUS_PHY_CHANDATA_TYPE_NB <= current_type))
+ if ((PHY_CHANDATA_TYPE_NO_MEMORY_READ >= current_type)
+ || (PHY_CHANDATA_TYPE_NRJ_SYMBOL < current_type))
{
errno = EPROTO;
station_log(&my_station, STATION_LOG_ERROR, STATION_LOGTYPE_PHY,
diff --git a/hal/phy/maximus/test/src/test_pbdma.c b/hal/phy/maximus/test/src/test_pbdma.c
index 85f0c945df..e86918a806 100644
--- a/hal/phy/maximus/test/src/test_pbdma.c
+++ b/hal/phy/maximus/test/src/test_pbdma.c
@@ -265,7 +265,7 @@ void phy_pbdma_start_chandata_test_case(test_t t)
chandata.blk.data = chandata_data;
chandata.size = chandata_size;
chandata.last = 1;
- chandata.type = MAXIMUS_PHY_CHANDATA_TYPE_TIME_NOISE;
+ chandata.type = PHY_CHANDATA_TYPE_NRJ_SYMBOL;
chandata.address = 0;
phy_pbdma_start_chandata (ctx, &chandata);
diff --git a/maximus/stationtest/src/test_send.c b/maximus/stationtest/src/test_send.c
index de87894054..d6a6023d3d 100644
--- a/maximus/stationtest/src/test_send.c
+++ b/maximus/stationtest/src/test_send.c
@@ -180,7 +180,7 @@ int prepare_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
}
freq_chan[i].size = transfer_size;
freq_chan[i].last = 0;
- freq_chan[i].type = MAXIMUS_PHY_CHANDATA_TYPE_FREQUENCY_NOISE;
+ freq_chan[i].type = PHY_CHANDATA_TYPE_NRJ;
freq_chan[i].address = 0;
c++;
}
@@ -189,7 +189,7 @@ int prepare_rx (fcall_ctx_t *fcall, fcall_param_t **param, sci_msg_t **msg, void
time_chan.blk.next = NULL;
time_chan.size = transfer_size;
time_chan.last = 1;
- time_chan.type = MAXIMUS_PHY_CHANDATA_TYPE_TIME_NOISE;
+ time_chan.type = PHY_CHANDATA_TYPE_NRJ_SYMBOL;
time_chan.address = 0;
phy_pbdma_start_chandata(ctx, freq_chan);
diff --git a/maximus/stationtest/src/test_tx_rx.c b/maximus/stationtest/src/test_tx_rx.c
index c843f7ba6f..a1dd34b029 100644
--- a/maximus/stationtest/src/test_tx_rx.c
+++ b/maximus/stationtest/src/test_tx_rx.c
@@ -101,7 +101,7 @@ void start_pbdma_chandata (void)
time_chan.blk.next = &freq_chan[0].blk;
time_chan.size = transfer_size;
time_chan.last = 0;
- time_chan.type = MAXIMUS_PHY_CHANDATA_TYPE_TIME_NOISE;
+ time_chan.type = PHY_CHANDATA_TYPE_NRJ_SYMBOL;
time_chan.address = 0;
// Frequency noise
@@ -120,7 +120,7 @@ void start_pbdma_chandata (void)
freq_chan[i].last = 1;
}
freq_chan[i].size = transfer_size;
- freq_chan[i].type = MAXIMUS_PHY_CHANDATA_TYPE_FREQUENCY_NOISE;
+ freq_chan[i].type = PHY_CHANDATA_TYPE_NRJ;
freq_chan[i].address = 0;
c++;
}