mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
d7f3341974
commit
57d3a14e0f
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue