Fix compilation errors for teensy
This commit is contained in:
parent
8632bd52ce
commit
e84c809740
|
@ -382,7 +382,7 @@ FastCRC32::FastCRC32(){
|
|||
* @param datalen Length of Data
|
||||
* @return CRC value
|
||||
*/
|
||||
uint32_t FastCRC32::crc32(const uint8_t *data, const uint16_t datalen)
|
||||
uint32_t FastCRC32::crc32(const uint8_t *data, const uint16_t datalen, bool reflect)
|
||||
{
|
||||
// poly=0x04c11db7 init=0xffffffff refin=true refout=true xorout=0xffffffff check=0xcbf43926
|
||||
return generic(0x04C11DB7L, 0XFFFFFFFFL, CRC_FLAG_REFLECT | CRC_FLAG_XOR, data, datalen);
|
||||
|
@ -448,6 +448,6 @@ uint32_t FastCRC32::generic(const uint32_t polynom, const uint32_t seed, const u
|
|||
return update(data, datalen);
|
||||
}
|
||||
|
||||
uint32_t FastCRC32::crc32_upd(const uint8_t *data, uint16_t len){return update(data, len);}
|
||||
uint32_t FastCRC32::crc32_upd(const uint8_t *data, uint16_t len, bool reflect){return update(data, len);}
|
||||
uint32_t FastCRC32::cksum_upd(const uint8_t *data, uint16_t len){return update(data, len);}
|
||||
#endif // #if defined(KINETISK)
|
||||
|
|
|
@ -260,6 +260,7 @@
|
|||
|
||||
//Reads/Writes next data buffer. Should be called after _beginSPI()
|
||||
void SPIFlash::_nextBuf(uint8_t opcode, uint8_t *data_buffer, uint32_t size) {
|
||||
uint8_t *_dataAddr = &(*data_buffer);
|
||||
switch (opcode) {
|
||||
case READDATA:
|
||||
#if defined (ARDUINO_ARCH_SAM)
|
||||
|
@ -273,7 +274,6 @@
|
|||
#elif defined (ARDUINO_ARCH_AVR)
|
||||
SPI.transfer(&(*data_buffer), size);
|
||||
#else
|
||||
uint8_t *_dataAddr = &(*data_buffer);
|
||||
for (uint16_t i = 0; i < size; i++) {
|
||||
*_dataAddr = xfer(NULLBYTE);
|
||||
_dataAddr++;
|
||||
|
|
|
@ -165,6 +165,7 @@ uint32_t calculateCRC32(byte pageNo)
|
|||
break;
|
||||
|
||||
default:
|
||||
CRC32_val = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue