summaryrefslogtreecommitdiff
path: root/hal/phy/maximus/inc
diff options
context:
space:
mode:
Diffstat (limited to 'hal/phy/maximus/inc')
-rw-r--r--hal/phy/maximus/inc/maximus_phy_access.h25
-rw-r--r--hal/phy/maximus/inc/maximus_phy_ctx.h20
2 files changed, 33 insertions, 12 deletions
diff --git a/hal/phy/maximus/inc/maximus_phy_access.h b/hal/phy/maximus/inc/maximus_phy_access.h
index 4125fe1bad..4505b1f59d 100644
--- a/hal/phy/maximus/inc/maximus_phy_access.h
+++ b/hal/phy/maximus/inc/maximus_phy_access.h
@@ -29,6 +29,26 @@ struct maximus_phy_access_backoff_t
typedef struct maximus_phy_access_backoff_t maximus_phy_access_backoff_t;
/**
+ * Maximus access slot count callback called when the corresponding netclock message is received.
+ * \param data pointer to phy_t structure.
+ */
+void maximus_phy_access_slot_count_cb (void *data);
+
+/**
+ * Maximus access PRS0 callback called when the corresponding netclock message is received,
+ * i.e. at the end of the PRS0.
+ * \param data pointer to phy_t structure.
+ */
+void maximus_phy_access_prs0_cb (void *data);
+
+/**
+ * Maximus access PRS1 callback called when the corresponding netclock message is received,
+ * i.e. at the end of the PRS1.
+ * \param data pointer to phy_t structure.
+ */
+void maximus_phy_access_prs1_cb (void *data);
+
+/**
* Maximus access timer program callback called when the corresponding netclock message is received.
*/
void maximus_phy_access_timer_cb (void *data);
@@ -41,9 +61,4 @@ struct maximus_phy_access_timer_t
};
typedef struct maximus_phy_access_timer_t maximus_phy_access_timer_t;
-/**
- * Maximus slot count callback called when the corresponding netclock message is received.
- */
-void maximus_phy_slot_count_cb (void *data);
-
#endif /* hal_phy_maximus_inc_maximus_phy_access_h */
diff --git a/hal/phy/maximus/inc/maximus_phy_ctx.h b/hal/phy/maximus/inc/maximus_phy_ctx.h
index 8f293f6c82..25639e169a 100644
--- a/hal/phy/maximus/inc/maximus_phy_ctx.h
+++ b/hal/phy/maximus/inc/maximus_phy_ctx.h
@@ -24,12 +24,11 @@
enum medium_state_t
{
- MAXIMUS_PHY_MEDIUM_NONE = 0x00,
- MAXIMUS_PHY_MEDIUM_PRE_DETECTED = 0x01,
- MAXIMUS_PHY_MEDIUM_BUSY_RX = 0x01,
- MAXIMUS_PHY_MEDIUM_PRP = 0x03,
- MAXIMUS_PHY_MEDIUM_BUSY_TX = 0x02,
- MAXIMUS_PHY_MEDIUM_IDLE = 0x04
+ MAXIMUS_PHY_MEDIUM_IDLE = 0x00,
+ MAXIMUS_PHY_MEDIUM_BUSY = 0x01,
+ MAXIMUS_PHY_MEDIUM_PRS0 = 0x02,
+ MAXIMUS_PHY_MEDIUM_PRS1 = 0x03,
+ MAXIMUS_PHY_MEDIUM_CW = 0x04
};
typedef enum medium_state_t medium_state_t;
@@ -38,9 +37,13 @@ struct maximus_phy_access_t
{
/** Channel access priority. Priority to assert in next PRP. Can be changed at anytime (by 'phy_access_backoff_update'). */
u8 cap_mpdu;
+ /** Current CAP asserted in previous PRP. */
+ u8 cap_sent;
+ /** Medium CAP decoded in previous PRP. */
+ u8 cap_medium;
/** Number of slots measured since end of PRP and before PRE detection. */
uint slot_count;
- /** Possible values are: NONE, BUSY_RX, BUSY_TX, PRP, IDLE. */
+ /** Possible values are: IDLE, BUSY, PRS0, PRS1, CW. */
medium_state_t medium_state;
/** PRP result. */
bool prp_result;
@@ -48,6 +51,7 @@ struct maximus_phy_access_t
netclock_id_t netclock_id;
/** Callback contexts to insert into callback queue. */
netclock_callback_t *access_backoff_netclock_cb;
+ netclock_callback_t *access_slot_count_netclock_cb;
netclock_callback_t *access_timer_netclock_cb;
};
typedef struct maximus_phy_access_t maximus_phy_access_t;
@@ -79,6 +83,8 @@ struct maximus_phy_ctrl_t
phy_fc_mode_t fc_mode;
/** Used to enable or disable PRE detection. */
bool pre_detection;
+ /** Used to set RX mode (true) or TX mode (false).*/
+ bool rx_tx_mode;
/** Callback contexts to insert into callback queue. */
netclock_callback_t *tx_frame_netclock_cb;
netclock_callback_t *rx_activate_netclock_cb;