All the provided STM32F411 examples use JSAPI. You can use REXIS in JSAPI projects with the following notes:
JSAPI is written in C++ and must be called from C++
source files. The header file rexis_api.h is also compatible with
C++ so you can call REXIS API in C++ source files (REXIS API
functions are declared as extern “C” functions).
2. REXIS functions can be written in C or C++. Just keep in mind that a .cpp C++ file referencing a C function defined in another file must declare that function using the extern “C” keywords.
3. JSAPI also uses the SysTick timer handler. You can let the JSAPI SysTick handler be the default handler, and then add a hook:
Because the default for the JSAPI SysTick timer is 1ms, a stub (named mySysTick_Handler above) must be used:
static int i = 0;
if (i++ % 10 == 0)
This causes rexis_SysTick_Handler be called every 10ms. You may also change the JSAPI SysTick timer to interrupt every 10ms, in which case, you can write
// Set up a 10mS system tick timer
jsapi_cortex_core.SysTick_Timer ( SYSTICK_HUNDREDTHSECOND );
directly, without an intermediary function.