-
Notifications
You must be signed in to change notification settings - Fork 0
/
bl.c
888 lines (718 loc) · 22.2 KB
/
bl.c
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
/***************************************************************************************************
* OrangeBoot *
* Copyright (C) 2019 YiQiChuang(ShanXi) Electronic Technology CO,LTD. *
* *
* This file is part of OrangeBoot project. *
* *
* @file bl.c *
* @brief *
* @author Arthur Zheng *
* @email arthurzheng150@gmail.com *
* @version 0.3.0.0 *
* @date 2019/06/06 *
* *
*--------------------------------------------------------------------------------------------------*
* Remark : *
*--------------------------------------------------------------------------------------------------*
* Change History : *
* <Date> | <Version> | <Author> | <Description> *
*--------------------------------------------------------------------------------------------------*
* 2018/04/19 | 0.1.0.0 | Arthur Zheng | Create file *
* 2018/07/15 | 0.2.0.0 | Arthur Zheng | Restyle the structure of project *
* 2019/06/06 | 0.3.0.0 | Arthur Zheng | Add STM32F0 support *
*--------------------------------------------------------------------------------------------------*
* Lisense : BSD 3-Clause *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR *
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND *
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR *
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR *
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY *
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR *
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
* POSSIBILITY OF SUCH DAMAGE. *
*--------------------------------------------------------------------------------------------------*
* *
***************************************************************************************************/
/* Includes --------------------------------------------------------------------------------------*/
#include "hw_config.h"
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/syscfg.h>
#include <libopencm3/cm3/scb.h>
#include <libopencm3/cm3/systick.h>
#include "bl.h"
#include "cdcacm.h"
#include "usart.h"
/* Defination ------------------------------------------------------------------------------------*/
/**
* @breif 基础参数
**/
#define BL_PROTOCOL_VERSION "0.1.1.0" /*!< 当前协议版本 */
#define PROTO_INSYNC 0xA5 /*!< Magic code of INSYNC */
#define PROTO_EOC 0xF7 /*!< Magic code of EOC */
#define PROTO_PROG_MULTI_MAX 256 /*!< 最大单次烧写数据长度,单位:byte */
#define PROTO_REPLY_MAX 256 /*!< 最大返回数据长度,单位:byte */
/**
* @breif 返回状态
**/
#define PROTO_OK 0x10 /*!< 操作成功 */
#define PROTO_FAILED 0x11 /*!< 操作失败 */
#define PROTO_INVALID 0x13 /*!< 指令无效 */
/**
* @breif 操作指令
**/
#define PROTO_GET_SYNC 0x21 /*!< 测试同步 */
#define PROTO_GET_UDID 0x31 /*!< 读取芯片指定地址上的 UDID 12字节的值 */
#define PROTO_GET_FW_SIZE 0x32 /*!< 获取固件区大小 */
#define PROTO_GET_BL_REV 0x41 /*!< 获取Bootloader版本 */
#define PROTO_GET_ID 0x42 /*!< 获取电路板型号,包含版本 */
#define PROTO_GET_SN 0x43 /*!< 获取电路板序列号 */
#define PROTO_GET_REV 0x44 /*!< 获取电路板版本 */
#define PROTO_GET_FLASH_STRC 0x45 /*!< 获取FLASH结构描述 */
#define PROTO_GET_DES 0x46 /*!< 获取以 ASCII 格式读取设备描述 */
#define PROTO_CHIP_ERASE 0x51 /*!< 擦除设备 Flash 并复位编程指针 */
#define PROTO_PROG_MULTI 0x52 /*!< 在当前编程指针位置写入指定字节的数据,并使编程指针向后移动到下一段的位置 */
#define PROTO_GET_CRC 0x53 /*!< 计算并返回CRC校验值 */
#define PROTO_BOOT 0x54 /*!< 引导 APP 程序 */
/* Private variable -----------------------------------------------------------------------------*/
static uint8_t bl_type;
static const uint8_t bl_proto_rev[] = BL_PROTOCOL_VERSION; /*!< */ // value returned by PROTO_DEVICE_BL_REV
volatile unsigned timer[NTIMERS];
static enum led_state {LED_BLINK, LED_ON, LED_OFF} _led_state; /*<! 记录LED状态 */
static unsigned head, tail;
static uint8_t rx_buf[256];
/**
* @brief 数据接口初始化
* @param none
* @return none
*/
inline void cinit(void *config, uint8_t interface)
{
#if INTERFACE_USB
if (interface == USB)
{
return usb_cinit();
}
#endif
#if INTERFACE_USART
if (interface == USART)
{
return uart_cinit(config);
}
#endif
}
/**
* @brief 数据接口反初始化
* @param none
* @return none
*/
inline void cfini(void)
{
#if INTERFACE_USB
usb_cfini();
#endif
#if INTERFACE_USART
uart_cfini();
#endif
}
/**
* @brief 数据接收
* @param none
* @return -1,失败.其他,接收到的数据
*/
inline int cin(void)
{
#if INTERFACE_USB
if (bl_type == NONE || bl_type == USB)
{
int usb_in = usb_cin();
if (usb_in >= 0)
{
bl_type = USB;
return usb_in;
}
}
#endif
#if INTERFACE_USART
if (bl_type == NONE || bl_type == USART)
{
int uart_in = uart_cin();
if (uart_in >= 0)
{
bl_type = USART;
return uart_in;
}
}
#endif
return -1;
}
/**
* @brief 发送数据
* @param buf,数据指针
* len,数据长度
* @return none
*/
inline void cout(uint8_t *buf, unsigned len)
{
#if INTERFACE_USB
if (bl_type == NONE || bl_type == USB)
{
usb_cout(buf, len);
}
#endif
#if INTERFACE_USART
if (bl_type == NONE || bl_type == USART)
{
uart_cout(buf, len);
}
#endif
}
void buf_put(uint8_t b)
{
unsigned next = (head + 1) % sizeof(rx_buf);
if (next != tail) {
rx_buf[head] = b;
head = next;
}
}
int buf_get(void)
{
int ret = -1;
if (tail != head) {
ret = rx_buf[tail];
tail = (tail + 1) % sizeof(rx_buf);
}
return ret;
}
/**
* @brief 跳转到APP入口汇编代码
* @param stacktop,栈顶地址
* entrypoint,入口地址
* @return none
*/
static void do_jump(uint32_t stacktop, uint32_t entrypoint)
{
asm volatile(
"msr msp, %0 \n"
"bx %1 \n"
:
: "r"(stacktop), "r"(entrypoint)
:);
// 此处程序不会被执行
for (;;)
;
}
/**
* @brief 跳转到APP入口
* @param none
* @return none
*/
void jump_to_app()
{
const uint32_t *app_base = (const uint32_t *)APP_LOAD_ADDRESS;
/*
* APP 的首位默认是没有数据的,直到被上位机刷入固件,如果首位是 0xffffffff ,则我们会不启动
*/
if (app_base[0] == 0xffffffff)
{
return;
}
/*
* 第二个字是 APP 的入口地址,他需要指向 APP flash 地址
*/
if (app_base[1] < APP_LOAD_ADDRESS) // 小于APP地址范围
{
return;
}
if (app_base[1] >= (APP_LOAD_ADDRESS + board_info.fw_size)) // 大于APP地址范围
{
return;
}
/* 锁定FLASH */
flash_lock();
/* 关闭 systick 和它的中断 */
systick_interrupt_disable();
systick_counter_disable();
/* 反初始化接口 */
cfini();
/* 复位时钟 */
clock_deinit();
/* 反初始化板载资源 */
board_deinit();
#ifdef STM32F0
/* 如果芯片是STM32F0,则复制固件中断向量表到SRAM头部,并设置中断向量表到SRAM中 */
memcpy((void*)0x20000000, (void*)APP_LOAD_ADDRESS, VECTOR_SIZE);
SYSCFG_CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE);
SYSCFG_CFGR1 |= SYSCFG_CFGR1_MEM_MODE_SRAM;
#else
/* 设置中断向量表位置偏移到APP起始位置 */
SCB_VTOR = APP_LOAD_ADDRESS;
#endif
/* 将地址放入寄存器内然后跳转 */
do_jump(app_base[0], app_base[1]);
}
/**
* @brief SysTick 中断处理函数
* @param none
* @return none
*/
void sys_tick_handler(void)
{
unsigned i;
for (i = 0; i < NTIMERS; i++)
if (timer[i] > 0) {
timer[i]--;
}
if ((_led_state == LED_BLINK) && (timer[TIMER_LED] == 0)) {
led_toggle(LED_BOOTLOADER);
timer[TIMER_LED] = 50;
}
}
/**
* @brief 延时ms函数
* @param msec,时长
* @return none
*/
void delay(unsigned msec)
{
timer[TIMER_DELAY] = msec;
while (timer[TIMER_DELAY] > 0)
;
}
/**
* @brief LED状态设置函数
* @param state,LED状态
* @return none
*/
static void led_set(enum led_state state)
{
_led_state = state;
switch (state) {
case LED_OFF:
led_off(LED_BOOTLOADER);
break;
case LED_ON:
led_on(LED_BOOTLOADER);
break;
case LED_BLINK:
/* restart the blink state machine ASAP */
timer[TIMER_LED] = 0;
break;
}
}
/**
* @brief 操作成功回复
* @param none
* @return none
*/
static void sync_response(void)
{
uint8_t data[] =
{
PROTO_INSYNC, // "in sync"
PROTO_OK // "OK"
};
cout(data, sizeof(data));
}
/**
* @brief 操作无效回复
* @param none
* @return none
*/
static void invalid_response(void)
{
uint8_t data[] =
{
PROTO_INSYNC, // "in sync"
PROTO_INVALID // "invalid command"
};
cout(data, sizeof(data));
}
/**
* @brief 操作失败回复
* @param none
* @return none
*/
static void failure_response(void)
{
uint8_t data[] =
{
PROTO_INSYNC, // "in sync"
PROTO_FAILED // "command failed"
};
cout(data, sizeof(data));
}
static volatile unsigned cin_count;
/**
* @brief 等待数据输入
* @param timeout,超时时间
* @return -1,失败.其他,接收到的数据
*/
static int cin_wait(unsigned timeout)
{
int c = -1;
/* start the timeout */
timer[TIMER_CIN] = timeout;
do
{
c = cin();
if (c >= 0)
{
cin_count++;
break;
}
} while (timer[TIMER_CIN] > 0);
return c;
}
/**
* @brief 等待数据EOC输入
* @param[in] timeout,超时时间
* @return -1,失败.其他,接收到的数据
*/
inline static uint8_t wait_for_eoc(unsigned timeout)
{
return cin_wait(timeout) == PROTO_EOC;
}
/**
* @brief 输出4个字节的数据
* @param[in] val,数据
* @return none
*/
static void cout_word(uint32_t val)
{
cout((uint8_t *)&val, 4);
}
/**
* @brief 接收4个字节的数据
* @param[out] wp,数据接收位置的指针
* @param[in] timeout,超时时间
* @return 1,失败.其他,接收到的数据
*/
static int __attribute__((unused)) cin_word(uint32_t *wp, unsigned timeout)
{
union {
uint32_t w;
uint8_t b[4];
} u;
for (unsigned i = 0; i < 4; i++)
{
int c = cin_wait(timeout);
if (c < 0)
{
return c;
}
u.b[i] = c & 0xff;
}
*wp = u.w;
return 0;
}
/**
* @brief 计算CRC32校验值
* @param[in] src,数据指针
* @param[in] len,数据长度
* @param[in] state,之前CRC校验的值
* @return CRC计算结果
*/
static uint32_t crc32(const uint8_t *src, unsigned len, unsigned state)
{
static uint32_t crctab[256];
/* check whether we have generated the CRC table yet */
/* this is much smaller than a static table */
if (crctab[1] == 0)
{
for (unsigned i = 0; i < 256; i++)
{
uint32_t c = i;
for (unsigned j = 0; j < 8; j++)
{
if (c & 1)
{
c = 0xedb88320U ^ (c >> 1);
}
else
{
c = c >> 1;
}
}
crctab[i] = c;
}
}
for (unsigned i = 0; i < len; i++)
{
state = crctab[(state ^ src[i]) & 0xff] ^ (state >> 8);
}
return state;
}
/**
* @brief 引导程序主功能函数
* @param[in] timeout,退出引导程序的超时时间
* @return none
*/
void bootloader(unsigned timeout)
{
uint32_t address = board_info.fw_size; /* 默认将编程指针设置到固件区末尾 */
uint32_t first_word = 0xffffffff;
bl_type = NONE; /* 首先收到数据的接口将被确定为数据来源 */
/* 启动 SysTick 并设定为 1ms 中断间隔*/
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB);
systick_set_reload(board_info.systick_mhz * 1000);
systick_interrupt_enable();
systick_counter_enable();
/* 如果 timeout 变量非零,则工作在计时模式下,启动 timeout 计时 */
if (timeout)
{
timer[TIMER_BL_WAIT] = timeout;
}
/* 默认状态下闪烁LED */
led_set(LED_BLINK);
while (1) // 小循环
{
volatile int c;
int arg;
static union {
uint8_t c[256];
uint32_t w[64];
} flash_buffer; // 接收缓存
led_off(LED_ACTIVITY);
do
{
if (timeout && !timer[TIMER_BL_WAIT]) // 如果 timeout 溢出则立即返回
{
return;
}
c = cin_wait(0); // 尝试从上位机读取一个字节
} while (c < 0); // 在接收到数据前死循环
led_on(LED_ACTIVITY);
// 处理接收到的数据
switch (c)
{
// 测试同步
case PROTO_GET_SYNC:
if (!wait_for_eoc(2)) // 等待 EOC 结尾
{
goto cmd_bad;
}
break;
// 读取芯片序列号
case PROTO_GET_UDID:
{
uint32_t udid[3] = {0};
char tmp[12] = {0};
uint8_t i;
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
udid[0] = flash_func_read_udid(0);
udid[1] = flash_func_read_udid(1);
udid[2] = flash_func_read_udid(2);
for (i = 0; i < 12; i++)
{
tmp[i] = (udid[i / 4] >> (4 * (i % 4)));
}
cout((uint8_t *)tmp, 24);
}
break;
// 获取设备固件区大小
case PROTO_GET_FW_SIZE:
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
cout((uint8_t *)&board_info.fw_size, sizeof(board_info.fw_size));
break;
// 获取Bootloader版本
case PROTO_GET_BL_REV:
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
cout((uint8_t *)&bl_proto_rev, sizeof(bl_proto_rev));
break;
// 获取设备ID
case PROTO_GET_ID:
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
cout((uint8_t *)&board_info.id, sizeof(board_info.id));
break;
// 获取设备序列号
case PROTO_GET_SN:
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
cout((uint8_t *)&board_info.sn, sizeof(board_info.sn));
break;
// 获取设备版本
case PROTO_GET_REV:
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
cout((uint8_t *)&board_info.rev, sizeof(board_info.rev));
break;
// 获取设备FLASH结构描述
case PROTO_GET_FLASH_STRC:
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
cout((uint8_t *)&board_info.flash_strc, sizeof(board_info.flash_strc));
break;
// 获取设备描述
case PROTO_GET_DES:
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
cout((uint8_t *)&board_info.device_des, sizeof(board_info.device_des));
break;
// 擦写固件区
case PROTO_CHIP_ERASE:
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
led_set(LED_ON);
// 解锁FLASH,擦除整个APP区域
flash_unlock();
for (int i = 0; flash_func_sector_size(i) != 0; i++)
{
flash_func_erase_sector(i);
}
led_set(LED_OFF);
// verify the erase
for (address = 0; address < board_info.fw_size; address += 4)
if (flash_func_read_word(address) != 0xffffffff)
{
goto cmd_fail;
}
address = 0; // 复位地址
led_set(LED_BLINK);
break;
// 烧写
case PROTO_PROG_MULTI: // program bytes
arg = cin_wait(50);
if (arg < 0)
{
goto cmd_bad;
}
// 检测参数
if (arg % 4) // 长度不是4的整数出错
{
goto cmd_bad;
}
if ((address + arg) > board_info.fw_size) // 当前地址+长度大于固件区容量出错
{
goto cmd_bad;
}
if (arg > sizeof(flash_buffer.c)) // 长度大于缓存大小出错
{
goto cmd_bad;
}
for (int i = 0; i < arg; i++) // 接收数据
{
c = cin_wait(1000);
if (c < 0) // 数据为负出错
{
goto cmd_bad;
}
flash_buffer.c[i] = c;
}
if (!wait_for_eoc(200))
{
goto cmd_bad;
}
if (address == 0)
{
// 将固件第一个数据保存,直到所有操作完成再写入,以防止操作中出现错误
first_word = flash_buffer.w[0];
// 替换固件第一个数据
flash_buffer.w[0] = 0xffffffff;
}
arg /= 4;
for (int i = 0; i < arg; i++) // 烧写数据
{
// 烧写数据
flash_func_write_word(address, flash_buffer.w[i]);
// 当即读取数据一确认写入数据无误
if (flash_func_read_word(address) != flash_buffer.w[i])
{
goto cmd_fail;
}
address += 4;
}
break;
// 计算固件区CRC32校验值
case PROTO_GET_CRC:
{
uint32_t sum = 0;
if (!wait_for_eoc(2))
{
goto cmd_bad;
}
for (unsigned p = 0; p < board_info.fw_size; p += 4)
{
uint32_t bytes;
// 替换第一位数据为实际数据
if ((p == 0) && (first_word != 0xffffffff))
{
bytes = first_word;
}
else
{
bytes = flash_func_read_word(p);
}
sum = crc32((uint8_t *)&bytes, sizeof(bytes), sum);
}
cout_word(sum);
}
break;
// 确认完成烧写并启动
case PROTO_BOOT:
if (!wait_for_eoc(1000))
{
goto cmd_bad;
}
// 写入替换的第一字节的数据
if (first_word != 0xffffffff)
{
flash_func_write_word(0, first_word);
if (flash_func_read_word(0) != first_word)
{
goto cmd_fail;
}
// 回复变量数据防止flash写入出错
first_word = 0xffffffff;
}
sync_response();
delay(100);
// 停止并跳转到应用程序
return;
default:
goto cmd_bad;
}
// 我们收到一个有效指令,可能已经连接到了升级程序,停止timeout计时
timeout = 0;
// 发送操作成功信号
sync_response();
continue;
cmd_bad:
// 发送操作无效信号
invalid_response();
continue;
cmd_fail:
// 发送操作失败信号
failure_response();
continue;
}
}
/********* Copyright (C) 2019 YiQiChuang(ShanXi) Electronic Technology CO,LTD *****END OF FILE****/