Commit ecba0439 authored by carbon's avatar carbon

buildroot/wiringX: support SPI and UART

parent 5d8774d1
...@@ -66,42 +66,52 @@ typedef struct wiringXSerial_t { ...@@ -66,42 +66,52 @@ typedef struct wiringXSerial_t {
unsigned int flowcontrol; unsigned int flowcontrol;
} wiringXSerial_t; } wiringXSerial_t;
void delayMicroseconds(unsigned int);
int pinMode(int, enum pinmode_t);
int wiringXSetup(char *name, void (*func)(int, char *, int, const char *, ...)); int wiringXSetup(char *name, void (*func)(int, char *, int, const char *, ...));
int wiringXGC(void); int wiringXGC(void);
void delayMicroseconds(unsigned int howLong);
int wiringXValidGPIO(int pin);
int pinMode(int pin, enum pinmode_t mode);
int digitalWrite(int pin, enum digital_value_t value);
int digitalRead(int pin);
int waitForInterrupt(int pin, int ms);
int wiringXISR(int pin, enum isr_mode_t mode);
// int analogRead(int channel); // int analogRead(int channel);
int digitalWrite(int, enum digital_value_t);
int digitalRead(int); int wiringXI2CRead(int fd);
int waitForInterrupt(int, int); int wiringXI2CReadReg8(int fd, int reg);
int wiringXISR(int, enum isr_mode_t); int wiringXI2CReadReg16(int fd, int reg);
int wiringXI2CWrite(int fd, int data);
int wiringXI2CRead(int); int wiringXI2CWriteReg8(int fd, int reg, int data);
int wiringXI2CReadReg8(int, int); int wiringXI2CWriteReg16(int fd, int reg, int data);
int wiringXI2CReadReg16(int, int); int wiringXI2CSetup(const char *path, int addr);
int wiringXI2CWrite(int, int);
int wiringXI2CWriteReg8(int, int, int);
int wiringXI2CWriteReg16(int, int, int);
int wiringXI2CSetup(const char *, int);
int wiringXSPIGetFd(int channel); int wiringXSPIGetFd(int channel);
int wiringXSPIDataRW(int channel, unsigned char *data, int len); int wiringXSPIDataRW(int channel, unsigned char *data, int len);
int wiringXSPISetup(int channel, int speed); int wiringXSPISetup(int channel, int speed);
int wiringXSerialOpen(const char *, struct wiringXSerial_t); int wiringXSerialOpen(const char *device, struct wiringXSerial_t serial);
void wiringXSerialFlush(int); void wiringXSerialFlush(int fd);
void wiringXSerialClose(int); void wiringXSerialClose(int fd);
void wiringXSerialPutChar(int, unsigned char); void wiringXSerialPutChar(int fd, unsigned char c);
void wiringXSerialPuts(int, const char *); void wiringXSerialPuts(int fd, const char *s);
void wiringXSerialPrintf(int, const char *, ...); void wiringXSerialPrintf(int fd, const char *message, ...);
int wiringXSerialDataAvail(int); int wiringXSerialDataAvail(int fd);
int wiringXSerialGetChar(int); int wiringXSerialGetChar(int fd);
int wiringXSetPWMPeriod(int pin, long period);
int wiringXSetPWMPolarity(int pin, int polarity);
int wiringXSetPWMDuty(int pin, int duty_cycle);
int wiringXPWMEnable(int pin, int enable);
char *wiringXPlatform(void); char *wiringXPlatform(void);
int wiringXValidGPIO(int); int wiringXSelectableFd(int gpio);
int wiringXSelectableFd(int); int wiringXSupportedPlatforms(char ***out);
int wiringXSupportedPlatforms(char ***);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -10,7 +10,6 @@ define WIRINGX_INSTALL_STAGING_CMDS ...@@ -10,7 +10,6 @@ define WIRINGX_INSTALL_STAGING_CMDS
endef endef
define WIRINGX_INSTALL_TARGET_CMDS define WIRINGX_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0644 $(@D)/src/wiringx.h $(TARGET_DIR)/usr/include/
$(INSTALL) -D -m 0644 $(@D)/src/libwiringx.so $(TARGET_DIR)/usr/lib/ $(INSTALL) -D -m 0644 $(@D)/src/libwiringx.so $(TARGET_DIR)/usr/lib/
endef endef
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment