modem stuff

This commit is contained in:
2021-02-18 17:32:15 +01:00
parent 1f124976e7
commit 84f58a343e
4 changed files with 13 additions and 2 deletions

View File

@ -68,6 +68,11 @@ void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) {
debugTxCpltCallback(huart);
}
#endif //LOGGER_OUTPUT_BY_INTERRUPT
#if NETWORK_STACK == 2
if (huart == &modemUart) {
modemTxCpltCallback(huart);
}
#endif
}
void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi) {

View File

@ -1,5 +1,6 @@
#include <networkAbstractionLayer_impl.h>
#include <logger.h>
#include <utils.h>
#include <stdint.h>
@ -15,5 +16,7 @@ int8_t networkUdpSend(char *hostname, uint16_t port, uint8_t *buf, uint16_t bufL
}
void networkImplInit() {
HAL_GPIO_WritePin(MODEM_RES_GPIO_Port, MODEM_RES_Pin, GPIO_PIN_RESET);
activeDelay(500);
HAL_GPIO_WritePin(MODEM_RES_GPIO_Port, MODEM_RES_Pin, GPIO_PIN_SET);
}