summaryrefslogtreecommitdiff
path: root/hal/phy/maximus/src/maximus_phy_access.c
diff options
context:
space:
mode:
Diffstat (limited to 'hal/phy/maximus/src/maximus_phy_access.c')
-rw-r--r--hal/phy/maximus/src/maximus_phy_access.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/hal/phy/maximus/src/maximus_phy_access.c b/hal/phy/maximus/src/maximus_phy_access.c
index 8d043ad717..dd88f81cf1 100644
--- a/hal/phy/maximus/src/maximus_phy_access.c
+++ b/hal/phy/maximus/src/maximus_phy_access.c
@@ -31,7 +31,8 @@ extern uint32_t maximus_pending_isrs;
void maximus_phy_access_backoff_cb (void *data)
{
/* At the corresponding event reception, this function is called with the given cap as argument. */
-
+
+ dbg_assert_ptr(data);
if (NULL == data)
{
errno = EINVAL;
@@ -40,6 +41,7 @@ void maximus_phy_access_backoff_cb (void *data)
{
maximus_phy_access_backoff_t *access_backoff_data = (maximus_phy_access_backoff_t*)data;
+ dbg_assert_ptr(access_backoff_data->ctx);
if (NULL == access_backoff_data->ctx)
{
errno = EINVAL;
@@ -168,6 +170,7 @@ void maximus_phy_access_backoff_cb (void *data)
void
maximus_phy_access_slot_count_cb (void *data)
{
+ dbg_assert_ptr(data);
if (NULL == data)
{
errno = EINVAL;
@@ -214,6 +217,7 @@ maximus_phy_access_slot_count_cb (void *data)
void
maximus_phy_access_prs0_cb (void *data)
{
+ dbg_assert_ptr(data);
if (NULL == data)
{
errno = EINVAL;
@@ -317,6 +321,7 @@ maximus_phy_access_prs0_cb (void *data)
void
maximus_phy_access_prs1_cb (void *data)
{
+ dbg_assert_ptr(data);
if (NULL == data)
{
errno = EINVAL;
@@ -358,6 +363,7 @@ void maximus_phy_access_timer_cb (void *data)
/* If no PRE has been received, PHY raises an IT_ACCESS when access timer expires,
* i.e. this callback has to call the 'phy_access_cb'. */
+ dbg_assert_ptr(data);
if (NULL == data)
{
errno = EINVAL;
@@ -366,6 +372,8 @@ void maximus_phy_access_timer_cb (void *data)
{
maximus_phy_access_timer_t *access_timer_data = (maximus_phy_access_timer_t*)data;
+ dbg_assert_ptr(access_timer_data->ctx);
+ dbg_assert_ptr(access_timer_data->ctx->control.access_cb);
if ((NULL == access_timer_data->ctx)
|| (NULL == access_timer_data->ctx->control.access_cb))
{
@@ -403,7 +411,8 @@ phy_access_backoff_start (phy_t *ctx, u32 date, uint cap)
* defining a date to start PRP and giving the CAP. */
static maximus_phy_access_backoff_t cb_data;
-
+
+ dbg_assert_ptr(ctx);
if (NULL == ctx)
{
errno = EINVAL;
@@ -450,7 +459,8 @@ phy_access_backoff_update (phy_t *ctx, uint cap)
* - if this occurs before the PRP, the new CAP can be used without any other precaution;
* - if this occurs during the PRS0, the new CAP can change the PRS1 only (if the new CAP is higher than the old one, the PRS1 will be 1, if it is lower, the PRS1 will be 0);
* - if this occurs after the PRS0, the CAP can not be changed. */
-
+
+ dbg_assert_ptr(ctx);
if (NULL == ctx)
{
errno = EINVAL;
@@ -494,7 +504,8 @@ phy_access_backoff_slot_count (phy_t *ctx)
* Return the slot_count value of PHY context. */
uint slot_count = 0;
-
+
+ dbg_assert_ptr(ctx);
if (NULL == ctx)
{
errno = EINVAL;
@@ -522,7 +533,8 @@ phy_access_backoff_prp_won (phy_t *ctx)
* Return the prp_result value of PHY context. */
bool prp_result = false;
-
+
+ dbg_assert_ptr(ctx);
if (NULL == ctx)
{
errno = EINVAL;
@@ -549,7 +561,8 @@ phy_access_timer_program (phy_t *ctx, u32 date)
/* CA programs the access timer in order to precise the date at which CA decides to prepare its Tx. */
static maximus_phy_access_timer_t cb_data;
-
+
+ dbg_assert_ptr(ctx);
if (NULL == ctx)
{
errno = EINVAL;
@@ -588,7 +601,8 @@ void
phy_access_timer_cancel (phy_t *ctx)
{
/* When modem is stopped, CA cancels the access timer. */
-
+
+ dbg_assert_ptr(ctx);
if(NULL == ctx)
{
errno = EINVAL;