mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			change fake chci into custom chci to resolve naming issues
							parent
							
								
									be80c46e9a
								
							
						
					
					
						commit
						fbf55f90eb
					
				| 
						 | 
				
			
			@ -39,8 +39,8 @@
 | 
			
		|||
 | 
			
		||||
#if (CHCI_TR_CUSTOM == 1)
 | 
			
		||||
/* Custom transport */
 | 
			
		||||
extern void ChciTrInit(uint16_t maxAclLen, uint16_t maxIsoSduLen);
 | 
			
		||||
extern void ChciTrWrite(uint8_t prot, uint8_t type, uint16_t len, uint8_t *pData);
 | 
			
		||||
extern void CustomChciTrInit(uint16_t maxAclLen, uint16_t maxIsoSduLen);
 | 
			
		||||
extern void CustomChciTrWrite(uint8_t prot, uint8_t type, uint16_t len, uint8_t *pData);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**************************************************************************************************
 | 
			
		||||
| 
						 | 
				
			
			@ -430,7 +430,7 @@ static void chciTrWrite(uint8_t prot, uint8_t type, uint16_t len, uint8_t *pData
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
#if (CHCI_TR_CUSTOM == 1)
 | 
			
		||||
  ChciTrWrite(prot, type, len, pData);
 | 
			
		||||
  CustomChciTrWrite(prot, type, len, pData);
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -508,7 +508,7 @@ void ChciTrHandlerInit(wsfHandlerId_t handlerId, uint16_t maxAclLen, uint16_t ma
 | 
			
		|||
  /* Start receiver. */
 | 
			
		||||
  chciRxPacketSM();
 | 
			
		||||
#elif (CHCI_TR_CUSTOM == 1)
 | 
			
		||||
  ChciTrInit(maxAclLen, maxIsoSduLen);
 | 
			
		||||
  CustomChciTrInit(maxAclLen, maxIsoSduLen);
 | 
			
		||||
#else
 | 
			
		||||
  (void)chciRxPacketSM;
 | 
			
		||||
  (void)chciTxComplete;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,7 @@
 | 
			
		|||
 */
 | 
			
		||||
 | 
			
		||||
#include "mbed.h"
 | 
			
		||||
#include "fake_lhci_drv.h"
 | 
			
		||||
#include "custom_chci_tr.h"
 | 
			
		||||
#include "chci_tr.h"
 | 
			
		||||
#include "chci_api.h"
 | 
			
		||||
#include "hci_defs.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -25,7 +25,7 @@
 | 
			
		|||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
uint16_t FakeChciTrRead(uint8_t prot, uint8_t hci_type, uint16_t len, uint8_t *pData)
 | 
			
		||||
uint16_t CustomChciTrRead(uint8_t prot, uint8_t hci_type, uint16_t len, uint8_t *pData)
 | 
			
		||||
{
 | 
			
		||||
    uint8_t controller_type;
 | 
			
		||||
    switch (hci_type) {
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +49,7 @@ uint16_t FakeChciTrRead(uint8_t prot, uint8_t hci_type, uint16_t len, uint8_t *p
 | 
			
		|||
    return len;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
uint16_t FakeChciTrWrite(uint8_t prot, uint8_t controller_type, uint16_t len, uint8_t *pData)
 | 
			
		||||
uint16_t CustomChciTrWrite(uint8_t prot, uint8_t controller_type, uint16_t len, uint8_t *pData)
 | 
			
		||||
{
 | 
			
		||||
    uint8_t hci_type;
 | 
			
		||||
    switch (controller_type) {
 | 
			
		||||
| 
						 | 
				
			
			@ -72,6 +72,12 @@ uint16_t FakeChciTrWrite(uint8_t prot, uint8_t controller_type, uint16_t len, ui
 | 
			
		|||
    return ControllerToHostWrite(prot, hci_type, len, pData);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CustomChciTrInit(uint16_t maxAclLen, uint16_t maxIsoSduLen)
 | 
			
		||||
{
 | 
			
		||||
    (void)maxAclLen;
 | 
			
		||||
    (void)maxIsoSduLen;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			@ -14,8 +14,8 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef FAKE_LHCI_DRV_H_
 | 
			
		||||
#define FAKE_LHCI_DRV_H_
 | 
			
		||||
#ifndef CUSTOM_CHCI_TR_H_
 | 
			
		||||
#define CUSTOM_CHCI_TR_H_
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
| 
						 | 
				
			
			@ -41,7 +41,7 @@ uint16_t ControllerToHostWrite(uint8_t prot, uint8_t hci_type, uint16_t len, uin
 | 
			
		|||
 * @param pData Data to be sent.
 | 
			
		||||
 * @return Number of bytes processed.
 | 
			
		||||
 */
 | 
			
		||||
uint16_t FakeChciTrRead(uint8_t prot, uint8_t hci_type, uint16_t len, uint8_t *pData);
 | 
			
		||||
uint16_t CustomChciTrRead(uint8_t prot, uint8_t hci_type, uint16_t len, uint8_t *pData);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Send bytes from controller to host.
 | 
			
		||||
| 
						 | 
				
			
			@ -52,10 +52,12 @@ uint16_t FakeChciTrRead(uint8_t prot, uint8_t hci_type, uint16_t len, uint8_t *p
 | 
			
		|||
 * @param pData Data to be sent.
 | 
			
		||||
 * @return Number of bytes processed.
 | 
			
		||||
 */
 | 
			
		||||
uint16_t FakeChciTrWrite(uint8_t prot, uint8_t controller_type, uint16_t len, uint8_t *pData);
 | 
			
		||||
uint16_t CustomChciTrWrite(uint8_t prot, uint8_t controller_type, uint16_t len, uint8_t *pData);
 | 
			
		||||
 | 
			
		||||
void CustomChciTrInit(uint16_t maxAclLen, uint16_t maxIsoSduLen);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* FAKE_LHCI_DRV_H_ */
 | 
			
		||||
#endif /* CUSTOM_CHCI_TR_H_ */
 | 
			
		||||
| 
						 | 
				
			
			@ -27,7 +27,7 @@
 | 
			
		|||
// Cordio Includes
 | 
			
		||||
#include "ll_init_api.h"
 | 
			
		||||
#include "ll_defs.h"
 | 
			
		||||
#include "fake_lhci_drv.h"
 | 
			
		||||
#include "custom_chci_tr.h"
 | 
			
		||||
#include "pal_bb.h"
 | 
			
		||||
#include "pal_cfg.h"
 | 
			
		||||
#include "lhci_api.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@
 | 
			
		|||
#include "wsf_math.h"
 | 
			
		||||
#include "chci_api.h"
 | 
			
		||||
#include "chci_tr.h"
 | 
			
		||||
#include "fake_lhci_drv.h"
 | 
			
		||||
#include "custom_chci_tr.h"
 | 
			
		||||
#include "hci_defs.h"
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -47,7 +47,7 @@ void NRFCordioHCITransportDriver::terminate()
 | 
			
		|||
uint16_t NRFCordioHCITransportDriver::write(uint8_t hci_type, uint16_t len, uint8_t *pData)
 | 
			
		||||
{
 | 
			
		||||
    /* ownership of the WSF buffer is transferred to the controller (zero copy HCI) */
 | 
			
		||||
    return FakeChciTrRead(CHCI_TR_PROT_BLE, hci_type, len, pData);
 | 
			
		||||
    return CustomChciTrRead(CHCI_TR_PROT_BLE, hci_type, len, pData);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
extern "C" void chciDrvInit(void)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue