Code: Select all
/*Configure GPIO pin : PB12 */
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, 1);
GPIO_InitStruct.Pin = GPIO_PIN_12;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_12, 1);
Code: Select all
/*Configure GPIO pin : PB12 */
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, 1);
GPIO_InitStruct.Pin = GPIO_PIN_0;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_OD;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, 1);
Code: Select all
dwInit(dwm, &dwOps); // Init libdw
dwOpsInit(dwm);
result = dwConfigure(dwm); // Configure the dw1000 chip
if (result == 0) {
printf("[OK]\r\n");
dwEnableAllLeds(dwm);
} else {
printf("[ERROR]: %s\r\n", dwStrError(result));
selftestPasses = false;
}