separate PCA9685 driver into a shared directory

This commit is contained in:
2026-11-10 19:44:34 +02:00
parent 16a709ac24
commit 05f892c59f
13 changed files with 113 additions and 76 deletions
+16
View File
@@ -0,0 +1,16 @@
#ifndef PCA_9685_H_
#define PCA_9685_H_
#include <stdint.h>
#include <stdbool.h>
/* PCA9685 I2C address */
/* 0x40 is the 7-bit address. HAL requires it shifted left by 1 (0x80) */
#define PCA9685_ADDR_1 (0x41 << 1)
#define PCA9685_ADDR_2 (0x42 << 1)
bool PCA9685_Init(uint8_t dev_addr);
void PCA9685_SetPWM(uint8_t dev_addr, uint8_t channel, uint16_t on, uint16_t off);
void PCA9685_SetPin(uint8_t dev_addr, uint8_t channel, uint8_t val);
#endif /* PCA_9685_H_ */