simple FS  v0.1.0
Classes | Macros | Functions | Variables
module_time.h File Reference

Module for communication Real Time Clock (RTC) peripheral used on MCU. Supported modes: More...

#include "sensor.h"
#include "simplefs_config.h"
#include <time.h>
Include dependency graph for module_time.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RTC_TimeTypeDef
 Time structure for RTC module. More...
 
struct  RTC_DateTypeDef
 Date structure for RTC module. More...
 

Macros

#define RTC_HandleTypeDef   void
 Dummy datatype in simulation mode.
 

Functions

void time_init (void *rtc_handle, uint16_t time_format)
 Initialization of RTC module. More...
 
SensorID_tget_tsensor_id (uint8_t index)
 Return sensor ID. More...
 
RecordDescriptor_t time_getType ()
 Return type specification for RTC module. More...
 
SensorValue_tget_time_value ()
 Read prepared value from RTC module. More...
 
void time_reset (void)
 Do nothing.
 
void time_doMeasure (void)
 Do nothing.
 
uint8_t time_count (void)
 Return number of sensors in this peripheral. More...
 

Variables

SensorInterface_t timeSensor
 

Detailed Description

Module for communication Real Time Clock (RTC) peripheral used on MCU. Supported modes:

Date
23. 12. 2020
Author
Juraj Dudak

Configuration of this module: Format of measured time:

#Properties of ADC module

Interface specification:

Example of RTC record format stored in META area:

Sensor ID TYPE META_FORMAT Q_m Q_n
0 .. 7B 8B 9B 10B 11B
0x1060A8E800000000 0x04 0x34 => FORMAT_META_FMT_SPECIAL_TIME + FORMAT_META_LENGTH_4B Q_FORMAT_NONE Q_FORMAT_NONE
0x1060A8E800000000 0x04 0x46 => FORMAT_META_FMT_SPECIAL_BCD + FORMAT_META_LENGTH_6B Q_FORMAT_NONE Q_FORMAT_NONE