Skip to content

Minor optimisation to mcr20a-rf-driver code #12427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions components/802.15.4_RF/mcr20a-rf-driver/source/MCR20Drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_INTERRUPTIN && defined(MBED_CONF_RTOS_PRESENT)

#include "platform/mbed_critical.h"
#include <string.h>

/*****************************************************************************
* PRIVATE VARIABLES *
Expand Down Expand Up @@ -165,7 +166,7 @@ void MCR20Drv_DirectAccessSPIMultiByteWrite
{
uint8_t txData;

if ((numOfBytes == 0) || (byteArray == 0)) {
if ((numOfBytes == 0) || (byteArray == NULL)) {
return;
}

Expand Down Expand Up @@ -230,7 +231,7 @@ void MCR20Drv_PB_SPIBurstWrite
{
uint8_t txData;

if ((numOfBytes == 0) || (byteArray == 0)) {
if ((numOfBytes == 0) || (byteArray == NULL)) {
return;
}

Expand Down Expand Up @@ -301,7 +302,7 @@ uint8_t MCR20Drv_DirectAccessSPIMultiByteRead
uint8_t txData;
uint8_t phyIRQSTS1;

if ((numOfBytes == 0) || (byteArray == 0)) {
if ((numOfBytes == 0) || (byteArray == NULL)) {
return 0;
}

Expand Down Expand Up @@ -338,7 +339,7 @@ uint8_t MCR20Drv_PB_SPIBurstRead
uint8_t txData;
uint8_t phyIRQSTS1;

if ((numOfBytes == 0) || (byteArray == 0)) {
if ((numOfBytes == 0) || (byteArray == NULL)) {
return 0;
}

Expand Down Expand Up @@ -406,7 +407,7 @@ void MCR20Drv_IndirectAccessSPIMultiByteWrite
{
uint16_t txData;

if ((numOfBytes == 0) || (byteArray == 0)) {
if ((numOfBytes == 0) || (byteArray == NULL)) {
return;
}

Expand Down Expand Up @@ -473,7 +474,7 @@ void MCR20Drv_IndirectAccessSPIMultiByteRead
{
uint16_t txData;

if ((numOfBytes == 0) || (byteArray == 0)) {
if ((numOfBytes == 0) || (byteArray == NULL)) {
return;
}

Expand Down