buzzer is working

This commit is contained in:
Wolfgang Hottgenroth
2017-06-12 17:50:08 +02:00
parent 49a7f2592c
commit 7f54b22e6b
14 changed files with 271 additions and 29 deletions

View File

@ -82,7 +82,7 @@ void eepromWrite(uint16_t addr, uint8_t *buf, uint8_t len) {
eepromWren();
__EEPROM_CS(LOW);
HAL_SPI_Transmit(&hspi1, &msg, ((uint16_t)(len+3)), HAL_MAX_DELAY);
HAL_SPI_Transmit(&hspi1, &msg, ((uint16_t)(len+3+1)), HAL_MAX_DELAY);
__EEPROM_CS(HIGH);
}
@ -98,7 +98,7 @@ void eepromRead(uint16_t addr, uint8_t *buf, uint8_t len) {
rxMsg;
__EEPROM_CS(LOW);
HAL_SPI_TransmitReceive(&hspi1, &txMsg, &rxMsg, ((uint16_t)(len+3)), HAL_MAX_DELAY);
HAL_SPI_TransmitReceive(&hspi1, &txMsg, &rxMsg, ((uint16_t)(len+3+1)), HAL_MAX_DELAY);
__EEPROM_CS(HIGH);
memcpy(buf, rxMsg.data, len);