Wirepas SDK
wms_system.h
Go to the documentation of this file.
1/* Copyright 2017 Wirepas Ltd. All Rights Reserved.
2 *
3 * See file LICENSE.txt for full license details.
4 *
5 */
6
25#ifndef APP_LIB_SYSTEM_H_
26#define APP_LIB_SYSTEM_H_
27
28#include <stdlib.h>
29#include <stdint.h>
30#include <stdbool.h>
31
32#include "wms_app.h"
33
35#define APP_LIB_SYSTEM_NAME 0x77db1bd5
36
38#define APP_LIB_SYSTEM_VERSION 0x202
39
46#define APP_LIB_SYSTEM_STOP_PERIODIC UINT32_MAX
47
54#define APP_LIB_SYSTEM_IRQ_PRIO_HI 0
55#define APP_LIB_SYSTEM_IRQ_PRIO_LO 1
56
114
123typedef enum
124{
210
216typedef struct
217{
223
236typedef void (*app_lib_system_startup_cb_f)(void);
237
250typedef void (*app_lib_system_shutdown_cb_f)(void);
251
274typedef uint32_t (*app_lib_system_periodic_cb_f)(void);
275
284typedef void (*app_lib_system_irq_handler_f)(void);
285
297
306 (app_lib_system_shutdown_cb_f shutdown_cb);
307
349 uint32_t initial_delay_us,
350 uint32_t execution_time_us);
351
366
376
400
412 (*app_lib_system_enable_app_irq_f)(uint16_t irq_n);
413
428 (*app_lib_system_disable_app_irq_f)(uint16_t irq_n);
429
448 (*app_lib_system_enable_fast_app_irq_f)(uint16_t irq_n, uint8_t priority);
449
525 (bool fast,
526 uint16_t irq_n,
527 uint8_t priority,
529
546
555typedef uint32_t
557
573 size_t info_num_bytes);
574
592
593#endif /* APP_LIB_SYSTEM_H_ */
app_res_e
Definition wms_app.h:202
uint32_t(* app_lib_system_get_bootloader_version_f)(void)
Get bootloader version.
Definition wms_system.h:556
uint32_t(* app_lib_system_periodic_cb_f)(void)
Periodic callback.
Definition wms_system.h:274
app_lib_system_hardware_magic_e
Radio hardware magic number.
Definition wms_system.h:64
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG22
Definition wms_system.h:88
@ APP_LIB_SYSTEM_HARDWARE_RESERVED_8
Definition wms_system.h:96
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG22_DBG
Definition wms_system.h:110
@ APP_LIB_SYSTEM_HARDWARE_RESERVED_6
Definition wms_system.h:92
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG12
Definition wms_system.h:76
@ APP_LIB_SYSTEM_HARDWARE_RESERVED_5
Definition wms_system.h:90
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_UNKNOWN
Definition wms_system.h:66
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG21_DBG
Definition wms_system.h:108
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG23
Definition wms_system.h:98
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG13
Definition wms_system.h:82
@ APP_LIB_SYSTEM_HARDWARE_RESERVED_4
Definition wms_system.h:74
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG24_DBG
Definition wms_system.h:112
@ APP_LIB_SYSTEM_HARDWARE_RESERVED_7
Definition wms_system.h:94
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_NRF52840
Definition wms_system.h:78
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_NRF54L
Definition wms_system.h:104
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_CC1354P10
Definition wms_system.h:106
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG21
Definition wms_system.h:86
@ APP_LIB_SYSTEM_HARDWARE_RESERVED_2
Definition wms_system.h:70
@ APP_LIB_SYSTEM_HARDWARE_RESERVED_1
Definition wms_system.h:68
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG12_512
Definition wms_system.h:80
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_NRF52832
Definition wms_system.h:72
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_NRF52833
Definition wms_system.h:84
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_EFR32XG24
Definition wms_system.h:100
@ APP_LIB_SYSTEM_HARDWARE_MAGIC_NRF9120
Definition wms_system.h:102
app_res_e(* app_lib_system_set_shutdown_cb_f)(app_lib_system_shutdown_cb_f shutdown_cb)
Set a callback to be called just before the system shuts down.
Definition wms_system.h:306
void(* app_lib_system_startup_cb_f)(void)
Startup callback.
Definition wms_system.h:236
app_lib_system_set_shutdown_cb_f setShutdownCb
Definition wms_system.h:581
app_lib_system_enable_app_irq_with_handler_f enableAppIrq
Definition wms_system.h:586
app_res_e(* app_lib_system_set_periodic_cb_f)(app_lib_system_periodic_cb_f work_cb, uint32_t initial_delay_us, uint32_t execution_time_us)
Set the periodic callback.
Definition wms_system.h:348
app_lib_system_enter_critical_section_f enterCriticalSection
Definition wms_system.h:583
app_res_e(* app_lib_system_enable_app_irq_f)(uint16_t irq_n)
Enable an app interrupt.
Definition wms_system.h:412
app_res_e(* app_lib_system_enable_fast_app_irq_f)(uint16_t irq_n, uint8_t priority)
Enable a fast app interrupt.
Definition wms_system.h:448
app_lib_system_protocol_profile_e
Protocol profiles.
Definition wms_system.h:124
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_RESERVED_2
Definition wms_system.h:130
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_SUB_INDIA865W
Definition wms_system.h:142
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_15_RESERVED
Definition wms_system.h:178
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_RESERVED_5
Definition wms_system.h:136
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_ISM_24GHZ
Definition wms_system.h:128
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_RESERVED_10
Definition wms_system.h:146
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_25_RESERVED
Definition wms_system.h:198
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_13_RESERVED
Definition wms_system.h:174
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_27_RESERVED
Definition wms_system.h:202
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_20_RESERVED
Definition wms_system.h:188
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_21_RESERVED
Definition wms_system.h:190
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_12_RESERVED
Definition wms_system.h:172
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_TS_103_874_2_BAND_4
Definition wms_system.h:156
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_11_RESERVED
Definition wms_system.h:170
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_RESERVED_3
Definition wms_system.h:132
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_RESERVED_4
Definition wms_system.h:134
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_8_RESERVED
Definition wms_system.h:164
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_22_RESERVED
Definition wms_system.h:192
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_30_RESERVED
Definition wms_system.h:208
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_2_RESERVED
Definition wms_system.h:152
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_UNKNOWN
Definition wms_system.h:126
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_18_RESERVED
Definition wms_system.h:184
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_19_RESERVED
Definition wms_system.h:186
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_14_RESERVED
Definition wms_system.h:176
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_RESERVED_11
Definition wms_system.h:148
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_RESERVED_9
Definition wms_system.h:144
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_17_RESERVED
Definition wms_system.h:182
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_24_RESERVED
Definition wms_system.h:196
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_10_RESERVED
Definition wms_system.h:168
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_6_RESERVED
Definition wms_system.h:160
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_SUB_INDIA865NW
Definition wms_system.h:138
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_26_RESERVED
Definition wms_system.h:200
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_7_RESERVED
Definition wms_system.h:162
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_TS_103_874_2_BAND_9
Definition wms_system.h:166
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_29_RESERVED
Definition wms_system.h:206
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_5_RESERVED
Definition wms_system.h:158
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_TS_103_874_2_BAND_1
Definition wms_system.h:150
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_RESERVED_7
Definition wms_system.h:140
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_23_RESERVED
Definition wms_system.h:194
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_3_RESERVED
Definition wms_system.h:154
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_28_RESERVED
Definition wms_system.h:204
@ APP_LIB_SYSTEM_PROTOCOL_PROFILE_DECT_BAND_16_RESERVED
Definition wms_system.h:180
void(* app_lib_system_enter_critical_section_f)(void)
Enter a critical section.
Definition wms_system.h:365
app_lib_system_exit_critical_section_f exitCriticalSection
Definition wms_system.h:584
app_lib_system_clear_pending_fast_app_irq_f clearPendingFastAppIrq
Definition wms_system.h:588
app_res_e(* app_lib_system_disable_app_irq_f)(uint16_t irq_n)
Disable an app interrupt.
Definition wms_system.h:428
app_lib_system_set_periodic_cb_f setPeriodicCb
Definition wms_system.h:582
app_lib_system_get_radio_info_f getRadioInfo
Definition wms_system.h:590
app_res_e(* app_lib_system_enable_app_irq_with_handler_f)(bool fast, uint16_t irq_n, uint8_t priority, app_lib_system_irq_handler_f handler)
Enable a platform-specific interrupt with given handler and priority.
Definition wms_system.h:525
app_res_e(* app_lib_system_disable_deep_sleep)(bool disable)
Disable/Enable deep sleep on stack.
Definition wms_system.h:399
app_lib_system_disable_deep_sleep disableDeepSleep
Definition wms_system.h:585
app_lib_system_set_startup_cb_f setStartupCb
Definition wms_system.h:580
app_lib_system_get_bootloader_version_f getBootloaderVersion
Definition wms_system.h:589
app_res_e(* app_lib_system_set_startup_cb_f)(app_lib_system_startup_cb_f startup_cb)
Set a callback to be called when the system starts up.
Definition wms_system.h:296
app_res_e(* app_lib_system_get_radio_info_f)(app_lib_system_radio_info_t *info_p, size_t info_num_bytes)
Return radio hardware and platform information.
Definition wms_system.h:572
void(* app_lib_system_shutdown_cb_f)(void)
Shutdown callback.
Definition wms_system.h:250
void(* app_lib_system_exit_critical_section_f)(void)
Exit a critical section.
Definition wms_system.h:375
void(* app_lib_system_irq_handler_f)(void)
Interrupt handler callback.
Definition wms_system.h:284
app_res_e(* app_lib_system_clear_pending_fast_app_irq_f)(uint16_t irq_n)
Clear fast interrupt flag from NVIC.
Definition wms_system.h:545
app_lib_system_disable_app_irq_f disableAppIrq
Definition wms_system.h:587
List of library functions.
Definition wms_system.h:579
Radio information structure.
Definition wms_system.h:217