Skip to content
Permalink
Browse files

ext/hal/st/lib: stm32wb hci shared ram driver

Library providing hci driver for host/controller communication
over shared RAM

Origin: ST Microelectronics
License: BSD-3-Clause
URL: http://www.st.com/en/embedded-software/stm32cubewb.html
Commit: 1.0.0
Purpose: Shared RAM driver for STM32WB
Maintained-by: External

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
  • Loading branch information...
erwango authored and nashif committed Feb 27, 2019
1 parent b748a54 commit a2d66d7cc9a2460b99fca87d6c2bae9008717f86
@@ -21,4 +21,13 @@ if(CONFIG_HAS_STLIB)
zephyr_include_directories(audio/microphone)
zephyr_sources(audio/microphone/OpenPDMFilter.c)
endif()
if(CONFIG_BT_STM32_IPM)
zephyr_include_directories(stm32wb/hci)
zephyr_sources(stm32wb/hci/shci.c)
zephyr_sources(stm32wb/hci/shci_tl.c)
zephyr_sources(stm32wb/hci/hw_ipcc.c)
zephyr_sources(stm32wb/hci/stm_list.c)
zephyr_sources(stm32wb/hci/tl_mbox.c)
zephyr_sources(stm32wb/hci/tl_if.c)
endif()
endif()
@@ -5,4 +5,6 @@ Available libs:
* sensor/vl53l0x:
allows to drive the vl53l0x sensor
full information can be found here : http://www.st.com/en/embedded-software/stsw-img005.html
* stm32wb/hci:
Middleware for interprocessor communication on stm32wb dual core SoC
* ...
@@ -0,0 +1,37 @@
STM32WB HCI
###########

Origin:
ST Microelectronics
http://www.st.com/en/embedded-software/stm32cubewb.html

Status:
version 1.0.0

Purpose:
This library is used on stm32wb series to enable HCI communication between
a host BLE running on CM-4 STM32WB core and a controller BLE firmware running
on CM-0 core.

Description:
This library provides an API for shared RAM communication with BLE controller
firmware running on STM32WB C-M0 core.

Dependencies:
This library depends on STM32Cube IPCC HAL API.
It is available in ext/hal/st/stm32cube/stm32wbxx/drivers

URL:
http://www.st.com/en/embedded-software/stm32cubewb.html

commit:
version 1.0.0

Maintained-by:
External

License:
BSD-3-Clause

License Link:
opensource.org/licenses/BSD-3-Clause
@@ -0,0 +1,114 @@
/**
******************************************************************************
* File Name : app_common.h
* Description : App Common application configuration file for BLE
* middleWare.
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef APP_COMMON_H
#define APP_COMMON_H

#ifdef __cplusplus
extern "C"{
#endif

#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

#include "app_conf.h"

/* -------------------------------- *
* Basic definitions *
* -------------------------------- */

#undef NULL
#define NULL 0

#undef FALSE
#define FALSE 0

#undef TRUE
#define TRUE (!0)

/* -------------------------------- *
* Critical Section definition *
* -------------------------------- */
#define BACKUP_PRIMASK() uint32_t primask_bit= __get_PRIMASK()
#define DISABLE_IRQ() __disable_irq()
#define RESTORE_PRIMASK() __set_PRIMASK(primask_bit)

/* -------------------------------- *
* Macro delimiters *
* -------------------------------- */

#define M_BEGIN do {

#define M_END } while(0)

/* -------------------------------- *
* Some useful macro definitions *
* -------------------------------- */

#define MAX( x, y ) (((x)>(y))?(x):(y))

#define MIN( x, y ) (((x)<(y))?(x):(y))

#define MODINC( a, m ) M_BEGIN (a)++; if ((a)>=(m)) (a)=0; M_END

#define MODDEC( a, m ) M_BEGIN if ((a)==0) (a)=(m); (a)--; M_END

#define MODADD( a, b, m ) M_BEGIN (a)+=(b); if ((a)>=(m)) (a)-=(m); M_END

#define MODSUB( a, b, m ) MODADD( a, (m)-(b), m )

#define PAUSE( t ) M_BEGIN \
__IO int _i; \
for ( _i = t; _i > 0; _i -- ); \
M_END

#define DIVF( x, y ) ((x)/(y))

#define DIVC( x, y ) (((x)+(y)-1)/(y))

#define DIVR( x, y ) (((x)+((y)/2))/(y))

#define SHRR( x, n ) ((((x)>>((n)-1))+1)>>1)

#define BITN( w, n ) (((w)[(n)/32] >> ((n)%32)) & 1)

#define BITNSET( w, n, b ) M_BEGIN (w)[(n)/32] |= ((U32)(b))<<((n)%32); M_END

/* -------------------------------- *
* Compiler *
* -------------------------------- */
#define PLACE_IN_SECTION( __x__ ) __attribute__((section (__x__)))

#ifdef WIN32
#define ALIGN(n)
#else
#define ALIGN(n) __attribute__((aligned(n)))
#endif

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*APP_COMMON_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 comments on commit a2d66d7

Please sign in to comment.
You can’t perform that action at this time.