Exited for brevity. Comments produce many blank lines deleted.

includes function prototypes

main.c.d


#  1 main.c
#  1 /Volumes/DATA/dgerman/Documents/computerstuff/phyweb/ruuvi/firmware/3.31.1/304/src/targets/ruuvitag_b/armgcc//
#  1 
#define __STDC__ 1
#define __STDC_VERSION__ 199901L
#define __LDBL_DECIMAL_DIG__ 17
…
#define __ARM_ASM_SYNTAX_UNIFIED__ 1
#define __ARM_FEATURE_COPROC 15
#define __GXX_TYPEINFO_EQUALITY_INLINE 0
#define __ELF__ 1
#  1 
#define __USES_INITFINI__ 1
#define APPLICATION_MODE_DEBUG 1
#define RUUVI_RUN_TESTS 1
#define DEBUG 1
#define APP_FW_VERSION v3.31.1
#define APPLICATION_DRIVER_CONFIGURED 1
#define APPLICATION_ENDPOINTS_CONFIGURED 1
#define MBEDTLS_CONFIG_FILE nrf_crypto_mbedtls_config 
#define BL_SETTINGS_ACCESS_ONLY 1
#define BOARD_RUUVITAG_B 1
#define CONFIG_GPIO_AS_PINRESET 1
#define FLOAT_ABI_HARD 1
#define BME280_FLOAT_ENABLE 1
#define NRF52 1
#define NRF52832_XXAA 1
#define NRF52_PAN_74 1
#define NRF_DFU_SVCI_ENABLED 1
#define NRF_DFU_TRANSPORT_BLE 1
#define NRF_SD_BLE_API_VERSION 6
#define S132 1
#define SOFTDEVICE_PRESENT 1
#define NRF_CRYPTO_MAX_INSTANCE_COUNT 1
#define uECC_ENABLE_VLI_API 0
#define uECC_OPTIMIZATION_LEVEL 3
#define uECC_SQUARE_FUNC 0
#define uECC_SUPPORT_COMPRESSED_POINT 0
#define uECC_VLI_NATIVE_LITTLE_ENDIAN 1
#define SWI_DISABLE0 1
#define __HEAP_SIZE 64
#define __STACK_SIZE 8192

#  1 main.c
  ↓ line number in main of include app_config
# 12 main.c  
#  1 application_config/app_config  1 first include
  ↓ line number in app_config of define APP_CONFIG_h
# 22 application_config/app_config 
#define APP_CONFIG_H 

#  1 application_config/application_modes  1
  ↓ line number in application_modes of define APPLICATION_MODES_H
# 20 application_config/application_modes 
#define APPLICATION_MODES_H 

# 29 application_config/application_modes 
#  1 application_config/application_mode_debug  1
# 16 application_config/application_mode_debug 
#define APPLICATION_MODE_DEBUG_H 
#define APP_FW_VARIANT +debug 
…
#define APP_SENSOR_PHOTO_ENABLED (false)
#define APP_SENSOR_NTC_ENABLED (false)
#define APP_SENSOR_DPS310_ENABLE (false)

  ↓ 5 lines LESS then line number in application_modes of _mode_default
# 30 application_config/application_modes  2 
#  1 application_config/application_mode_default  1 
# 15 application_config/application_mode_default 
#define APPLICATION_MODE_DEFAULT_H 

 ↓ the line number 
# 49 application_config/application_mode_default 
#define APP_BATTERY_SAMPLE_MS (60ull*1000ull)
#define APP_BUTTON_LONG_PRESS_TIME_MS (5000u)
#define APP_CONFIG_ENABLED_TIME_MS (1u * 60u * 1000u)
#define APP_MOTION_THRESHOLD (0.064F)
#define APP_LOCKED_AT_BOOT true
# 36 application_config/application_modes  2 EOF

# 28 application_config/app_config  2

#  1 ruuvi.boards.c/ruuvi_boards  1
# 29 ruuvi.boards.c/ruuvi_boards 
#define RUUVI_BOARDS_H 
#define RUUVI_BOARDS_SEMVER 3.8.0 
#define RB_PORT_PIN_MAP(PORT,PIN) (((PORT) << 8u) + (PIN)) 
#define RB_PIN_UNUSED (0xFFFFU) 

#  1 ruuvi.boards.c/ruuvi_board_ruuvitag_b  1
# 10 ruuvi.boards.c/ruuvi_board_ruuvitag_b 
#define RUUVI_BOARD_RUUVITAG_B_H 
#define RB_MODEL_STRING RuuviTag B
#define RB_MANUFACTURER_STRING Ruuvi Innovations Ltd
#define RB_BLE_NAME_STRING Ruuvi 
#define RB_BLE_MANUFACTURER_ID 0x0499
…
#define RB_LIS2DH12_SENSOR_POWER_PIN RB_PORT_PIN_MAP(0, 7)
#define RB_I2C_BUS_POWER_PIN RB_PORT_PIN_MAP(0, 12)

# 46 ruuvi.boards.c/ruuvi_boards  2 ?

# 64 ruuvi.boards.c/ruuvi_boards 

#  1 ruuvi.boards.c/ruuvi_board_defaults  1

# 21 ruuvi.boards.c/ruuvi_board_defaults 
#define RUUVI_BOARD_DEFAULTS_H 

#  1 ruuvi.boards.c/ruuvi_boards  1
# 24 ruuvi.boards.c/ruuvi_board_defaults  2
# 41 ruuvi.boards.c/ruuvi_board_defaults 
#define RB_TX_POWER_0 -40
…
#define RB_TX_POWER_MIN RB_TX_POWER_0
#define RB_TX_POWER_LIST { RB_TX_POWER_0 \ RB_TX_POWER_1 \ RB_TX_POWER_2 \ RB_TX_POWER_3 \ RB_TX_POWER_4 \ RB_TX_POWER_5 \ RB_TX_POWER_6 \ RB_TX_POWER_7 }

#define RB_TX_POWER_MAX RB_TX_POWER_7

# 98 ruuvi.boards.c/ruuvi_board_defaults 
#define RB_BUTTON_DEBOUNCE_PERIOD_MS 50
ifdefs
# 119 ruuvi.boards.c/ruuvi_board_defaults 
ifdefs ??
#define RB_BUTTON_CHANGE_MODE RB_PIN_UNUSED
# 147 ruuvi.boards.c/ruuvi_board_defaults 
#define RB_SPI_FREQUENCY_1M (0U)
#define RB_SPI_FREQUENCY_2M (1U)
#define RB_SPI_FREQUENCY_4M (2U)
#define RB_SPI_FREQUENCY_8M (3U)
# 163 ruuvi.boards.c/ruuvi_board_defaults 
#define RB_I2C_FREQUENCY_100k (0U)
#define RB_I2C_FREQUENCY_250k (1U)
#define RB_I2C_FREQUENCY_400k (2U)
# 190 ruuvi.boards.c/ruuvi_board_defaults 
#define RB_UART_BAUDRATE_9600 (0U)
#define RB_UART_BAUDRATE_115200 (1U)
# 226 ruuvi.boards.c/ruuvi_board_defaults 
#define RB_FLASH_PAGE_SIZE 0x1000

#define RB_FLASH_SPACE_SMALL (0U)
#define RB_FLASH_SPACE_MEDIUM (1U)
#define RB_FLASH_SPACE_LARGE (2U)
various #ifdefsi perhaps they were already defined
# 261 ruuvi.boards.c/ruuvi_board_defaults 
#define RB_BME280_SENSOR_POWER_PIN RB_PIN_UNUSED
# 285 ruuvi.boards.c/ruuvi_board_defaults 
#define RB_INT_LEVEL_PIN RB_PIN_UNUSED

#define RB_INT_FIFO_PIN RB_PIN_UNUSED
# 65 ruuvi.boards.c/ruuvi_boards  2
# 30 application_config/app_config  2
#  1 ruuvi.drivers.c/src/ruuvi_driver_sensor  1

#define RUUVI_DRIVER_SENSOR_H 
# 58 ruuvi.drivers.c/src/ruuvi_driver_sensor 
#  1 ruuvi.drivers.c/src/ruuvi_driver_error  1
# 13 ruuvi.drivers.c/src/ruuvi_driver_error 
#define RUUVI_DRIVER_ERROR_H 



first ovccurance of FLOAT : RD_FLOAT_INVALID         NAN
#  1 gcc-arm...include/float  1 3 4
# 29 gcc-arm...include/float  3 4
#define _FLOAT_H___ 

#undef FLT_RADIX
#define FLT_RADIX __FLT_RADIX__

#undef FLT_MANT_DIG
#undef DBL_MANT_DIG
…
# 21 ruuvi.drivers.c/src/ruuvi_driver_error  2
#  1 gcc-arm.../arm-none-eabi/include/math  1 3


#define _MATH_H_ 

#  1 gcc-arm.../arm-none-eabi/include/sys/reent  1 3
#define _NEWLIB_VERSION 3.0.0
…


# 149 gcc-arm...include/stddef  3 4
typedef int ptrdiff_t;                  First typedef
# 161 gcc-arm...include/stddef  3 4
#undef __need_ptrdiff_t
# 187 gcc-arm...include/stddef  3 4
#define __size_t__ 
#define __SIZE_T__ 
#define _SIZE_T 
#define _SYS_SIZE_T_H 
#define _T_SIZE_ 
#define _T_SIZE 
#define __SIZE_T 
#define _SIZE_T_ 
#define _BSD_SIZE_T_ 
#define _SIZE_T_DEFINED_ 
#define _SIZE_T_DEFINED 
#define _BSD_SIZE_T_DEFINED_ 
#define _SIZE_T_DECLARED 
#define ___int_size_t_h 
#define _GCC_SIZE_T 
#define _SIZET_ 
#define __size_t 


typedef unsigned int size_t;
# 238 gcc-arm...include/stddef  3 4
#undef __need_size_t
# 267 gcc-arm...include/stddef  3 4
#define __wchar_t__ 
#define __WCHAR_T__ 
#define _WCHAR_T 
#define _T_WCHAR_ 
#define _T_WCHAR 
#define __WCHAR_T 
#define _WCHAR_T_ 
#define _BSD_WCHAR_T_ 
#define _WCHAR_T_DEFINED_ 
#define _WCHAR_T_DEFINED 
#define _WCHAR_T_H 
#define ___int_wchar_t_h 
#define __INT_WCHAR_T_H 
#define _GCC_WCHAR_T 
#define _WCHAR_T_DECLARED 
# 294 gcc-arm...include/stddef  3 4
#undef _BSD_WCHAR_T_
# 328 gcc-arm...include/stddef  3 4
typedef unsigned int wchar_t;
# 347 gcc-arm...include/stddef  3 4
#undef __need_wchar_t
# 401 gcc-arm...include/stddef  3 4
#undef NULL 
#define NULL ((void *)0) 
#undef __need_NULL

…

#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)

# 160 gcc-arm.../arm-none-eabi/include/sys/_types  2 3
typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    unsigned char __wchb[4];
  } __value;
} _mbstate_t;


typedef _LOCK_T _flock_t;

…
struct _Bigint
{
  struct _Bigint *_next;
  int _k, _maxwds, _sign, _wds;
  __ULong _x[1];
};


struct __tm
{
  int __tm_sec;
  int __tm_min;
  int __tm_hour;
  int __tm_mday;
  int __tm_mon;
  int __tm_year;
  int __tm_wday;
  int __tm_yday;
  int __tm_isdst;
};


#define _ATEXIT_SIZE 32

struct _on_exit_args {
 void * _fnargs[32];
 void * _dso_handle[32];

# 117 gcc-arm.../arm-none-eabi/include/sys/reent  3
struct __sbuf {
 unsigned char *_base;
 int _size;
};
# 178 gcc-arm.../arm-none-eabi/include/sys/reent  3
#define _REENT_SMALL_CHECK_INIT(ptr) 

  int __sdidinit;

…

#  1 gcc-arm.../arm-none-eabi/include/_ansi  1 3
# 9 gcc-arm.../arm-none-eabi/include/math  2 3

#define _M_LN2 0.693147180559945309417 


#define NAN (__builtin_nanf())
# 86 gcc-arm.../arm-none-eabi/include/math  3

Externs begin

extern double atan (double); extern double cos (double); # 662 gcc-arm.../arm-none-eabi/include/math 3

First bool

# 22 ruuvi.drivers.c/src/ruuvi_driver_error 2 # 1 gcc-arm...include/stdbool 1 3 4 # 29 gcc-arm...include/stdbool 3 4 #define _STDBOOL_H #define bool _Bool #define true 1 #define false 0 # 52 gcc-arm...include/stdbool 3 4 #define __bool_true_false_are_defined 1
# 23 ruuvi.drivers.c/src/ruuvi_driver_error 2 #include #define signed +0 #define unsigned +0 #define char +0 #define short +1 #define __int20 +2 #define int +2 #define long +4  
# 24 ruuvi.drivers.c/src/ruuvi_driver_error 2 #define RD_UINT64_INVALID UINT64_MAX #define RD_INT64_INVALID INT64_MIN #define RD_INT32_INVALID INT32_MIN #define RD_FLOAT_INVALID NAN #define RD_SUCCESS ( 0U) #define RD_ERROR_INTERNAL ( 1U) #define RD_ERROR_INTERNALi ( 1U) … #define RD_WARNING_DEPRECATEDi ( 23U) #define RD_ERROR_LOGE (40000000U) #define RD_ERROR_LOGEi ( 31U) #define RD_ERROR_FATAL (80000000U) # 85 ruuvi.drivers.c/src/ruuvi_driver_error typedef uint32_t rd_status_t; # 95 ruuvi.drivers.c/src/ruuvi_driver_error #define RD_ERROR_CHECK(error,mask) rd_error_check(error, mask, __func__, __LINE__) # 104 ruuvi.drivers.c/src/ruuvi_driver_error void rd_error_check (const rd_status_t error, const rd_status_t non_fatal_mask, const char * p_func, const int line); # 116 ruuvi.drivers.c/src/ruuvi_driver_error typedef void (*rd_error_cb) (const rd_status_t error, const # 117 ruuvi.drivers.c/src/ruuvi_driver_error 3 4 _Bool # 117 ruuvi.drivers.c/src/ruuvi_driver_error fatal, const char * file, const int line); void rd_error_cb_set (rd_error_cb cb); first entry for sensor but what about : #define RUUVI_DRIVER_SENSOR_H, #include "ruuvi_driver_error.h" #include # 59 ruuvi.drivers.c/src/ruuvi_driver_sensor 2 # 1 gcc-arm...include/stddef 1 3 4 # 61 ruuvi.drivers.c/src/ruuvi_driver_sensor 2 #define RD_SENSOR_INVALID_VALUE RD_FLOAT_INVALID #define RD_SENSOR_INVALID_TIMSTAMP RD_UINT64_INVALID … #define RD_SENSOR_CFG_DEFAULT (0U) #define RD_SENSOR_CFG_CUSTOM_1 (0xC9U) typedef struct __attribute__ ( (packed, aligned (4))) { uint8_t samplerate; uint8_t resolution; uint8_t scale; uint8_t dsp_function; uint8_t dsp_parameter; uint8_t mode; uint8_t reserved0; uint8_t reserved1; } rd_sensor_configuration_t; typedef enum { RD_BUS_NONE = 0U, RD_BUS_SPI = 1U, RD_BUS_I2C = 2U, RD_BUS_UART = 3U, RD_BUS_PDM = 4U, RD_BUS_FAIL = 5U } rd_bus_t; typedef struct { unsigned int acceleration_x_g : 1; unsigned int acceleration_y_g : 1; unsigned int acceleration_z_g : 1; unsigned int co2_ppm : 1; unsigned int gyro_x_dps : 1; unsigned int gyro_y_dps : 1; unsigned int gyro_z_dps : 1; unsigned int humidity_rh : 1; unsigned int luminosity : 1; unsigned int magnetometer_x_g : 1; unsigned int magnetometer_y_g : 1; unsigned int magnetometer_z_g : 1; unsigned int pm_1_ugm3 : 1; unsigned int pm_2_ugm3 : 1; unsigned int pm_4_ugm3 : 1; unsigned int pm_10_ugm3 : 1; unsigned int pressure_pa : 1; unsigned int spl_dbz : 1; unsigned int temperature_c : 1; unsigned int voc_ppm : 1; unsigned int voltage_v : 1; unsigned int voltage_ratio : 1; unsigned int reserved: 10; } rd_sensor_data_bitfield_t; # 170 ruuvi.drivers.c/src/ruuvi_driver_sensor #define RD_SENSOR_ACC_X_FIELD ((rd_sensor_data_fields_t){.datas.acceleration_x_g=1}) #define RD_SENSOR_ACC_Y_FIELD ((rd_sensor_data_fields_t){.datas.acceleration_y_g=1}) … #define RD_SENSOR_TEMP_FIELD ((rd_sensor_data_fields_t){.datas.temperature_c=1}) # 201 ruuvi.drivers.c/src/ruuvi_driver_sensor typedef union { uint32_t bitfield; rd_sensor_data_bitfield_t datas; } rd_sensor_data_fields_t; # 214 ruuvi.drivers.c/src/ruuvi_driver_sensor typedef struct rd_sensor_data_t { uint64_t timestamp_ms; rd_sensor_data_fields_t fields; rd_sensor_data_fields_t valid; float * data; } rd_sensor_data_t; typedef struct rd_sensor_t rd_sensor_t; # 243 ruuvi.drivers.c/src/ruuvi_driver_sensor Function prototypes typedef rd_status_t (*rd_sensor_init_fp) (rd_sensor_t * const p_sensor, const rd_bus_t bus, const uint8_t handle); # 256 ruuvi.drivers.c/src/ruuvi_driver_sensor typedef rd_status_t (*rd_sensor_setup_fp) (uint8_t * parameter); # 273 ruuvi.drivers.c/src/ruuvi_driver_sensor typedef rd_status_t (*rd_sensor_dsp_fp) (uint8_t * dsp_function, uint8_t * dsp_parameter); # 291 ruuvi.drivers.c/src/ruuvi_driver_sensor typedef rd_status_t (*rd_sensor_data_fp) (rd_sensor_data_t * const p_data); # 304 ruuvi.drivers.c/src/ruuvi_driver_sensor typedef rd_status_t (*rd_configuration_fp) ( const rd_sensor_t * const p_sensor, rd_sensor_configuration_t * const p_configuration); # 321 ruuvi.drivers.c/src/ruuvi_driver_sensor typedef rd_status_t (*rd_sensor_fifo_read_fp) (size_t * const num_elements, rd_sensor_data_t * const data); # 333 ruuvi.drivers.c/src/ruuvi_driver_sensor typedef rd_status_t (*rd_sensor_fifo_enable_fp) (const # 333 ruuvi.drivers.c/src/ruuvi_driver_sensor 3 4 Whats 3 4 ? _Bool # 333 ruuvi.drivers.c/src/ruuvi_driver_sensor enable); # 361 ruuvi.drivers.c/src/ruuvi_driver_sensor typedef rd_status_t (*rd_sensor_level_interrupt_use_fp) (const # 361 ruuvi.drivers.c/src/ruuvi_driver_sensor 3 4 _Bool # 361 ruuvi.drivers.c/src/ruuvi_driver_sensor enable, float * limit_g); typedef uint64_t (*rd_sensor_timestamp_fp) (void); typedef struct rd_sensor_t { const char * name; void * p_ctx; rd_sensor_data_fields_t provides; rd_sensor_init_fp init; rd_sensor_init_fp uninit; … rd_sensor_fifo_read_fp fifo_read; rd_sensor_level_interrupt_use_fp level_interrupt_set; } rd_sensor_t; rd_status_t rd_sensor_configuration_set (const rd_sensor_t * sensor, rd_sensor_configuration_t * config); rd_status_t rd_sensor_configuration_get (const rd_sensor_t * sensor, rd_sensor_configuration_t * config); # 444 ruuvi.drivers.c/src/ruuvi_driver_sensor rd_status_t rd_sensor_timestamp_function_set ( const rd_sensor_timestamp_fp timestamp_fp); uint64_t rd_sensor_timestamp_get (void); # 464 ruuvi.drivers.c/src/ruuvi_driver_sensor void rd_sensor_initialize (rd_sensor_t * const p_sensor); void rd_sensor_uninitialize (rd_sensor_t * const p_sensor); # 480 ruuvi.drivers.c/src/ruuvi_driver_sensor 3 4 _Bool # 480 ruuvi.drivers.c/src/ruuvi_driver_sensor rd_sensor_is_init (const rd_sensor_t * const sensor); … # 621 ruuvi.drivers.c/src/ruuvi_driver_sensor rd_sensor_data_bitfield_t rd_sensor_field_type (const rd_sensor_data_t * const target, const uint8_t index); # 31 application_config/app_config 2 # 51 application_config/app_config #define APP_FW_NAME Ruuvi FW #define APP_TEMPERATURE_ADJ 0 #define APP_HUMIDITY_ADJ 0 #define TEMPERATURE_RND 1 #define HUMIDITY_RND 1 #define APP_LOG_SEND_TEMPERATURE (true) #define APP_LOG_SEND_HUMIDITY (true) #define APP_LOG_SEND_PRESSURE (true) #define APP_LOG_SEND_X (false) #define APP_LOG_SEND_Y (false) #define APP_LOG_SEND_Z (false) #define APP_LOG_SEND_MOVEMENT (false) #define APP_LOG_SEND_BATTVOLT (false) # 93 application_config/app_config #define APP_LOG_OVERFLOW (true) #define APP_HEARTBEAT_OVERDUE_INTERVAL_MS (5U * 60U * 1000U) # 106 application_config/app_config #define RI_ADC_PHOTO_ENABLED APP_SENSOR_PHOTO_ENABLED # 115 application_config/app_config #define RI_ADC_NTC_ENABLED APP_SENSOR_NTC_ENABLED #define APP_SENSOR_BME280_ENABLED RB_ENVIRONMENTAL_BME280_PRESENT #define RI_BME280_ENABLED APP_SENSOR_BME280_ENABLED … #define RI_FLASH_ENABLED RT_FLASH_ENABLED # 356 application_config/app_config #define APP_FLASH_LOG_DATA_RECORDS_NUM (APP_FLASH_PAGES - 1U -1U ) #define APP_FLASH_SENSOR_FILE (0xCEU) #define APP_FLASH_SENSOR_BME280_RECORD (0x28U) … #define RI_ADC_ENABLED (true) # 424 application_config/app_config #define ENABLE_ALL_DATAFORMATS (false) #define RE_3_ENABLED (0U + ENABLE_ALL_DATAFORMATS) … #define RE_FA_ENABLED (0U + ENABLE_ALL_DATAFORMATS) # 461 application_config/app_config #define RI_AES_ENABLED (RE_8_ENABLED | RE_FA_ENABLED) #define RT_GPIO_INT_TABLE_SIZE (RB_GPIO_NUMBER + 1U) #define RI_WATCHDOG_ENABLED (true) # 13 main.c 2 All above came from main.c. #12 ! # 1 app_button 1 #define APP_BUTTON_H # 1 ruuvi.drivers.c/src/ruuvi_driver_error 1 # 7 app_button 2 # 1 ruuvi.drivers.c/src/tasks/ruuvi_task_button 1 # 16 ruuvi.drivers.c/src/tasks/ruuvi_task_button #define RUUVI_TASK_BUTTON_H # 1 ruuvi.drivers.c/src/interfaces/gpio/ruuvi_interface_gpio 1 #define RUUVI_INTERFACE_GPIO_H # 1 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules 1 # 22 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules #define RUUVI_DRIVER_ENABLED_MODULES_H #define RUUVI_DRIVERS_SEMVER 3.9.2 #define ENABLE_DEFAULT true # 43 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules # 1 application_config/nrf5_sdk15_app_config 1 #define NRF5_SDK15_APP_CONFIG_H # 25 application_config/nrf5_sdk15_app_config #define NRF5_SDK15_CONFIGURED 1 # 44 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules 2 #define RI_ADV_EXTENDED_ENABLED ENABLE_DEFAULT #define RI_COMM_MESSAGE_MAX_LENGTH 230 # 69 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules #define RD_LOG_BUFFER_SIZE (128u) # 98 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules #define RI_ADV_ENABLED RT_ADV_ENABLED # 128 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules #define RI_GATT_ENABLED (1U) # 188 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules #define RI_NFC_ENABLED 1 # 202 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules #define RI_SCHEDULER_LENGTH (10U) #define RI_SCHEDULER_SIZE (32U) # 215 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules #define RI_TIMER_MAX_INSTANCES (10U) #define RI_UART_ENABLED ENABLE_DEFAULT # 277 ruuvi.drivers.c/src/ruuvi_driver_enabled_modules #define RI_ADC_PHOTO_CHANNEL 2 #define RI_ADC_PHOTO_DIVIDER 1.00f #define RI_ADC_NTC_CHANNEL 1 #define RI_ADC_NTC_DIVIDER 1.00f #define RI_ADC_NTC_BALANCE 10000.00f #define RI_ADC_NTC_DEFAULT_RES 10000.00f #define RI_ADC_NTC_DEFAULT_TEMP 25.00f #define RI_ADC_NTC_DEFAULT_BETA 3974.0f # 5 ruuvi.drivers.c/src/interfaces/gpio/ruuvi_interface_gpio 2 # 26 ruuvi.drivers.c/src/interfaces/gpio/ruuvi_interface_gpio #define RUUVI_NRF5_SDK15_GPIO_ENABLED RUUVI_NRF5_SDK15_ENABLED #define RI_GPIO_ID_UNUSED 0xFFFF typedef enum { RI_GPIO_MODE_HIGH_Z, RI_GPIO_MODE_INPUT_NOPULL, … RI_GPIO_MODE_SINK_NOPULL_HIGHDRIVE } ri_gpio_mode_t; typedef enum { RI_GPIO_LOW = # 55 ruuvi.drivers.c/src/interfaces/gpio/ruuvi_interface_gpio 3 4 typedef uint16_t ri_gpio_id_t; # 70 ruuvi.drivers.c/src/interfaces/gpio/ruuvi_interface_gpio rd_status_t ri_gpio_init (void); rd_status_t ri_gpio_uninit (void); … # 18 ruuvi.drivers.c/src/interfaces/gpio/ruuvi_interface_gpio_interrupt 2 #define RUUVI_NRF5_SDK15_GPIO_INTERRUPT_ENABLED RUUVI_NRF5_SDK15_ENABLED … typedef void (*ri_gpio_interrupt_fp_t) (const ri_gpio_evt_t); # 63 ruuvi.drivers.c/src/interfaces/gpio/ruuvi_interface_gpio_interrupt rd_status_t ri_gpio_interrupt_init ( # 120 ruuvi.drivers.c/src/interfaces/gpio/ruuvi_interface_gpio_interrupt rd_status_t ri_gpio_interrupt_disable (const ri_gpio_id_t pin); # 21 ruuvi.drivers.c/src/tasks/ruuvi_task_button 2

stdlib.h

# 1 gcc-arm.../arm-none-eabi/include/stdlib 1 3 #define _STDLIB_H_ # 1 gcc-arm.../arm-none-eabi/include/machine/ieeefp 1 3 int atoi (const char *__nptr); void exit (int __status) __attribute__ ((__noreturn__)); void free (void *) ; char * getenv (const char *__string); … float strtof (const char *restrict __n, char **restrict __end_PTR); long strtol (const char *restrict __n, char **restrict __end_PTR, int __base); … extern long double _strtold_r (struct _reent *, const char *restrict, char **restrict); extern long double strtold (const char *restrict, char **restrict); # 22 ruuvi.drivers.c/src/tasks/ruuvi_task_button 2 # 28 ruuvi.drivers.c/src/tasks/ruuvi_task_button typedef void (*rt_button_fp_t) (const ri_gpio_evt_t event); # 72 ruuvi.drivers.c/src/tasks/ruuvi_task_button rd_status_t rt_button_uninit (const rt_button_init_t * const rt_init); # 8 app_button 2 # 1 ruuvi.drivers.c/src/tasks/ruuvi_task_gpio 1 #define RUUVI_TASK_GPIO_H # 33 ruuvi.drivers.c/src/tasks/ruuvi_task_gpio rd_status_t rt_gpio_init (void); # 40 ruuvi.drivers.c/src/tasks/ruuvi_task_gpio rt_gpio_is_init (void); # 9 app_button 2 # 40 app_button rd_status_t app_button_init (void); # 14 main.c 2 # 1 app_comms 1 #define APP_COMMS_H # 30 app_comms # 1 ruuvi.drivers.c/src/interfaces/communication/ruuvi_interface_communication 1 #define RUUVI_INTERFACE_COMMUNICATION_H # 17 ruuvi.drivers.c/src/interfaces/communication/ruuvi_interface_communication #define RUUVI_NRF5_SDK15_COMMUNICATION_ENABLED RUUVI_NRF5_SDK15_ENABLED # 1 gcc-arm...include/stddef 1 3 4 # 22 ruuvi.drivers.c/src/interfaces/communication/ruuvi_interface_communication 2 #define RI_COMM_DIS_STRLEN 48 #define RI_COMM_MSG_REPEAT_FOREVER (0U) typedef struct ri_comm_message_t { uint8_t data[230]; uint8_t data_length; uint8_t repeat_count; } ri_comm_message_t; typedef enum { RI_COMM_CONNECTED, RI_COMM_TIMEOUT, RI_COMM_ABORTED } ri_comm_evt_t; typedef struct { char fw_version[48]; char model[48]; char hw_version[48]; char manufacturer[48]; char deviceid[48]; char deviceaddr[48]; } ri_comm_dis_init_t; typedef enum { RI_GATT_TURBO, RI_GATT_STANDARD, RI_GATT_LOW_POWER } ri_gatt_params_t; typedef struct ri_comm_channel_t ri_comm_channel_t; … # 103 ruuvi.drivers.c/src/interfaces/communication/ruuvi_interface_communication typedef rd_status_t (*ri_comm_evt_handler_fp_t) (const ri_comm_evt_t evt, void * p_data, size_t data_len); # 126 ruuvi.drivers.c/src/interfaces/communication/ruuvi_interface_communication rd_status_t ri_comm_id_get (uint64_t * const id); # 31 app_comms 2 #define APP_COMM_ADV_REPEAT_FOREVER (255U) #define APP_COMM_ADV_DISABLE (0U) … # 165 app_comms rd_status_t app_comms_blocking_send (const ri_comm_xfer_fp_t reply_fp, ri_comm_message_t * const msg); # 15 main.c 2 # 1 app_heartbeat 1 #define APP_HEARTBEAT_H # 31 app_heartbeat rd_status_t app_heartbeat_init (void); # 66 app_heartbeat 3 4 _Bool # 66 app_heartbeat app_heartbeat_overdue (void); # 16 main.c 2 # 1 app_led 1 #define APP_LED_H # 39 app_led rd_status_t app_led_init (void); … # 17 main.c 2 # 1 app_log 1 #define APP_LOG_H # 29 app_log #define STORAGE_RECORD_HEADER_SIZE (96u) #define STORAGE_BLOCK_SIZE (RB_FLASH_PAGE_SIZE - STORAGE_RECORD_HEADER_SIZE) typedef struct { uint16_t interval_s; # 40 app_log 3 4 _Bool overflow; rd_sensor_data_fields_t fields; } app_log_config_t; typedef struct { uint32_t timestamp_s; float temperature_c; float humidity_rh; float pressure_pa; } app_log_element_t; #define APP_LOG_MAX_SAMPLES (STORAGE_BLOCK_SIZE/sizeof(app_log_element_t)) typedef struct { uint32_t start_timestamp_s; uint32_t end_timestamp_s; size_t num_samples; app_log_config_t block_configuration; app_log_element_t storage[((0x1000 - (96u))/sizeof(app_log_element_t))]; } app_log_record_t; typedef struct { uint8_t page_idx; uint16_t element_idx; const uint64_t oldest_element_ms; } app_log_read_state_t; # 78 app_log rd_status_t app_log_init(); void app_log_purge_flash (void); # 18 main.c 2 # 1 app_power 1 #define APP_POWER_H # 34 app_power rd_status_t app_dc_dc_init (void); # 19 main.c 2 # 1 app_sensor 1 # 28 app_sensor #define APP_SENSOR_H # 46 app_sensor # 1 ruuvi.drivers.c/src/interfaces/communication/ruuvi_interface_communication_radio 1 #define RUUVI_INTERFACE_COMMUNICATION_RADIO_H #define RUUVI_NRF5_SDK15_RADIO_ENABLED RUUVI_NRF5_SDK15_ENABLED # 30 ruuvi.drivers.c/src/interfaces/communication/ruuvi_interface_communication_radio typedef enum { RI_RADIO_BEFORE, RI_RADIO_AFTER } ri_radio_activity_evt_t; typedef enum { RI_RADIO_BLE_125KBPS, RI_RADIO_BLE_1MBPS, RI_RADIO_BLE_2MBPS } ri_radio_modulation_t; typedef struct { unsigned int channel_37 : 1; unsigned int channel_38 : 1; unsigned int channel_39 : 1; } ri_radio_channels_t; typedef void (*ri_radio_activity_interrupt_fp_t) (const ri_radio_activity_evt_t evt); uint8_t ri_radio_num_channels_get (const ri_radio_channels_t channels); # 80 ruuvi.drivers.c/src/interfaces/communication/ruuvi_interface_communication_radio # 80 ruuvi.drivers.c/src/interfaces/communication/ruuvi_interface_communication_radio 3 4 rd_status_t ri_radio_init (const ri_radio_modulation_t modulation); # 47 app_sensor 2 previously got to 46 # 1 ruuvi.drivers.c/src/tasks/ruuvi_task_sensor 1 #define RUUVI_TASK_SENSOR_H # 20 ruuvi.drivers.c/src/tasks/ruuvi_task_sensor typedef struct { rd_sensor_t sensor; rd_sensor_init_fp init; rd_sensor_configuration_t configuration; uint16_t nvm_file; uint16_t nvm_record; uint8_t handle; rd_bus_t bus; ri_gpio_id_t pwr_pin; ri_gpio_state_t pwr_on; ri_gpio_id_t fifo_pin; ri_gpio_id_t level_pin; } rt_sensor_ctx_t; # 50 ruuvi.drivers.c/src/tasks/ruuvi_task_sensor rd_status_t rt_sensor_initialize (rt_sensor_ctx_t * const sensor); # 48 app_sensor 2 # 1 ruuvi.drivers.c/src/interfaces/environmental/ruuvi_interface_environmental_mcu 1 #define RUUVI_INTERFACE_ENVIRONMENTAL_MCU_H # 46 ruuvi.drivers.c/src/interfaces/environmental/ruuvi_interface_environmental_mcu # 1 ruuvi.drivers.c/src/interfaces/environmental/ruuvi_interface_tmp117 1 #define RUUVI_INTERFACE_TMP117_H # 45 ruuvi.drivers.c/src/interfaces/environmental/ruuvi_interface_tmp117 #define TMP117_REG_TEMP_RESULT (0x00U) … rd_status_t ri_tmp117_data_get (rd_sensor_data_t * const data); # 50 app_sensor 2 #define APP_SENSOR_SELFTEST_RETRIES (5U) #define APP_SENSOR_HANDLE_UNUSED RD_HANDLE_UNUSED … void app_sensor_ctx_get (rt_sensor_ctx_t *** m_sensors, size_t * num_sensors); # 20 main.c 2 # 1 main 1 #define MAIN_H FInally include main.h includes for _communication_radio _gpio_interrupt skipped !! as they were already included at # 19 main.c What? BACK TO 19 !! # 1 app_sensor # 1 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log 1 # 22 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log #define RUUVI_INTERFACE_LOG_H # 35 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log # 1 gcc-arm...include/stddef 1 3 4 # 36 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log 2 typedef enum { RI_LOG_LEVEL_NONE = 0, RI_LOG_LEVEL_ALWAYS = 0, RI_LOG_LEVEL_ERROR, RI_LOG_LEVEL_WARNING, RI_LOG_LEVEL_INFO, RI_LOG_LEVEL_DEBUG } ri_log_severity_t; # 68 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log #define LOGA(m) ri_logf (RI_LOG_LEVEL_ALWAYS, __func__ , m); #define LOGE(m) ri_logf (RI_LOG_LEVEL_ERROR, __func__ , m); #define LOGW(m) ri_logf (RI_LOG_LEVEL_WARNING, __func__ , m); #define LOGI(m) ri_logf (RI_LOG_LEVEL_INFO, __func__ , m); #define LOGD(m) ri_logf (RI_LOG_LEVEL_DEBUG, __func__ , m); #define LOGDHEX(m,len) ri_log_hex(RI_LOG_LEVEL_DEBUG, m, len); # 101 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log rd_status_t ri_log_init (const ri_log_severity_t min_severity); rd_status_t ri_log_flush (void); # 116 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log void ri_logf (const ri_log_severity_t severity, const char *func, const char *const message); void ri_log (const ri_log_severity_t severity, const char *const message); # 129 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log void ri_log_hex (const ri_log_severity_t severity, const uint8_t * const bytes, size_t byte_length); # 141 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log void ri_log_sensor_configuration (const ri_log_severity_t level, const rd_sensor_configuration_t *const configuration, const char *unit); # 153 ruuvi.drivers.c/src/interfaces/log/ruuvi_interface_log size_t ri_error_to_string (rd_status_t error, char *error_string, size_t space_remaining); # 7 main.h 2 # 1 gcc-arm.../arm-none-eabi/include/stdio 1 3 really # 27 gcc-arm.../arm-none-eabi/include/stdio 3 #define _STDIO_H_ … # 797 gcc-arm.../arm-none-eabi/include/stdio 3 # 9 main.c 2 # 25 main.h #define RUUVI_BOARDS_REQ 3.7.1 #define RUUVI_DRIVERS_REQ 3.9.0 #define RUUVI_ENDPOINTS_REQ 3.2.1 #define RUUVI_LIBRARIES_REQ 3.0.0 #define APP_SELFTEST_OK_DELAY_MS (1000U) # 42 main #define LOOP_FOREVER 1 # 21 main.c 2 # 1 run_integration_tests 1 #define RUN_INTEGRATION_TEST_H # 30 run_integration_tests # 30 run_integration_tests void integration_tests_run (void); # 22 main.c 2 # 1 ruuvi.drivers.c/src/interfaces/power/ruuvi_interface_power 1 #define RUUVI_INTERFACE_POWER_H # 19 ruuvi.drivers.c/src/interfaces/power/ruuvi_interface_power # 1 gcc-arm...include/stddef 1 3 4 # 24 ruuvi.drivers.c/src/interfaces/power/ruuvi_interface_power 2 typedef struct { unsigned int DCDC_INTERNAL : 1; unsigned int DCDC_HV : 1; } ri_power_regulators_t; # 45 ruuvi.drivers.c/src/interfaces/power/ruuvi_interface_power rd_status_t ri_power_regulators_enable (const ri_power_regulators_t regulators); # 55 ruuvi.drivers.c/src/interfaces/power/ruuvi_interface_power void ri_power_reset (void); # 65 ruuvi.drivers.c/src/interfaces/power/ruuvi_interface_power void ri_power_enter_bootloader (void); # 24 main.c 2 # 1 ruuvi.drivers.c/src/interfaces/scheduler/ruuvi_interface_scheduler 1 #define RUUVI_INTERFACE_SCHEDULER_H # 20 ruuvi.drivers.c/src/interfaces/scheduler/ruuvi_interface_scheduler # 1 gcc-arm...include/stddef 1 3 4 # 21 ruuvi.drivers.c/src/interfaces/scheduler/ruuvi_interface_scheduler 2 #define RUUVI_NRF5_SDK15_SCHEDULER_ENABLED RUUVI_NRF5_SDK15_ENABLED # 39 ruuvi.drivers.c/src/interfaces/scheduler/ruuvi_interface_scheduler rd_status_t ri_scheduler_init (void); # 48 ruuvi.drivers.c/src/interfaces/scheduler/ruuvi_interface_scheduler typedef void (*ruuvi_scheduler_event_handler_t) (void * p_event_data, uint16_t event_size); # 25 main.c 2 # 1 ruuvi.drivers.c/src/interfaces/timer/ruuvi_interface_timer 1 #define RUUVI_INTERFACE_TIMER_H # 69 ruuvi.drivers.c/src/interfaces/timer/ruuvi_interface_timer #define RUUVI_NRF5_SDK15_TIMER_ENABLED RUUVI_NRF5_SDK15_ENABLED # 26 main.c 2 # 1 ruuvi.drivers.c/src/interfaces/watchdog/ruuvi_interface_watchdog 1 # 23 ruuvi.drivers.c/src/interfaces/watchdog/ruuvi_interface_watchdog #define RUUVI_INTERFACE_WATCHDOG_H # 35 ruuvi.drivers.c/src/interfaces/watchdog/ruuvi_interface_watchdog #define RUUVI_NRF5_SDK15_WATCHDOG_ENABLED RUUVI_NRF5_SDK15_ENABLED typedef void (*wdt_evt_handler_t) (void); # 56 ruuvi.drivers.c/src/interfaces/watchdog/ruuvi_interface_watchdog rd_status_t ri_watchdog_init (const uint32_t interval_ms, const wdt_evt_handler_t handler); rd_status_t ri_watchdog_feed (void); # 27 main.c 2 # 1 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield 1 #define RUUVI_INTERFACE_YIELD_H # 27 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield #define RUUVI_NRF5_SDK15_YIELD_ENABLED RUUVI_NRF5_SDK15_ENABLED typedef void (*ri_yield_state_ind_fp_t) (const # 35 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield 3 4 _Bool # 35 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield active); void ri_yield_indication_set (const ri_yield_state_ind_fp_t indication); # 53 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield rd_status_t ri_yield_init (void); # 63 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield rd_status_t ri_yield_uninit (void); # 73 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield rd_status_t ri_yield_low_power_enable (const # 73 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield 3 4 _Bool # 73 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield enable); # 84 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield rd_status_t ri_yield (void); # 99 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield rd_status_t ri_delay_ms (uint32_t time); # 113 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield rd_status_t ri_delay_us (uint32_t time); # 123 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield # 123 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield 3 4 _Bool # 123 ruuvi.drivers.c/src/interfaces/yield/ruuvi_interface_yield ri_yield_is_interrupt_context (void); # 28 main.c 2 # 1 ruuvi.drivers.c/src/tasks/ruuvi_task_flash 1 #define RUUVI_TASK_FLASH_H # 48 ruuvi.drivers.c/src/tasks/ruuvi_task_flash # 1 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash 1 # 16 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash #define RUUVI_INTERFACE_FLASH_H # 25 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash # 1 gcc-arm...include/stddef 1 3 4 # 26 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash 2 #define RUUVI_NRF5_SDK15_FLASH_ENABLED RUUVI_NRF5_SDK15_ENABLED #define RI_FLASH_PAGES APP_FLASH_PAGES # 46 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash rd_status_t ri_flash_total_size_get (size_t * size); # 57 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash rd_status_t ri_flash_page_size_get (size_t * size); # 67 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash rd_status_t ri_flash_free_size_get (size_t * size); # 84 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash rd_status_t ri_flash_record_delete (const uint32_t file_key, const uint32_t record_key); # 104 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash rd_status_t ri_flash_record_set (const uint32_t file_key, const uint32_t record_key, const size_t data_size, const void * const data); # 122 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash rd_status_t ri_flash_record_get (const uint32_t file_key, const uint32_t record_key, const size_t data_size, void * const data); rd_status_t ri_flash_gc_run (void); # 140 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash rd_status_t ri_flash_init (void); rd_status_t ri_flash_uninit (void); # 159 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash void ri_flash_purge (void); # 167 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash 3 4 _Bool # 167 ruuvi.drivers.c/src/interfaces/flash/ruuvi_interface_flash ri_flash_is_busy(); # 49 ruuvi.drivers.c/src/tasks/ruuvi_task_flash 2 # 60 ruuvi.drivers.c/src/tasks/ruuvi_task_flash rd_status_t rt_flash_init (void); # 91 ruuvi.drivers.c/src/tasks/ruuvi_task_flash rd_status_t rt_flash_store (const uint16_t file_id, const uint16_t record_id, const void * const message, const size_t message_length); # 115 ruuvi.drivers.c/src/tasks/ruuvi_task_flash rd_status_t rt_flash_load (const uint16_t file_id, const uint16_t record_id, void * const message, const size_t message_length); # 139 ruuvi.drivers.c/src/tasks/ruuvi_task_flash rd_status_t rt_flash_free (const uint16_t file_id, const uint16_t record_id); # 154 ruuvi.drivers.c/src/tasks/ruuvi_task_flash rd_status_t rt_flash_gc_run (void); # 163 ruuvi.drivers.c/src/tasks/ruuvi_task_flash # 163 ruuvi.drivers.c/src/tasks/ruuvi_task_flash 3 4 _Bool # 163 ruuvi.drivers.c/src/tasks/ruuvi_task_flash rt_flash_busy (void); # 30 main.c 2 # 1 ruuvi.drivers.c/src/tasks/ruuvi_task_led 1 #define RUUVI_TASK_LED_H # 51 ruuvi.drivers.c/src/tasks/ruuvi_task_led #define RT_LED_ON (true) #define RT_LED_OFF (false) # 73 ruuvi.drivers.c/src/tasks/ruuvi_task_led rd_status_t rt_led_init (const ri_gpio_id_t * const leds, const ri_gpio_state_t * const active_states, const size_t num_leds); # 86 ruuvi.drivers.c/src/tasks/ruuvi_task_led rd_status_t rt_led_uninit (void); # 98 ruuvi.drivers.c/src/tasks/ruuvi_task_led rd_status_t rt_led_write (const ri_gpio_id_t led, const # 98 ruuvi.drivers.c/src/tasks/ruuvi_task_led 3 4 _Bool # 98 ruuvi.drivers.c/src/tasks/ruuvi_task_led state); # 109 ruuvi.drivers.c/src/tasks/ruuvi_task_led void rt_led_activity_indicate (const # 109 ruuvi.drivers.c/src/tasks/ruuvi_task_led 3 4 _Bool # 109 ruuvi.drivers.c/src/tasks/ruuvi_task_led state); # 122 ruuvi.drivers.c/src/tasks/ruuvi_task_led rd_status_t rt_led_activity_led_set (const ri_gpio_id_t led); uint16_t rt_led_activity_led_get (void); # 147 ruuvi.drivers.c/src/tasks/ruuvi_task_led rd_status_t rt_led_blink_start (const ri_gpio_id_t led, const uint16_t interval_ms); # 168 ruuvi.drivers.c/src/tasks/ruuvi_task_led rd_status_t rt_led_blink_once (const ri_gpio_id_t led, const uint16_t interval_ms); # 179 ruuvi.drivers.c/src/tasks/ruuvi_task_led rd_status_t rt_led_blink_stop (const ri_gpio_id_t led); # 187 ruuvi.drivers.c/src/tasks/ruuvi_task_led 3 4 _Bool # 187 ruuvi.drivers.c/src/tasks/ruuvi_task_led rt_led_is_init (void); # 32 main.c 2 # 1 ruuvi.drivers.c/src/tasks/ruuvi_task_adc 1 #define RUUVI_TASK_ADC_H # 59 ruuvi.drivers.c/src/tasks/ruuvi_task_adc typedef enum { RATIOMETRIC, ABSOLUTE } rt_adc_mode_t; rd_status_t rt_adc_init (void); rd_status_t rt_adc_uninit (void); # 87 ruuvi.drivers.c/src/tasks/ruuvi_task_adc 3 4 _Bool # 87 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rt_adc_is_init (void); # 106 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rd_status_t rt_adc_configure_se (rd_sensor_configuration_t * const config, const uint8_t handle, const rt_adc_mode_t mode); # 118 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rd_status_t rt_adc_sample (void); # 130 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rd_status_t rt_adc_voltage_get (rd_sensor_data_t * const data); # 144 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rd_status_t rt_adc_ratio_get (rd_sensor_data_t * const data); # 157 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rd_status_t rt_adc_vdd_prepare (rd_sensor_configuration_t * const vdd_adc_configuration); # 168 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rd_status_t rt_adc_vdd_sample (void); # 180 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rd_status_t rt_adc_vdd_get (float * const vdd); # 194 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rd_status_t rt_adc_absolute_sample (rd_sensor_configuration_t * const configuration, const uint8_t handle, float * const sample); # 211 ruuvi.drivers.c/src/tasks/ruuvi_task_adc rd_status_t rt_adc_ratiometric_sample (rd_sensor_configuration_t * const configuration, const uint8_t handle, float * const sample);

Now that all the includes have be processed, he comes the code

# 33 main.c 2 # 45 main.c static void app_on_error (const rd_status_t error, const # 48 main.c 3 4 _Bool # 48 main.c fatal, const char * file, const int line) { if (fatal) { ri_power_reset(); } } void setup (void) { rd_status_t err_code = ( 0U); float motion_threshold = (0.064F); err_code |= ri_yield_init(); err_code |= ri_timer_init(); err_code |= ri_scheduler_init(); err_code |= rt_gpio_init(); err_code |= ri_yield_low_power_enable ( # 75 main.c 3 4 1 # 75 main.c ); err_code |= rt_flash_init(); err_code |= app_led_init(); app_led_error_signal ( # 78 main.c 3 4 1 # 78 main.c ); err_code |= app_button_init(); err_code |= app_dc_dc_init(); err_code |= app_sensor_init(); err_code |= app_log_init(); (void) app_sensor_acc_thr_set (&motion_threshold); err_code |= app_comms_init ( # 85 main.c 3 4 1 # 85 main.c ); err_code |= app_sensor_vdd_sample(); err_code |= app_heartbeat_init(); err_code |= app_heartbeat_start(); if (( 0U) == err_code) { app_led_error_signal ( # 92 main.c 3 4 0 # 92 main.c ); app_led_activity_signal ( # 93 main.c 3 4 1 # 93 main.c ); err_code |= ri_delay_ms ((1000U)); app_led_activity_signal ( # 95 main.c 3 4 0 # 95 main.c ); } rd_error_cb_set (&app_on_error); rd_error_check(err_code, ( 0U), __func__, 99); } int main (void) { integration_tests_run(); setup(); do { ri_scheduler_execute(); ri_yield(); __asm__ (); } while (1); return -1; } /*!!