Files
microchip-application-bmd38…/cpg10_io.h
T
Roy_01 7710f098ec feat: new two function:
dev_mode_set_cpg10_electrodes
dev_mode_gpio_function
2024-06-27 21:34:17 +08:00

72 lines
2.3 KiB
C

#ifndef __CPG10_IO_H__
#define __CPG10_IO_H__
#ifdef __cplusplus
extern "C"
{
#endif
#include "app_config.h"
#include "elite_board.h"
#include "nrf_gpio.h"
#include "nrf_spim.h"
#if (DEF_ELITE_MODEL == DEF_CURRENT_PULSE_GANERATOR_10)
#define UNDEF_GPIO 0xFFFFFFFF
#define ADPT0_S4_PIN NRF_GPIO_PIN_MAP(0, 22)
#define ADPT0_S3_PIN NRF_GPIO_PIN_MAP(0, 25)
#define ADPT0_S2_PIN NRF_GPIO_PIN_MAP(0, 19)
#define ADPT0_S1_PIN NRF_GPIO_PIN_MAP(0, 21)
#define ADPT_LE_PIN NRF_GPIO_PIN_MAP(0, 17)
#define ADPT_CLR_PIN NRF_GPIO_PIN_MAP(0, 20)
#define TW_SCKI_0_PIN NRF_GPIO_PIN_MAP(0, 14)
#define TW_SCKI_1_PIN NRF_GPIO_PIN_MAP(0, 13)
#define HV_EN_PIN NRF_GPIO_PIN_MAP(0, 11)
#define SPIM_CLK_PIN NRF_GPIO_PIN_MAP(0, 12)
#define SPIM_MOSI_PIN NRF_GPIO_PIN_MAP(0, 7)
#define SPIM_MISO_PIN NRF_GPIO_PIN_MAP(1, 9)
#define ADPT1_S1_PIN NRF_GPIO_PIN_MAP(0, 6)
#define CS_MEM_PIN NRF_GPIO_PIN_MAP(0, 27)
#define VA1H_PIN NRF_GPIO_PIN_MAP(0, 26)
#define VA1L_PIN NRF_GPIO_PIN_MAP(0, 4)
#define VA2H_PIN NRF_GPIO_PIN_MAP(0, 1)
#define VA2L_PIN NRF_GPIO_PIN_MAP(0, 29)
#define VA3H_PIN NRF_GPIO_PIN_MAP(0, 0)
#define VA3L_PIN NRF_GPIO_PIN_MAP(0, 31)
#define VA4H_PIN NRF_GPIO_PIN_MAP(1, 15)
#define VA4L_PIN NRF_GPIO_PIN_MAP(0, 2)
#define AIN0_PIN NRF_GPIO_PIN_MAP(0, 30)
#define AIN1_PIN NRF_GPIO_PIN_MAP(0, 28)
#define VB1H_PIN NRF_GPIO_PIN_MAP(1, 12)
#define VB1L_PIN NRF_GPIO_PIN_MAP(1, 14)
#define VB2H_PIN NRF_GPIO_PIN_MAP(0, 3)
#define VB2L_PIN NRF_GPIO_PIN_MAP(1, 13)
#define VB3H_PIN NRF_GPIO_PIN_MAP(1, 3)
#define VB3L_PIN NRF_GPIO_PIN_MAP(1, 10)
#define VB4H_PIN NRF_GPIO_PIN_MAP(1, 6)
#define VB4L_PIN NRF_GPIO_PIN_MAP(1, 11)
#define LED_R_PIN NRF_GPIO_PIN_MAP(0, 10)
#define LED_G_PIN NRF_GPIO_PIN_MAP(0, 9)
#define LED_B_PIN NRF_GPIO_PIN_MAP(1, 2)
#define ADPT1_S4_PIN NRF_GPIO_PIN_MAP(0, 24)
#define ADPT1_S3_PIN NRF_GPIO_PIN_MAP(0, 23)
#define ADPT1_S2_PIN NRF_GPIO_PIN_MAP(0, 16)
void spim_xfer(uint32_t cs_pin,
nrf_spim_mode_t spi_mode,
uint8_t *p_tx_buffer,
uint16_t tx_buffer_length,
uint8_t *p_rx_buf,
uint16_t rx_buffer_length);
void cpg10_io_init(void);
#endif /* ! DEF_ELITE_MODEL */
#ifdef __cplusplus
}
#endif
#endif /* ! __CPG10_IO_H__ */