summaryrefslogtreecommitdiff
path: root/hal/phy/maximus
diff options
context:
space:
mode:
authorburet2008-03-19 14:22:04 +0000
committerburet2008-03-19 14:22:04 +0000
commitddfeaaa128740d0503831c2f519142eb56b06883 (patch)
tree1489ad197d5ffcb39656b21925af3c544b3b1aa3 /hal/phy/maximus
parent0e953e36003fc64546da9faf29ca6e2913b9cd72 (diff)
Maximus V2: remove the Maximus PHY chandata type and use the PHY chandata type.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1623 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'hal/phy/maximus')
-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
4 files changed, 10 insertions, 19 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);