Funzione PWM_OpenPWM_Open Function
Intestazione: #include <applibs/pwm.h>Header: #include <applibs/pwm.h>
Apre un controller PWM e restituisce un descrittore di file da usare per le chiamate successive.Opens a PWM controller, and returns a file descriptor to use for subsequent calls.
int PWM_Open(PWM_ControllerId pwm);
ParametriParameters
pwm
Indice in base zero del controller PWM a cui accedere.pwm
The zero-based index of the PWM controller to access. Il valore massimo consentito dipende dalla piattaforma.The maximum value permitted depends on the platform.
ErrorsErrors
Restituisce-1 se viene rilevato un errore e imposta sul errno
valore di errore.Returns -1 if an error is encountered and sets errno
to the error value.
- EACCES: l'accesso all'interfaccia PWM non è consentito perché il parametro
pwm
non è presente nel campo Pwm del manifesto dell'applicazione.EACCES: access to the PWM interface is not permitted because thepwm
parameter is not listed in the Pwm field of the application manifest.
Valore restituitoReturn value
Restituisce il descrittore di file per il controller PWM se è stato aperto correttamente oppure-1 per errore, nel qual caso errno
viene impostato sul valore di errore.Returns the file descriptor for the PWM controller if it was opened successfully, or -1 for failure, in which case errno
is set to the error value.
Requisiti del manifesto dell'applicazioneApplication manifest requirements
Per accedere a un controller PWM, l'applicazione deve identificarlo nel campo Pwm del manifesto dell'applicazione.To access a PWM controller, your application must identify it in the Pwm field of the application manifest.