資源簡介
SYD Service Utility.zip
SYD Service Utility zip 8801 2017-4-12

代碼片段和文件信息
#define??_OTA_C
#include?“ota.h“
#include?“lib.h“
#include?
static?uint8_t?EvtBuf[sizeof(struct?hci_evt)];
struct?hci_evt?*pevt?=?(struct?hci_evt?*)EvtBuf;
static?void?EvtCommandComplete(uint8_t?opcode?uint8_t?*ret_parm?uint8_t?ret_len)
{
pevt->evtcode?=?EVT_COMMAND_COMPLETE;
pevt->evtlen?=?ret_len?+?CMD_COMPLETE_HDR_SZ;
pevt->evtparm.EvtCommandComplete.opcode=?opcode;
memcpy((uint8_t?*)&pevt->evtparm.EvtCommandComplete.RetParm?ret_parm?ret_len);
}
static?void?CmdFwErase()
{
struct?ret_fw_erase_cmd Ret;
CodeErase();
Ret.status?=?ERR_COMMAND_SUCCESS;
EvtCommandComplete(CMD_FW_ERASE?(uint8_t?*)&Ret?sizeof?(Ret));
}
static?void?CmdFwWrite(struct?cmd_fw_write?*p_cmd)
{
struct?ret_fw_erase_cmd Ret;
CodeWrite(p_cmd->offsetp_cmd->szp_cmd->data);
Ret.status?=?ERR_COMMAND_SUCCESS;
EvtCommandComplete(CMD_FW_WRITE?(uint8_t?*)&Ret?sizeof?(Ret));
}
static?void?CmdFwUpgrade(struct?cmd_fw_upgrade?*p_cmd)
{
struct?ret_fw_erase_cmd Ret;
CodeUpdate(NULL?NULL?p_cmd->sz?p_cmd->checksum);
Ret.status?=?ERR_COMMAND_SUCCESS;
EvtCommandComplete(CMD_FW_UPGRADE?(uint8_t?*)&Ret?sizeof?(Ret));
*((uint8_t*)(0x50001000?+?0x24))?=?0x01;
}
void?ota_cmd(uint8_t?*p_cmd?uint8_t?sz)
{
struct?hci_cmd?*pcmd?=?(struct?hci_cmd*)p_cmd;
switch(pcmd->opcode)
{
case?CMD_FW_ERASE:
CmdFwErase();
break;
case?CMD_FW_WRITE:
CmdFwWrite(&pcmd->cmdparm.CmdFwWrite);
break;
case?CMD_FW_UPGRADE:
CmdFwUpgrade(&pcmd->cmdparm.CmdFwUpgrade);
break;
}
}
void?ota_rsp(uint8_t?*p_rsp?uint8_t?*p_sz)
{
memcpy(p_rsp?EvtBuf??pevt->evtlen?+?2);
*p_sz?=?pevt->evtlen?+?2;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-04-11?17:57??OLED\
?????文件????????4096??2016-11-02?16:10??OLED\4K_Setting_2000ppm.bin
?????文件????????1168??2016-08-05?15:01??OLED\OTA.txt
?????文件????????9839??2017-04-09?10:42??OLED\SYD8801EVB.txt
?????文件????????3366??2017-04-09?10:42??OLED\SYD8801EVB_Flash.txt
?????文件????????2022??2017-04-09?10:42??OLED\SYD8801EVB_service.h
?????目錄???????????0??2017-04-11?18:04??OLED\Vendor?Service\
?????目錄???????????0??2017-04-11?17:57??OLED\Vendor?Service\ble\
?????文件???????12579??2016-10-15?13:04??OLED\Vendor?Service\ble\lib.h
?????文件??????294272??2016-11-23?11:03??OLED\Vendor?Service\ble\syd_ble_keil.lib
?????文件???????68287??2017-04-10?23:42??OLED\Vendor?Service\Ble_Vendor_Service.map
?????文件???????73116??2017-04-10?23:44??OLED\Vendor?Service\Ble_Vendor_Service.uvguix.Administrator
?????文件???????71517??2016-08-04?17:36??OLED\Vendor?Service\Ble_Vendor_Service.uvguix.ms_shia
?????文件???????77012??2017-04-11?18:04??OLED\Vendor?Service\Ble_Vendor_Service.uvguix.SYD-SZ-04
?????文件???????72598??2017-04-09?11:16??OLED\Vendor?Service\Ble_Vendor_Service.uvguix_Administrator.bak
?????文件???????11174??2017-04-09?23:05??OLED\Vendor?Service\Ble_Vendor_Service.uvoptx
?????文件???????19748??2017-04-09?23:05??OLED\Vendor?Service\Ble_Vendor_Service.uvprojx
?????文件???????11174??2017-04-07?18:45??OLED\Vendor?Service\Ble_Vendor_Service_uvoptx.bak
?????文件???????19748??2017-01-12?09:29??OLED\Vendor?Service\Ble_Vendor_Service_uvprojx.bak
?????目錄???????????0??2017-04-11?17:57??OLED\Vendor?Service\Driver\
?????文件????????1718??2016-07-18?17:39??OLED\Vendor?Service\Driver\ota.c
?????文件????????1193??2016-07-28?10:20??OLED\Vendor?Service\Driver\syd8801_debug.c
?????文件?????????409??2016-07-21?10:16??OLED\Vendor?Service\Driver\syd8801_delay.c
?????文件????????4523??2017-04-07?18:30??OLED\Vendor?Service\Driver\syd8801_gpio.c
?????文件????????3978??2017-04-07?18:31??OLED\Vendor?Service\Driver\syd8801_ioi2c.c
?????文件????????3654??2016-12-01?23:05??OLED\Vendor?Service\Driver\syd8801_timer.c
?????文件????????3554??2016-07-26?17:21??OLED\Vendor?Service\Driver\syd8801_uart.c
?????目錄???????????0??2017-04-11?17:57??OLED\Vendor?Service\Include\
?????文件???????20385??2016-07-21?10:15??OLED\Vendor?Service\Include\ARMCM0.h
?????文件????????1380??2016-07-18?17:39??OLED\Vendor?Service\Include\ota.h
?????文件????????2022??2017-04-07?16:24??OLED\Vendor?Service\Include\SYD8801EVB_service.h
............此處省略349個文件信息
評論
共有 條評論