mirror of
https://github.com/pvvx/RTL00_WEB.git
synced 2025-07-31 20:31:05 +00:00
update
This commit is contained in:
parent
8529849a5a
commit
d1e4ee31f1
70 changed files with 523 additions and 2274 deletions
|
|
@ -518,7 +518,7 @@ int wifi_connect(
|
|||
struct {
|
||||
u8 bssid[ETH_ALEN + 2];
|
||||
void * p;
|
||||
} bs = { 0 };
|
||||
} bs;
|
||||
memcpy(bs.bssid, pWifi->bssid.octet, ETH_ALEN);
|
||||
for(int i = 0; i < ETH_ALEN; i++) {
|
||||
flg += bs.bssid[i];
|
||||
|
|
@ -529,6 +529,9 @@ int wifi_connect(
|
|||
}
|
||||
else {
|
||||
use_bssid = 1;
|
||||
bs.bssid[ETH_ALEN] = 0;
|
||||
bs.bssid[ETH_ALEN+1] = 0;
|
||||
bs.p = 0;
|
||||
wext_set_bssid(WLAN0_NAME, bs.bssid);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ int32_t spi_master_write_stream(spi_t *obj, char *tx_buffer, uint32_t length);
|
|||
int32_t spi_master_write_read_stream(spi_t *obj, char *tx_buffer,
|
||||
char *rx_buffer, uint32_t length);
|
||||
int32_t spi_slave_read_stream_timeout(spi_t *obj, char *rx_buffer, uint32_t length, uint32_t timeout_ms);
|
||||
|
||||
void spi_flush_rx_fifo (spi_t *obj);
|
||||
void spi_set_tmod(spi_t *obj, SSI_CTRLR0_TMOD tmod); // 0 Read & Write, 1 Write only, 2 Read Only
|
||||
#ifdef CONFIG_GDMA_EN
|
||||
int32_t spi_slave_read_stream_dma(spi_t *obj, char *rx_buffer, uint32_t length);
|
||||
int32_t spi_slave_write_stream_dma(spi_t *obj, char *tx_buffer, uint32_t length);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ s8 spdio_tx_done_cb(void *padapter, u8 *data, u16 offset, u16 pktsize, u8 type){
|
|||
|
||||
|
||||
s8 spdio_tx(struct spdio_t *obj, struct spdio_buf_t *pbuf){
|
||||
extern s8 HalSdioRxCallback(PHAL_SDIO_ADAPTER pSDIODev, VOID *pData, u16 Offset, u16 PktSize, u8 CmdType);
|
||||
//extern s8 HalSdioRxCallback(PHAL_SDIO_ADAPTER pSDIODev, VOID *pData, u16 Offset, u16 PktSize, u8 CmdType);
|
||||
return HalSdioRxCallback((u8 *)pbuf, 0, pbuf->buf_size, pbuf->type); // ?????????
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -554,6 +554,7 @@ int32_t spi_master_write_stream(spi_t *obj, char *tx_buffer, uint32_t length)
|
|||
pHalSsiOp = &obj->spi_op;
|
||||
|
||||
obj->state |= SPI_STATE_TX_BUSY;
|
||||
|
||||
/* as Master mode, sending data will receive data at sametime, so we need to
|
||||
drop those received dummy data */
|
||||
if ((ret=pHalSsiOp->HalSsiWriteInterrupt(pHalSsiAdaptor, (u8 *) tx_buffer, length)) != HAL_OK) {
|
||||
|
|
@ -562,6 +563,14 @@ int32_t spi_master_write_stream(spi_t *obj, char *tx_buffer, uint32_t length)
|
|||
return ret;
|
||||
}
|
||||
|
||||
VOID HalSsiTModRtl8195a(VOID *Adaptor, SSI_CTRLR0_TMOD tmod);
|
||||
// SSI_CTRLR0_TMOD tmod
|
||||
void spi_set_tmod(spi_t *obj, SSI_CTRLR0_TMOD tmod)
|
||||
{
|
||||
PHAL_SSI_ADAPTOR pHalSsiAdaptor = &obj->spi_adp;
|
||||
HalSsiTModRtl8195a(pHalSsiAdaptor, tmod);
|
||||
}
|
||||
|
||||
// Master mode write a sequence of data by interrupt mode
|
||||
// The length unit is byte, for both 16-bits and 8-bits mode
|
||||
int32_t spi_master_write_read_stream(spi_t *obj, char *tx_buffer,
|
||||
|
|
|
|||
|
|
@ -165,9 +165,9 @@ time_t sntp_gen_system_time(int timezone)
|
|||
|
||||
sntp_get_lasttime(&update_sec, &update_usec, &update_tick);
|
||||
|
||||
unsigned int current_tick = xTaskGetTickCount();
|
||||
|
||||
if(update_tick) {
|
||||
unsigned int current_tick = xTaskGetTickCount();
|
||||
long tick_diff_sec, tick_diff_ms;
|
||||
|
||||
tick_diff_sec = (current_tick - update_tick) / configTICK_RATE_HZ;
|
||||
|
|
@ -176,10 +176,9 @@ time_t sntp_gen_system_time(int timezone)
|
|||
update_usec += (tick_diff_ms * 1000);
|
||||
current_sec = update_sec + update_usec / 1000000 + timezone * 3600;
|
||||
}
|
||||
else {
|
||||
// else {
|
||||
// current_sec = current_tick / configTICK_RATE_HZ;
|
||||
current_sec = update_usec;
|
||||
}
|
||||
// }
|
||||
return current_sec;
|
||||
/*
|
||||
current_tm = *(localtime(¤t_sec));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue