35 lines
945 B
C
35 lines
945 B
C
#ifndef _RP2040_PORT_H_
|
|
#define _RP2040_PORT_H_
|
|
|
|
#include "ad5940.h"
|
|
#include "pico/stdlib.h"
|
|
#include "hardware/spi.h"
|
|
#include "hardware/gpio.h"
|
|
|
|
// Hardware Definitions
|
|
#define PIN_MISO 0
|
|
#define PIN_CS 1
|
|
#define PIN_SCK 2
|
|
#define PIN_MOSI 3
|
|
#define PIN_RST 9
|
|
#define PIN_INT 29
|
|
|
|
// Function Prototypes
|
|
void setup_pins(void);
|
|
void AD5940_CsClr(void);
|
|
void AD5940_CsSet(void);
|
|
void AD5940_RstClr(void);
|
|
void AD5940_RstSet(void);
|
|
void AD5940_Delay10us(uint32_t time);
|
|
void AD5940_ReadWriteNBytes(unsigned char *pSendBuffer, unsigned char *pRecvBuff, unsigned long length);
|
|
uint32_t AD5940_GetMCUIntFlag(void);
|
|
uint32_t AD5940_ClrMCUIntFlag(void);
|
|
uint32_t AD5940_MCUResourceInit(void *pCfg);
|
|
|
|
// These are stubs in the original platform file, keeping them here as well
|
|
void AD5940_MCUGpioWrite(uint32_t data);
|
|
uint32_t AD5940_MCUGpioRead(uint32_t pin);
|
|
void AD5940_MCUGpioCtrl(uint32_t pin, BoolFlag enable);
|
|
|
|
#endif /* _RP2040_PORT_H_ */
|