例程有一节是向flash写入小数
long double double_buffer[7] = {0};
void SPI_FLASH_BufferWrite(u8* pBuffer, u32 WriteAddr, u16 NumByteToWrite)
SPI_FLASH_BufferWrite((void*)double_buffer, SPI_FLASH_PageSize*1, sizeof(double_buffer));
(void*)double_buffer强制转换为void类型指针,但SPI_FLASH_BufferWrite的型参是u8*类型的,这不就相当于u8* pBuffe=((void*)double_buffer,这样可以么,
我之前以为(void*)强制转回去的也只能是double类型的
求大神解惑 |