32#include "stm32l4xx_hal_i2c.h"
37#define UV_APP_STACK_SIZE (512)
44#define UV_READ_TIME (pdMS_TO_TICKS(60000))
58 char *_sign = (val < 0) ?
"-" :
"";
59 float _tmp_val = (val < 0) ? -val : val;
61 int _int_part = _tmp_val;
62 float _frac_part = _tmp_val - _int_part;
63 int _frac_part_int = trunc(_frac_part * 10000);
66 sprintf (str,
"%s%d.%04d", _sign, _int_part, _frac_part_int);
77 mz_puts(
"Timer expires - start read of Si1133 sensor\r\n");
115 mz_puts(
"SENSOR Initialization complete...\r\n");
133 static float _lux,_uvi;
Si1133_error SI1133_measure_lux_uv(float *lux, float *uvi)
Si1133_error SI1133_init(void)
static void uv_app(void *arg)
static StaticTask_t uv_cb_mem
static char timer_expiry_flag
static void float_to_str(char *str, float val)
static mz_thread_t uv_thread_id
mz_error_t uv_app_init(void)
static void uv_read_timer_cb(TimerHandle_t xTimer)
#define UV_APP_STACK_SIZE
static StackType_t uv_stack[UV_APP_STACK_SIZE]
mz_error_t
Enumeration of monoZ Error Flags.
monoZ system CMSIS OS2 This is an abstraction layer and includes FreeRTOS configuration,...
osThreadId_t mz_thread_t
mz_thread_t variable of type osThreadId_t
This file contains APIs for create,delete,start and stop of timers. Maximum 5 timers can be created....
int mz_puts(void *__ch)
This function prints the given string.
uint8_t mz_thread_create(mz_thread_t *t, const char *name, mz_fn thread_func, void *const arg, mz_thread_prio_t prio, StackType_t *stack_mem, size_t stack_size, StaticTask_t *cb_mem, uint32_t cb_size)
This function is used to check the message queue object validity Create a thread and add it to Active...
mz_error_t mz_tm_create_start_recursive(char *_name, TickType_t _tick, mz_tm_cb _cb)
Function to Create and Start One Shot Timers.