91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

SYD8801 密碼加密 配對SYD8801 密碼加密 配對SYD8801 密碼加密 配對SYD8801 密碼加密 配對SYD8801 密碼加密 配對

資源截圖

代碼片段和文件信息

#define??_DEBUG_C_

#include?“debug.h“
#include?“oled_12864.h“
#include?
#include?
#include?

static??UART_CTRL_TYPE?*?UART_0_CTRL?=?((UART_CTRL_TYPE?*)?UART_0_CTRL_base);
static??PIN_CONFIG_TYPE?* PIN_CONFIG =?((PIN_CONFIG_TYPE?*) PIN_CONFIG_base);


#define?MAX_FORMAT_BUFFER_SIZE (128)
static?uint8_t?s_formatBuffer[MAX_FORMAT_BUFFER_SIZE];

#ifdef?UART_BUFF

uint8_t?uart_state=0;

#define MAX_LENGTH 512

static?struct{
unsigned?char?data[MAX_LENGTH];
unsigned?short?int?header;
unsigned?short?int?tail;
}uart0_buf;

static?void?clr_uart_buf(void)
{
memset(&uart0_buf0sizeof(uart0_buf));
}

static?void?enable_uart0_int(void){
if(!uart_state){
UART_0_CTRL->INT_MASK?=?0;
NVIC_EnableIRQ(UART0_IRQn);
?*((uint8_t*)(0x50001000?+?0x24))?=?0x00;
uart_state=1;
UART_0_CTRL->SUB=?uart0_buf.data[uart0_buf.tail];
uart0_buf.tail++;
}
}

static?void?disable_uart0_int(void){
if(uart_state){
????uart_state=0;
UART_0_CTRL->INT_MASK?=?1;
NVIC_DisableIRQ(UART0_IRQn);
*((uint8_t*)(0x50001000?+?0x24))?=?0x01;
}
}

static?void?uart_send(uint8_t?*?buf?uint8_t?sz)
{
uint8_t?sz_temp;
if(!sz)?return;
sz_temp=sz;
if(uart0_buf.header else?sz=sz%(MAX_LENGTH-uart0_buf.header?+?uart0_buf.tail);
if((uart0_buf.header+sz)>MAX_LENGTH){
memcpy(&(uart0_buf.data[uart0_buf.header])bufMAX_LENGTH-uart0_buf.header);
sz-=MAX_LENGTH-uart0_buf.header;
uart0_buf.header=0;
if(sz>uart0_buf.tail){??? //超出數組范圍
sz=uart0_buf.tail-1;
memcpy(&(uart0_buf.data[uart0_buf.header])buf+(sz_temp-sz)sz);
uart0_buf.header=sz;
}else{
memcpy(&(uart0_buf.data[uart0_buf.header])buf+(sz_temp-sz)sz);
uart0_buf.header=sz;
}
}else{
?memcpy(&(uart0_buf.data[uart0_buf.header])bufsz);
?uart0_buf.header?+=sz;
}

// oled_set_wakeup();
// oled_printf(00“%03d“uart0_buf.header);

if(sz_temp){
enable_uart0_int();
}
}
void?dbg_init(void)
{
PIN_CONFIG->PIN_26_SEL?=?PIN_SEL_UART_0_RXD;
PIN_CONFIG->PIN_27_SEL?=?PIN_SEL_UART_0_TXD;
UART_0_CTRL->BAUDSEL?=?0x08;
UART_0_CTRL->FLOW?=?0x00;

UART_0_CTRL->R1=?0;
UART_0_CTRL->T1?=?0;

clr_uart_buf();
}

void?_uart_0_write(uint8_t?*?buf?uint8_t?sz)
{
uint8_t?idx?=?0;

for(idx?=?0;?idx? {
UART_0_CTRL->SUB=?buf[idx];

while(UART_0_CTRL->T1?==?0);

UART_0_CTRL->T1??=?0;
}
}

void?dbg_printf(char?*format...)
{
uint8_t?iWriteNum?=?0;
va_list??ap;

if(!format)
return;

// *((uint8_t*)(0x50001000?+?0x24))?=?0x00;

va_start(apformat);

iWriteNum?=?vsprintf((char?*)s_formatBufferformatap);

va_end(ap);

if(iWriteNum?>?MAX_FORMAT_BUFFER_SIZE)
iWriteNum?=?MAX_FORMAT_BUFFER_SIZE;

// _uart_0_write(s_formatBuffer?iWriteNum);
uart_send(s_formatBuffer?iWriteNum);
// *((uint8_t*)(0x50001000?+?0x24))?=?0x01;
}

/*
UART0串口中斷函數
調用回調函數
*/
void?UART0_I

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-02-02?19:45??密碼加密\
?????目錄???????????0??2018-02-03?10:25??密碼加密\Vendor?Service\
?????文件?????????388??2016-08-04?21:31??密碼加密\Vendor?Service\ANCS_Service_GATT_DB_160624.txt
?????目錄???????????0??2018-02-02?19:40??密碼加密\Vendor?Service\ble\
?????文件???????12607??2016-08-15?19:20??密碼加密\Vendor?Service\ble\lib.h
?????文件??????288382??2016-10-12?12:10??密碼加密\Vendor?Service\ble\syd_ble_keil.lib
?????文件???????63334??2018-02-03?10:01??密碼加密\Vendor?Service\Ble_Vendor_Service.map
?????文件???????72018??2018-02-03?10:25??密碼加密\Vendor?Service\Ble_Vendor_Service.uvguix.Administrator
?????文件??????139455??2016-08-08?14:25??密碼加密\Vendor?Service\Ble_Vendor_Service.uvguix.ms_shia
?????文件???????70046??2016-08-16?14:49??密碼加密\Vendor?Service\Ble_Vendor_Service.uvguix.SYD-SZ-01
?????文件???????71955??2016-10-26?20:22??密碼加密\Vendor?Service\Ble_Vendor_Service.uvguix.SYD-SZ-04
?????文件???????70477??2016-06-02?13:04??密碼加密\Vendor?Service\Ble_Vendor_Service.uvguix.unrulife
?????文件???????71832??2017-03-29?23:35??密碼加密\Vendor?Service\Ble_Vendor_Service.uvguix_Administrator.bak
?????文件????????9954??2018-02-02?21:37??密碼加密\Vendor?Service\Ble_Vendor_Service.uvoptx
?????文件???????19196??2018-02-02?21:37??密碼加密\Vendor?Service\Ble_Vendor_Service.uvprojx
?????文件????????9104??2016-10-20?11:05??密碼加密\Vendor?Service\Ble_Vendor_Service_uvoptx.bak
?????文件???????18794??2016-10-14?19:33??密碼加密\Vendor?Service\Ble_Vendor_Service_uvprojx.bak
?????目錄???????????0??2018-02-02?19:42??密碼加密\Vendor?Service\Driver\
?????文件????????4756??2017-04-11?22:59??密碼加密\Vendor?Service\Driver\debug.c
?????文件????????5581??2017-04-07?17:19??密碼加密\Vendor?Service\Driver\oled_12864.c
?????文件????????1890??2016-08-05?14:43??密碼加密\Vendor?Service\Driver\ota.c
?????文件?????????409??2016-07-21?10:16??密碼加密\Vendor?Service\Driver\syd8801_delay.c
?????文件????????4523??2017-04-07?18:30??密碼加密\Vendor?Service\Driver\syd8801_gpio.c
?????文件????????3978??2017-04-07?18:31??密碼加密\Vendor?Service\Driver\syd8801_ioi2c.c
?????文件????????2399??2016-06-07?21:51??密碼加密\Vendor?Service\Driver\timer.c
?????文件????????1645??2016-08-05?10:43??密碼加密\Vendor?Service\Driver\uart.c
?????目錄???????????0??2018-02-02?19:42??密碼加密\Vendor?Service\Include\
?????文件???????20385??2016-07-21?10:15??密碼加密\Vendor?Service\Include\ARMCM0.h
?????文件??????????79??2016-05-17?15:15??密碼加密\Vendor?Service\Include\config.h
?????文件?????????439??2017-04-10?08:02??密碼加密\Vendor?Service\Include\debug.h
?????文件???????15433??2016-07-21?18:41??密碼加密\Vendor?Service\Include\font.h
............此處省略78個文件信息

評論

共有 條評論