mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Merge pull request #12427 from DavidLin1577/patch-1
Minor optimisation to mcr20a-rf-driver codepull/12473/head
						commit
						4ce25266fa
					
				| 
						 | 
				
			
			@ -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                           *
 | 
			
		||||
| 
						 | 
				
			
			@ -165,7 +166,7 @@ void MCR20Drv_DirectAccessSPIMultiByteWrite
 | 
			
		|||
{
 | 
			
		||||
    uint8_t txData;
 | 
			
		||||
 | 
			
		||||
    if ((numOfBytes == 0) || (byteArray == 0)) {
 | 
			
		||||
    if ((numOfBytes == 0) || (byteArray == NULL)) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -230,7 +231,7 @@ void MCR20Drv_PB_SPIBurstWrite
 | 
			
		|||
{
 | 
			
		||||
    uint8_t txData;
 | 
			
		||||
 | 
			
		||||
    if ((numOfBytes == 0) || (byteArray == 0)) {
 | 
			
		||||
    if ((numOfBytes == 0) || (byteArray == NULL)) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -406,7 +407,7 @@ void MCR20Drv_IndirectAccessSPIMultiByteWrite
 | 
			
		|||
{
 | 
			
		||||
    uint16_t  txData;
 | 
			
		||||
 | 
			
		||||
    if ((numOfBytes == 0) || (byteArray == 0)) {
 | 
			
		||||
    if ((numOfBytes == 0) || (byteArray == NULL)) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -473,7 +474,7 @@ void MCR20Drv_IndirectAccessSPIMultiByteRead
 | 
			
		|||
{
 | 
			
		||||
    uint16_t  txData;
 | 
			
		||||
 | 
			
		||||
    if ((numOfBytes == 0) || (byteArray == 0)) {
 | 
			
		||||
    if ((numOfBytes == 0) || (byteArray == NULL)) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue