Am 06.09.2010 00:20, schrieb Jonathan Cameron:
Patch 3 puts in event support. It's complex, but then what the device has some complex abilities. Still if anyone can see any simplifications without breaking the interface I would definitely like to hear them!
@@ -36,3 +36,9 @@ #define IIO_EVENT_CODE_IN_HIGH_THRESH(a) (IIO_EVENT_CODE_ADC_BASE + a) #define IIO_EVENT_CODE_IN_LOW_THRESH(a) (IIO_EVENT_CODE_ADC_BASE + a + 32) +#define IIO_EVENT_CODE_IN_HIGH_ROC(a) (IIO_EVENT_CODE_ADC_BASE + a + 64) +#define IIO_EVENT_CODE_IN_LOW_ROC(a) (IIO_EVENT_CODE_ADC_BASE + a + 96) +#define IIO_EVENT_CODE_IN_SUPPLY_HIGH (IIO_EVENT_CODE_ADC_BASE + 97) +#define IIO_EVENT_CODE_IN_SUPPLY_LOW (IIO_EVENT_CODE_ADC_BASE + 98) +#define IIO_EVENT_CODE_IN_SUPPLY_ROC_HIGH (IIO_EVENT_CODE_ADC_BASE + 99) +#define IIO_EVENT_CODE_IN_SUPPLY_ROC_LOW (IIO_EVENT_CODE_ADC_BASE + 100)
What about putting some more structure in the event codes. Maybe <type_id> <channel> <event_id> each in it's own byte, where <type_id> is one of accel, gyro, ... <channel> is one of x, y, z <event_id> is one of high_thresh, low_thresh, ... maybe even a defined bit for high or low, one for thresh or roc, ...Then we don't need a big event table, but can figure out all parts independently.
Could we generate some of the event attributes in sysfs on the fly? Like have an attribute alarm0_input, where we can write in a list of channels and then only generate the limit attributes for these channels.
Regards, -- Dipl.-Inf. Manuel Stahl Fraunhofer-Institut für Integrierte Schaltungen IIS - Leistungsoptimierte Systeme - Nordostpark 93 Telefon +49 (0)911/58061-6419 90411 Nürnberg Fax +49 (0)911/58061-6398 http://www.iis.fraunhofer.de manuel.stahl@xxxxxxxxxxxxxxxxx
begin:vcard fn:Manuel Stahl n:Stahl;Manuel email;internet:manuel.stahl@xxxxxxxxxxxxxxxxx tel;work:+49 911 58061-6419 x-mozilla-html:FALSE version:2.1 end:vcard
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature