change func names, differ from driver
This commit is contained in:
parent
21b22c322d
commit
d1138382fe
@ -16,29 +16,29 @@ wiz_NetInfo wizNetInfo = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void wizchip_cs_select(void) {
|
void wiz_cs_select(void) {
|
||||||
HAL_GPIO_WritePin(ETHER_CS_GPIO_Port, ETHER_CS_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(ETHER_CS_GPIO_Port, ETHER_CS_Pin, GPIO_PIN_RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wizchip_cs_deselect(void) {
|
void wiz_cs_deselect(void) {
|
||||||
HAL_GPIO_WritePin(ETHER_CS_GPIO_Port, ETHER_CS_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(ETHER_CS_GPIO_Port, ETHER_CS_Pin, GPIO_PIN_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t wizchip_spi_readbyte(void) {
|
uint8_t wiz_spi_readbyte(void) {
|
||||||
uint8_t rbuf;
|
uint8_t rbuf;
|
||||||
HAL_SPI_Receive(ðerSpi, &rbuf, 1, HAL_MAX_DELAY);
|
HAL_SPI_Receive(ðerSpi, &rbuf, 1, HAL_MAX_DELAY);
|
||||||
return rbuf;
|
return rbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wizchip_spi_writebyte(uint8_t wb) {
|
void wiz_spi_writebyte(uint8_t wb) {
|
||||||
HAL_SPI_Transmit(ðerSpi, &wb, 1, HAL_MAX_DELAY);
|
HAL_SPI_Transmit(ðerSpi, &wb, 1, HAL_MAX_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wizchip_spi_readburst(uint8_t* pBuf, uint16_t len) {
|
void wiz_spi_readburst(uint8_t* pBuf, uint16_t len) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wizchip_spi_writeburst(uint8_t* pBuf, uint16_t len) {
|
void wiz_spi_writeburst(uint8_t* pBuf, uint16_t len) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,8 +60,10 @@ int wizInit() {
|
|||||||
activeDelay(2);
|
activeDelay(2);
|
||||||
|
|
||||||
coloredMsg(LOG_RED, "wizI, registering callbacks");
|
coloredMsg(LOG_RED, "wizI, registering callbacks");
|
||||||
reg_wizchip_cs_cbfunc(wizchip_cs_select, wizchip_cs_deselect);
|
reg_wizchip_cs_cbfunc(wiz_cs_select, wiz_cs_deselect);
|
||||||
reg_wizchip_spi_cbfunc(wizchip_spi_readbyte, wizchip_spi_writebyte);
|
coloredMsg(LOG_GREEN, "wizI, cs funcs registed");
|
||||||
|
// reg_wizchip_spi_cbfunc(wiz_spi_readbyte, wiz_spi_writebyte);
|
||||||
|
// coloredMsg(LOG_GREEN, wizI, spi funcs registed");
|
||||||
// reg_wizchip_spiburst_cbfunc(void (*spi_rb)(uint8_t* pBuf, uint16_t len), void (*spi_wb)(uint8_t* pBuf, uint16_t len));
|
// reg_wizchip_spiburst_cbfunc(void (*spi_rb)(uint8_t* pBuf, uint16_t len), void (*spi_wb)(uint8_t* pBuf, uint16_t len));
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user