Solvline Eddy DK Manuel d'utilisateur Page 115

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 150
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 114
Eddy DK Programmer Guide
115
SETGPIOINIT
Function
Initializes ports that will be used as GPIO after boot.
Format
void ioctl(int fd, SETGPIOINIT, struct *gpio_struct);
Parameter
fd
Handle to GPIO device(/dev/eddy_gpio)
gpio_struct
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]; };
Returns
None
Notice
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 dont
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.
SETGPIOMOD_LM
Function
Sets Read/Write direction for all Port A, B, C
Format
void ioctl(int fd, SETGPIOMOD_LM, int *mode[3]);
Parameter
fd
Handle to GPIO device(/dev/eddy_gpio)
mode
Pointer to the buffer that stores mode value for
Port A, B, C.
Bit value 0 means input, 1 means output.
Returns
None
Notice
Any value is ok for bits that are not set to be used GPIO
Vue de la page 114
1 2 ... 110 111 112 113 114 115 116 117 118 119 120 ... 149 150

Commentaires sur ces manuels

Pas de commentaire