summaryrefslogtreecommitdiffstats
path: root/ucs2-vol/inc
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-27 17:18:55 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-27 17:19:56 +0200
commit1fe55667142158af865372a8b9916581662286fe (patch)
tree797b285d187938f2bf1ff60eec555a14b126c259 /ucs2-vol/inc
parentbbe0fa2bb0479bf7a09eed345fefc3c375773745 (diff)
Change marketing stuff
unicens -> UNICENS MicroChip -> Microchip Change-Id: I7a2f48ac62f44579831ed252b5e24dc918c09645 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ucs2-vol/inc')
-rw-r--r--ucs2-vol/inc/device_container.h6
-rw-r--r--ucs2-vol/inc/device_value.h14
-rw-r--r--ucs2-vol/inc/libmostvolume.h16
-rw-r--r--ucs2-vol/inc/setup.h20
4 files changed, 28 insertions, 28 deletions
diff --git a/ucs2-vol/inc/device_container.h b/ucs2-vol/inc/device_container.h
index 16b7f8a..6e98ea6 100644
--- a/ucs2-vol/inc/device_container.h
+++ b/ucs2-vol/inc/device_container.h
@@ -28,13 +28,13 @@
#include "libmostvolume.h"
class CDeviceContainer {
-
+
public:
CDeviceContainer();
virtual ~CDeviceContainer();
-
+
void AssignService(lib_most_volume_service_cb_t service_fptr, Ucs_Inst_t *ucs_ptr) {_service_fptr = service_fptr; _ucs_inst_ptr = ucs_ptr;}
-
+
void RegisterValues(CDeviceValue** list_pptr, uint16_t list_sz);
void SetValue(uint16_t key, uint8_t value);
void ClearValues();
diff --git a/ucs2-vol/inc/device_value.h b/ucs2-vol/inc/device_value.h
index c27bc26..0c83197 100644
--- a/ucs2-vol/inc/device_value.h
+++ b/ucs2-vol/inc/device_value.h
@@ -53,30 +53,30 @@ enum DeviceValueType {
DEVICE_VAL_MASTER = 0,
DEVICE_VAL_LEFT = 1,
DEVICE_VAL_RIGHT = 2
-
+
};
class CDeviceValue {
public:
CDeviceValue(uint16_t address, DeviceValueType type, uint16_t key);
virtual ~CDeviceValue();
-
+
uint16_t GetKey(){return _key;}
DeviceValueType GetType(){return _type;} // returns the assigned type
void SetValue(uint8_t value){_target_value = value;} // sets desired value
-
+
bool RequiresUpdate(); // returns true if target is not actual value
// returns true if success, false if failed
- // -> stop transmission
+ // -> stop transmission
bool FireUpdateMessage(void);// fires message & updates actual value
-
+
private:
void HandleI2cResult(Ucs_I2c_Result_t result);
void ApplyMostValue(uint8_t value, DeviceValueType type, uint8_t tx_payload[]);
-
+
bool _is_initial; // ensure first update
DeviceValueType _type; // determines the remote i2c command
- uint16_t _key; // lookup key
+ uint16_t _key; // lookup key
uint16_t _address; // target node/group address
uint8_t _target_value; // desired value
uint8_t _actual_value; // value set and confirmed via network
diff --git a/ucs2-vol/inc/libmostvolume.h b/ucs2-vol/inc/libmostvolume.h
index bf2ad0b..38928e0 100644
--- a/ucs2-vol/inc/libmostvolume.h
+++ b/ucs2-vol/inc/libmostvolume.h
@@ -29,7 +29,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
/** Describes the volume control */
enum lib_most_volume_channel_t{
LIB_MOST_VOLUME_CH_FRONT_LEFT = 0,
@@ -45,18 +45,18 @@ enum lib_most_volume_channel_t{
* \param timeout Time in ms after which the application shall call lib_most_volume_service().
* Valid values:
* 0x0000: as soon as possible,
- * 0x0001..0xFFFE: timeout in ms,
+ * 0x0001..0xFFFE: timeout in ms,
* 0xFFFF: never
*/
typedef void (*lib_most_volume_service_cb_t)(uint16_t timeout);
/** Initializes the library
- * \param unicens_inst Reference to the UNICENS instance, created by the application.
- * \param req_service_fptr Callback function which is fired if the application shall call
+ * \param UNICENS_inst Reference to the UNICENS instance, created by the application.
+ * \param req_service_fptr Callback function which is fired if the application shall call
* lib_most_volume_service.
- * \return '0' on success, otherwise value >'0'.
+ * \return '0' on success, otherwise value >'0'.
*/
-extern uint8_t lib_most_volume_init(Ucs_Inst_t *unicens_inst, lib_most_volume_service_cb_t req_service_fptr);
+extern uint8_t lib_most_volume_init(Ucs_Inst_t *UNICENS_inst, lib_most_volume_service_cb_t req_service_fptr);
/** Terminates the library
* \return '0' on success, otherwise value >'0'.
@@ -70,10 +70,10 @@ extern uint8_t lib_most_volume_exit(void);
*/
extern uint8_t lib_most_volume_set(enum lib_most_volume_channel_t channel, uint8_t volume);
-/** Shall be called either cyclically (e.g. 50ms -> polling) or after "timeout"
+/** Shall be called either cyclically (e.g. 50ms -> polling) or after "timeout"
* when "service_fptr" is fired (-> event triggered).
* \return '0' on success, otherwise value >'0'.
- */
+ */
extern uint8_t lib_most_volume_service(void);
#ifdef __cplusplus
diff --git a/ucs2-vol/inc/setup.h b/ucs2-vol/inc/setup.h
index 9295475..3295d3d 100644
--- a/ucs2-vol/inc/setup.h
+++ b/ucs2-vol/inc/setup.h
@@ -33,37 +33,37 @@
#define MAX_MASTERS 3u
class CSetup {
-
+
public:
- void Configure(Ucs_Inst_t *unicens_inst, lib_most_volume_service_cb_t service_fptr);
+ void Configure(Ucs_Inst_t *UNICENS_inst, lib_most_volume_service_cb_t service_fptr);
Ucs_Inst_t *RetrieveUnicensInst(void);
void SetVolume(enum lib_most_volume_channel_t channel, uint8_t volume);
- void Update();
-
-private:
+ void Update();
+
+private:
CDeviceValue _volume_amp_270_m;
CDeviceValue _volume_amp_270_l;
CDeviceValue _volume_amp_270_r;
-
+
CDeviceValue _volume_amp_271_m;
CDeviceValue _volume_amp_271_l;
CDeviceValue _volume_amp_271_r;
-
+
CDeviceValue _volume_amp_272_m;
CDeviceValue _volume_amp_272_l;
CDeviceValue _volume_amp_272_r;
CDeviceContainer _value_container;
Ucs_Inst_t *ucs_inst;
-
+
public:
static CSetup* GetInstance(); // singleton
static void Release(); // singleton
-
+
protected:
CSetup(); // singleton
virtual ~CSetup(); // singleton
-
+
private:
static CSetup* _instance; // singleton
};