File tree Expand file tree Collapse file tree 5 files changed +50
-5
lines changed Expand file tree Collapse file tree 5 files changed +50
-5
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ envie_m7.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt
51
51
envie_m7.compiler.mbed.includes={build.variant.path}/includes.txt
52
52
envie_m7.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
53
53
envie_m7.compiler.mbed="{build.variant.path}/libs/libmbed.a"
54
- envie_m7.vid.0=0x0483
55
- envie_m7.pid.0=0x374e
54
+ envie_m7.vid.0=0x2341
55
+ envie_m7.pid.0=0x025b
56
56
57
57
envie_m7.upload.tool=dfu-util
58
58
envie_m7.upload.protocol=
Original file line number Diff line number Diff line change 44
44
-DFEATURE_LWIP=1
45
45
-D__FPU_PRESENT=1
46
46
-D__MBED__=1
47
- -DMBED_BUILD_TIMESTAMP=1578499787.7442052
47
+ -DMBED_BUILD_TIMESTAMP=1578656653.6684103
48
48
-D__MBED_CMSIS_RTOS_CM
49
49
-DSTM32H747xx
50
50
-DTARGET_4343W
72
72
-DTRANSACTION_QUEUE_SIZE_SPI=2
73
73
-DUSE_FULL_LL_DRIVER
74
74
-DUSE_HAL_DRIVER
75
- -DMBED_NO_GLOBAL_USING_DIRECTIVE=1
75
+ -DMBED_NO_GLOBAL_USING_DIRECTIVE=1
Original file line number Diff line number Diff line change 2
2
3
3
#define SERIAL_HOWMANY 1
4
4
#define SERIAL1_TX SERIAL_TX
5
- #define SERIAL1_RX SERIAL_RX
5
+ #define SERIAL1_RX SERIAL_RX
6
+
7
+ #define SERIAL_CDC 1
8
+ #define HAS_UNIQUE_ISERIAL_DESCRIPTOR
9
+ #define BOARD_VENDORID 0x2341
10
+ #define BOARD_PRODUCTID 0x025b
11
+ #define BOARD_NAME "Envie M7"
12
+
13
+ #define DFU_MAGIC_SERIAL_ONLY_RESET 0xb0
14
+
15
+ uint8_t getUniqueSerialNumber (uint8_t * name );
16
+ void _ontouch1200bps_ ();
Original file line number Diff line number Diff line change
1
+ #include " Arduino.h"
2
+
3
+ RTC_HandleTypeDef RTCHandle;
4
+
5
+ void initVariant () {
6
+ RTCHandle.Instance = RTC;
7
+ // Turn off LED red from bootloader
8
+ digitalWrite (PK_6, HIGH);
9
+ }
10
+
11
+ #ifdef SERIAL_CDC
12
+
13
+ static void utox8 (uint32_t val, uint8_t * s) {
14
+ for (int i = 0 ; i < 16 ; i=i+2 ) {
15
+ int d = val & 0XF ;
16
+ val = (val >> 4 );
17
+
18
+ s[15 - i -1 ] = d > 9 ? ' A' + d - 10 : ' 0' + d;
19
+ s[15 - i] = ' \0 ' ;
20
+ }
21
+ }
22
+
23
+ uint8_t getUniqueSerialNumber (uint8_t * name) {
24
+ utox8 (HAL_GetUIDw0 (), &name[0 ]);
25
+ utox8 (HAL_GetUIDw1 (), &name[16 ]);
26
+ return 32 ;
27
+ }
28
+
29
+ void _ontouch1200bps_ () {
30
+ HAL_RTCEx_BKUPWrite (&RTCHandle, RTC_BKP_DR0, 0xDF59 );
31
+ NVIC_SystemReset ();
32
+ }
33
+
34
+ #endif
You can’t perform that action at this time.
0 commit comments