Eddy DK Programmer Guide
Initializes ports that will be used as GPIO after boot.
void ioctl(int fd, SETGPIOINIT, struct *gpio_struct);
Handle to GPIO device(‚/dev/eddy_gpio‛)
Pointer to the struct which stores GPIO table value in
/etc/eddy_gpio.cfg with GPIO configuration file
registered in Web configuration.
struct gpio_struct {
unsigned int value[3];
unsigned int mode[3];
unsigned int pullup[3];
unsigned int enable[3]; };
Eddy-CPU provides maximum GPIO ports of 56.
Eddy-S4M provides maximum GPIO ports of 34.
That is when using only WAN and when devices such as serial ports,
ADC, Rese, RDY LED… are used, number of available GPIO ports
decreases.
This command initializes available GPIO ports leaving the devices that
are registered in configuration in Pinetd.c after boot so users don’t
have use this command. When used, users need to be careful.
For instance, if a serial port is enabled through web configuration and
Eddy is rebooted, the port acts as a serial port, not a GPIO port. But
when this port is forced to be used as GPIO port with this command, the
application that uses this serial port will not operate properly.
Sets Read/Write direction for all Port A, B, C
void ioctl(int fd, SETGPIOMOD_LM, int *mode[3]);
Handle to GPIO device(‚/dev/eddy_gpio‛)
Pointer to the buffer that stores ‚mode‛ value for
Port A, B, C.
Bit value 0 means input, 1 means output.
Any value is ok for bits that are not set to be used GPIO
Commentaires sur ces manuels