src/daemon/peripheral_bus_board.c
src/daemon/peripheral_io_gdbus.c
src/daemon/privilege_checker.c
- src/interface/gpio.c
- src/interface/i2c.c
- src/interface/pwm.c
- src/interface/uart.c
- src/interface/spi.c)
+ src/interface/peripheral_interface_gpio.c
+ src/interface/peripheral_interface_i2c.c
+ src/interface/peripheral_interface_pwm.c
+ src/interface/peripheral_interface_uart.c
+ src/interface/peripheral_interface_spi.c)
INCLUDE(FindPkgConfig)
pkg_check_modules(pbus_pkgs REQUIRED ${dependents})
#include <peripheral_io.h>
-#include "gpio.h"
+#include "peripheral_interface_gpio.h"
#include "peripheral_bus.h"
#include "peripheral_bus_gdbus_gpio.h"
#include "peripheral_common.h"
#include <peripheral_io.h>
-#include "i2c.h"
+#include "peripheral_interface_i2c.h"
#include "peripheral_bus.h"
#include "peripheral_common.h"
#include "peripheral_bus_util.h"
#include <peripheral_io.h>
-#include "pwm.h"
+#include "peripheral_interface_pwm.h"
#include "peripheral_bus.h"
#include "peripheral_common.h"
#include "peripheral_bus_util.h"
#include <peripheral_io.h>
-#include "spi.h"
+#include "peripheral_interface_spi.h"
#include "peripheral_bus.h"
#include "peripheral_common.h"
#include "peripheral_bus_util.h"
#include <peripheral_io.h>
-#include "uart.h"
+#include "peripheral_interface_uart.h"
#include "peripheral_io_gdbus.h"
#include "peripheral_bus.h"
#include "peripheral_common.h"
* limitations under the License.
*/
-#ifndef __GPIO_H__
-#define __GPIO_H__
+#ifndef __PERIPHERAL_INTERFACE_GPIO_H__
+#define __PERIPHERAL_INTERFACE_GPIO_H__
#define SYSFS_GPIO_DIR "/sys/class/gpio"
#define GPIO_BUFFER_MAX 64
int gpio_open(int gpiopin);
int gpio_close(int gpiopin);
-#endif/*__GPIO_H__*/
+#endif /*__PERIPHERAL_INTERFACE_GPIO_H__*/
* limitations under the License.
*/
-#ifndef __I2C_H__
-#define __I2C_H__
+#ifndef __PERIPHERAL_INTERFACE_I2C_H__
+#define __PERIPHERAL_INTERFACE_I2C_H__
#include <stdint.h>
int i2c_close(int fd);
int i2c_set_address(int fd, int address);
-#endif/* __I2C_H__ */
+#endif /* __PERIPHERAL_INTERFACE_I2C_H__ */
* limitations under the License.
*/
-#ifndef __PWM_H__
-#define __PWM_H__
+#ifndef __PERIPHERAL_INTERFACE_PWM_H__
+#define __PERIPHERAL_INTERFACE_PWM_H__
/**
* @brief pwm_open() init pwm pin.
*/
int pwm_close(int chip, int pin);
-#endif /* __PWM_H__ */
+#endif /* __PERIPHERAL_INTERFACE_PWM_H__ */
* limitations under the License.
*/
-#ifndef __SPI_H__
-#define __SPI_H__
+#ifndef __PERIPHERAL_INTERFACE_SPI_H__
+#define __PERIPHERAL_INTERFACE_SPI_H__
int spi_open(int bus, int cs, int *fd);
int spi_close(int fd);
-#endif /* __SPI_H__ */
+#endif /* __PERIPHERAL_INTERFACE_SPI_H__ */
* limitations under the License.
*/
-#ifndef __UART_H__
-#define __UART_H__
+#ifndef __PERIPHERAL_INTERFACE_UART_H__
+#define __PERIPHERAL_INTERFACE_UART_H__
#include <stdint.h>
*/
int uart_flush(int file_hndl);
-#endif /* __UART_H__ */
+#endif /* __PERIPHERAL_INTERFACE_UART_H__ */
#include <fcntl.h>
#include <poll.h>
-#include "gpio.h"
+#include "peripheral_interface_gpio.h"
#include "peripheral_common.h"
#define MAX_ERR_LEN 255
#include <fcntl.h>
#include <sys/ioctl.h>
-#include "i2c.h"
+#include "peripheral_interface_i2c.h"
#include "peripheral_common.h"
#define MAX_ERR_LEN 255
#include <unistd.h>
#include <stdbool.h>
-#include "pwm.h"
+#include "peripheral_interface_pwm.h"
#include "peripheral_common.h"
#define SYSFS_PWM_PATH "/sys/class/pwm"
#include <sys/ioctl.h>
#include <linux/spi/spidev.h>
-#include "spi.h"
+#include "peripheral_interface_spi.h"
#include "peripheral_common.h"
#define SYSFS_SPI_DIR "/dev/spidev"
#include <stdbool.h>
#include <sys/ioctl.h>
-#include "uart.h"
+#include "peripheral_interface_uart.h"
#include "peripheral_common.h"
#define PATH_BUF_MAX 64