annotate Discovery/Inc/tComm.h @ 1056:b241efe09963 Icon_Integration tip

Icon upload: added icon size check: The size of the icon is limited to 128k. To avoid overwritten data (font would no longer be shown correct) in case a larger icon is send, a size check has been added before floshing the icon.
author Ideenmodellierer
date Sat, 03 Jan 2026 20:42:09 +0100
parents 36fa1c44e597
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 /// -*- coding: UTF-8 -*-
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 /// \file Discovery/Inc/tComm.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 /// \brief Header file communication with PC
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 /// \author heinrichs weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 /// \date 08-Aug-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 /// $Id$
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 ///////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 /// This program is free software: you can redistribute it and/or modify
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 /// it under the terms of the GNU General Public License as published by
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 /// the Free Software Foundation, either version 3 of the License, or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 /// (at your option) any later version.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 /// This program is distributed in the hope that it will be useful,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 /// GNU General Public License for more details.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 ///
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 /// You should have received a copy of the GNU General Public License
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 /// along with this program. If not, see <http://www.gnu.org/licenses/>.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 //////////////////////////////////////////////////////////////////////////////
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 #ifndef TCOMM_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 #define TCOMM_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 #include <stdint.h>
1053
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
33 #include "configuration.h"
397
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
34
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
35 /* types */
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
36 typedef enum
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
37 {
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
38 BM_CONFIG_OFF = 0,
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
39 BM_CONFIG_ECHO,
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
40 BM_CONFIG_ESCAPE_DELAY,
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
41 BM_CONFIG_SIGNAL_POLL,
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
42 BM_CONFIG_BAUD,
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
43 BM_CONFIG_SILENCE,
400
7bcbbaa42cbf Added retry through power off/on cycle:
ideenmodellierer
parents: 397
diff changeset
44 BM_CONFIG_DONE,
872
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
45 BM_CONFIG_RETRY,
1046
1d7c7a36df15 Bugfix OSTC5 BT and enabling fast mode:
Ideenmodellierer
parents: 970
diff changeset
46 BM_CONFIG5_ESCAPE1 = 50,
1d7c7a36df15 Bugfix OSTC5 BT and enabling fast mode:
Ideenmodellierer
parents: 970
diff changeset
47 BM_CONFIG5_ESCAPE2,
1053
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
48 #ifdef ENABLE_PULSE_SENSOR_BT
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
49 BM_CONFIG5_CHECKMODE,
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
50 BM_CONFIG5_SETMODE,
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
51 BM_CONFIG5_WRITECONF,
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
52 BM_CONFIG5_RESTART,
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
53 #endif
1046
1d7c7a36df15 Bugfix OSTC5 BT and enabling fast mode:
Ideenmodellierer
parents: 970
diff changeset
54 BM_CONFIG5_BAUD,
1d7c7a36df15 Bugfix OSTC5 BT and enabling fast mode:
Ideenmodellierer
parents: 970
diff changeset
55 BM_CONFIG5_DATAMODE,
1044
9d9d506a82d3 Bugfix BT init sequence:
Ideenmodellierer
parents: 1003
diff changeset
56 BM_INIT_POWEROFF = 100,
9d9d506a82d3 Bugfix BT init sequence:
Ideenmodellierer
parents: 1003
diff changeset
57 BM_INIT_POWERON,
1048
493a5903ec20 Merge with 9d9d506a82d3162b6b2323819cc08652887d7dd4 (Bootloader)
Ideenmodellierer
parents: 1046 1044
diff changeset
58 BM_INIT_COMMAND_ON,
879
fe955104901c new bluetooth work, bootloader work
heinrichsweikamp
parents: 872
diff changeset
59 BM_INIT_ECHO,
872
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
60 BM_INIT_FACTORY,
1003
f1b78bc8de10 Bootloader improve init sequence:
Ideenmodellierer
parents: 970
diff changeset
61 BM_INIT_ECHO2,
872
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
62 BM_INIT_MODE,
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
63 BM_INIT_BLE,
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
64 BM_INIT_NAME,
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
65 BM_INIT_SSP_IDO_OFF,
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
66 BM_INIT_SSP_IDO_ON,
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
67 BM_INIT_SSP_ID1_OFF,
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
68 BM_INIT_SSP_ID1_ON,
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
69 BM_INIT_STORE,
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
70 BM_INIT_RESTART,
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
71 BM_INIT_DONE
397
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
72 } BlueModTmpConfig_t;
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
73
970
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
74
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
75 typedef enum
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
76 {
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
77 BT_CMD_ECHO,
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
78 BT_CMD_ESCAPE_DELAY,
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
79 BT_CMD_SIGNAL_POLL,
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
80 BT_CMD_BAUDRATE_115,
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
81 BT_CMD_BAUDRATE_460,
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
82 BT_CMD_SILENCE,
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
83 BT_CMD_NAME,
1053
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
84 #ifdef ENABLE_PULSE_SENSOR_BT
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
85 BT_CMD_REQMODE,
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
86 BT_CMD_SETMODE,
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
87 BT_CMD_WRITECONF,
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
88 BT_CMD_RESTART,
36fa1c44e597 Added upload command for icon:
Ideenmodellierer
parents: 1048
diff changeset
89 #endif
970
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
90 BT_CMD_EXIT_CMD
3123aa8723fd Old / new BT module communication:
Ideenmodellierer
parents: 879
diff changeset
91 } BTCmd;
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 void tComm_init(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 uint8_t tComm_control(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 void tComm_refresh(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 void tComm_exit(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 void tComm_verlauf(uint8_t percentage_complete);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 uint8_t tComm_Set_Bluetooth_Name(uint8_t force);
872
5e027b0f7475 Added first time initialization for new bluetooth module:
Ideenmodellierer
parents: 400
diff changeset
100 void tComm_StartBlueModBaseInit(void);
397
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
101 void tComm_StartBlueModConfig(void);
1db721dda682 Added missing enum for configuration states
ideenmodellierer
parents: 38
diff changeset
102 void tComm_RequestBluetoothStrength(void);
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 #endif /* TCOMM_H */