Welcome to mirror list, hosted at ThFree Co, Russian Federation.

appli_sensor.h « app « STM32_WPAN « BLE_MeshLightingLPN « BLE « Applications « P-NUCLEO-WB55.USBDongle « Projects - github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 172acf4f7664255303f32c89357ba9d123739698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/**
  ******************************************************************************
  * @file    appli_sensor.h
  * @author  BLE Mesh Team
  * @brief   Application interface for Light Mesh Model
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under Ultimate Liberty license
  * SLA0044, the "License"; You may not use this file except in compliance with
  * the License. You may obtain a copy of the License at:
  *                             www.st.com/SLA0044
  *
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __APPLI_SENSOR_H
#define __APPLI_SENSOR_H

/* Includes ------------------------------------------------------------------*/
#include "types.h"
#include "sensors.h"
#include "mesh_cfg.h"

/* Exported functions ------------------------------------------------------- */
void Appli_Sensor_CadenceGet(sensor_CadenceCbParam_t* pDescriptorParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_CadenceSet(sensor_CadenceCbParam_t* pDescriptorParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_CadenceSetUnack(sensor_CadenceCbParam_t* pDescriptorParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_SettingsGet(sensor_SettingsCbParams_t* pDescriptorParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_SettingGet(sensor_SettingCbParams_t* pSettingParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_SettingSet(sensor_SettingCbParams_t* pSettingParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_SettingSetUnack(sensor_SettingCbParams_t* pSettingParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_DescriptorGet(MOBLEUINT8 pDescriptorParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_Get (MOBLEUINT16 prop_ID,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_ColumnGet(sensor_ColumnCbParams_t* pDescriptorParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
void Appli_Sensor_SeriesGet(sensor_SeriesCbParams_t* pDescriptorParam,
                                         MOBLEUINT32 length,
                                         MOBLE_ADDRESS peerAddr,
                                         MOBLE_ADDRESS dstPeer,
                                         MOBLEUINT8 elementIndex);
MOBLE_RESULT Appli_Sensor_ReadDescriptor(MOBLEUINT8 sensorOffset,
                                         sensor_DescriptorCbParams_t* pDescriptorParams);
MOBLE_RESULT Appli_Sensor_ReadValue(MOBLEUINT8 sensorOffset,
                                    sensor_ValueCbParams_t* pValueParams);
MOBLE_RESULT Appli_Sensor_ReadColumn(MOBLEUINT8 sensorOffset,
                                   MOBLEUINT8 columnOffset,
                                     sensor_ColumnCbParams_t* pColumnParams);
MOBLE_RESULT Appli_Sensor_ReadSeries(MOBLEUINT8 sensorOffset,
                                     sensor_SeriesCbParams_t* pSeriesParams);
MOBLEUINT8 Appli_Sensor_IsFastCadence(MOBLEUINT8 sensorOffset,
                                      void* pFastCadenceLow, 
                                      void* pFastCadenceHigh);
MOBLEUINT8 Appli_Sensor_IsStatusTrigger(MOBLEUINT8 sensorOffset,
                                        status_trigger_type_e triggerType,
                                        void* pDeltaDown,
                                        void* pDeltaUp);
MOBLE_RESULT Appli_Sensor_Init(void); 
MOBLE_RESULT Appli_Sensor_Update(MOBLEUINT8 sensorOffset, MOBLEUINT32 value);

MOBLE_RESULT Appli_Sensor_Update(MOBLEUINT8 sensorOffset, 
                                 MOBLEUINT32 value);
void Appli_Sensor_SerialCmd(char *rcvdStringBuff, 
                            uint16_t rcvdStringSize);
#endif /* __APPLI_SENSOR_H */

/******************* (C) COPYRIGHT 2020 STMicroelectronics *****END OF FILE****/