simple FS  v0.1.0
module_ow_bus.h
Go to the documentation of this file.
1 
46 #ifndef INC_MODULE_OW_BUS_H_
47 #define INC_MODULE_OW_BUS_H_
48 
49 #include "sensor.h"
50 #define OW_Q_FORMAT_M 0x0C //12
51 #define OW_Q_FORMAT_N 0x04
52 
53 extern SensorInterface_t owBus;
54 
55 #ifdef COMMENTARY
56 
57 #define USE_LP_DELAY 1
58 
59 //#if USE_LP_DELAY == 1
60 // #include "app.h"
61 //#endif
62 
63 
64 #if SIMULATION == 0
65  #include "module_one_wire.h"
66 
67 typedef struct{
68  GPIO_TypeDef *gpiox;
69  TIM_HandleTypeDef *timer;
70  }OwPeriph_t;
71 
72 #else
73  typedef struct {
74  uint8_t ROM_NO[8];
75  }oneWireDriver_typeDef;
76 #endif
77 
81 typedef enum {
82  RESOLUTION_9b = 0x1F,
83  RESOLUTION_10b = 0x3F,
84  RESOLUTION_11b = 0x5F,
85  RESOLUTION_12b = 0x7F
86 } owSensorResolution;
87 
88 
89 void ow_init(void *GPIOx, uint16_t GPIO_Pin);
90 uint8_t get_sensor_count(void);
91 SensorID_t *get_sensor_id(uint8_t index);
92 RecordDescriptor_t ow_getType();
93 SensorValue_t* ow_getValue();
94 void ow_reset(void);
95 void ow_doMeasure(void);
96 void ow_setConfig(owSensorResolution config);
97 
98 #endif /* INC_MODULE_OW_BUS_H_ */
99 
100 #endif
101 
RecordDescriptor_t
Describes internal structure of file.
Definition: file_format.h:228
SensorInterface_t
The interface, that defines list of functions, tha have to be implemented for each type of value (or ...
Definition: sensor.h:66
sensor.h
Declarations of universal functions to access to values.
SensorValue_t
Sensor value is stored as array of bytes.
Definition: sensor.h:42
SensorID_t
Description of one column (or 1 sensor) in file.
Definition: sensor.h:32