Hardware Abstraction Layer for FreeRTOS
mcp320x.h File Reference

Go to the source code of this file.

Macros

#define ADD_MCP320X(ID)
 
#define MCP320X_ID(ID)   HAL_GET_ID(hal, mcp320x, mcp320x_##ID)
 
#define MCP320X_ID_CHANNEL(ID, _channelID)   HAL_GET_ID(adc, mcp320x, mcp320x_##ID##_##_channelID)
 

Functions

void * mcp320x_controller_init (uint32_t index)
 
int32_t mcp320x_connect (void *ac, struct spi *spi, uint8_t cs, uint16_t gpio, uint32_t baudrate)
 

Macro Definition Documentation

◆ ADD_MCP320X

#define ADD_MCP320X (   ID)

◆ MCP320X_ID

#define MCP320X_ID (   ID)    HAL_GET_ID(hal, mcp320x, mcp320x_##ID)

◆ MCP320X_ID_CHANNEL

#define MCP320X_ID_CHANNEL (   ID,
  _channelID 
)    HAL_GET_ID(adc, mcp320x, mcp320x_##ID##_##_channelID)

Function Documentation

◆ mcp320x_connect()

int32_t mcp320x_connect ( void *  ac,
struct spi *  spi,
uint8_t  cs,
uint16_t  gpio,
uint32_t  baudrate 
)

◆ mcp320x_controller_init()

void* mcp320x_controller_init ( uint32_t  index)