Skip to content
Snippets Groups Projects
Commit 45952cd3 authored by Georg von Zengen's avatar Georg von Zengen
Browse files

dw1000: added reset function to reset the dw1000

parent fca46007
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,22 @@ static void (*spiCallback)(int state, void *data, uint16_t len);
static void *spiCallbackData;
static SemaphoreHandle_t spiSema = NULL; //semaphore for SPI access
void dw1000Hal_reset(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
/*Configure GPIO pin : PD7 */
GPIO_InitStruct.Pin = GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_7, GPIO_PIN_RESET);
GPIO_InitStruct.Pin = GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
}
void dw1000Hal_chipSelect(void)
{
HAL_GPIO_WritePin(DW1000HAL_SS_GPIO, DW1000HAL_SS_PIN, GPIO_PIN_RESET);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment