Created
February 15, 2018 01:37
-
-
Save madcowswe/e360649b1f8075c042b794ac550f600b to your computer and use it in GitHub Desktop.
DRV8323 SPI driver, released into public domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _DRV8323_H_ | |
#define _DRV8323_H_ | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
#include "stdbool.h" | |
#include "stdint.h" | |
#include "stm32f4xx_hal.h" | |
#define ADR_FAULT_STAT (0x00) | |
#define ADR_VGS_STAT (0x01) | |
#define ADR_DRV_CTRL (0x02) | |
#define ADR_GATE_DRV_HS (0x03) | |
#define ADR_GATE_DRV_LS (0x04) | |
#define ADR_OCP_CTRL (0x05) | |
#define ADR_CSA_CTRL (0x06) | |
uint16_t DRV8323_readSpi(uint8_t regAdr); | |
void DRV8323_writeSpi(uint8_t regAdr, uint16_t regVal); | |
void DRV8323_setupSpi(); | |
#ifdef __cplusplus | |
} | |
#endif | |
#endif //_DRV8323_H_ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment