[refactor] prepare for link gen
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "spi_cs_if.h"
|
||||
|
||||
#define MCP41X_C1 5
|
||||
#define MCP41X_C0 4
|
||||
#define MCP41X_P1 1
|
||||
@@ -36,11 +38,10 @@ typedef struct
|
||||
uint8_t value;
|
||||
|
||||
SPI_HandleTypeDef *hspi;
|
||||
GPIO_TypeDef *cs_port;
|
||||
uint16_t cs_pin;
|
||||
cs_handle_t *hcs;
|
||||
} mcp41x_handle_t;
|
||||
|
||||
void mcp41x_init(mcp41x_handle_t *hpot, SPI_HandleTypeDef *hspi, GPIO_TypeDef *cs_port, uint16_t cs_pin, mcp41x_res_t res);
|
||||
void mcp41x_init(mcp41x_handle_t *hpot, SPI_HandleTypeDef *hspi, cs_handle_t *hcs, mcp41x_res_t res);
|
||||
void mcp41x_setValue(mcp41x_handle_t *hpot, uint8_t value);
|
||||
void mcp41x_setVolume(mcp41x_handle_t *hpot, uint8_t volume);
|
||||
uint8_t mcp41x_getVolume(mcp41x_handle_t *hpot);
|
||||
|
||||
Reference in New Issue
Block a user