Minor optimisation to mcr20a-rf-driver code

This is a minor optimisation to the mcr20a-rf-driver code:
1. The function parameter is 'uint8_t *byteArray',  (byteArray == NULL) instead of using (byteArray == 0). The code is more readable.
pull/12427/head
David Lin 2020-02-13 22:35:57 +08:00 committed by GitHub
parent d7f3341974
commit 57d3a14e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -165,7 +165,7 @@ void MCR20Drv_DirectAccessSPIMultiByteWrite
{ {
uint8_t txData; uint8_t txData;
if ((numOfBytes == 0) || (byteArray == 0)) { if ((numOfBytes == 0) || (byteArray == NULL)) {
return; return;
} }
@ -230,7 +230,7 @@ void MCR20Drv_PB_SPIBurstWrite
{ {
uint8_t txData; uint8_t txData;
if ((numOfBytes == 0) || (byteArray == 0)) { if ((numOfBytes == 0) || (byteArray == NULL)) {
return; return;
} }
@ -301,7 +301,7 @@ uint8_t MCR20Drv_DirectAccessSPIMultiByteRead
uint8_t txData; uint8_t txData;
uint8_t phyIRQSTS1; uint8_t phyIRQSTS1;
if ((numOfBytes == 0) || (byteArray == 0)) { if ((numOfBytes == 0) || (byteArray == NULL)) {
return 0; return 0;
} }
@ -338,7 +338,7 @@ uint8_t MCR20Drv_PB_SPIBurstRead
uint8_t txData; uint8_t txData;
uint8_t phyIRQSTS1; uint8_t phyIRQSTS1;
if ((numOfBytes == 0) || (byteArray == 0)) { if ((numOfBytes == 0) || (byteArray == NULL)) {
return 0; return 0;
} }
@ -406,7 +406,7 @@ void MCR20Drv_IndirectAccessSPIMultiByteWrite
{ {
uint16_t txData; uint16_t txData;
if ((numOfBytes == 0) || (byteArray == 0)) { if ((numOfBytes == 0) || (byteArray == NULL)) {
return; return;
} }
@ -473,7 +473,7 @@ void MCR20Drv_IndirectAccessSPIMultiByteRead
{ {
uint16_t txData; uint16_t txData;
if ((numOfBytes == 0) || (byteArray == 0)) { if ((numOfBytes == 0) || (byteArray == NULL)) {
return; return;
} }