Skip to contentSkip to conversation

xenomai i2c

Xenomai-help Wayne Call 2 participants 2 messages Jan 22, 2009

lore
Share & tools
lore

Wayne Call

author
#0 lore raw

Is there a way to use xenomai to do a simple read/ write to an i2c device? I simply want to read a temperature sensor value, via I2C, in the real time context. I currently use files such as i2c-bfin-twi.c and i2c-core.c and have built a sensor type driver, lm73.c. I can read temperature values from user space using the /sys/bus/i2c/devices/0-0048/temperature folder.

Wayne

#1 lore raw
Quoted 5 lines · Wayne Call

Is there a way to use xenomai to do a simple read/ write to an i2c device? I simply want to read a temperature sensor value, via I2C, in the real time context. I currently use files such as i2c-bfin-twi.c and i2c-core.c and have built a sensor type driver, lm73.c. I can read temperature values from user space using the /sys/bus/i2c/devices/0-0048/temperature folder.

The clean way is to implement a driver (or several drivers) using the RTDM skin. Then, you would access this driver using the real-time version of the usual open/read/write/ioctl/close interface.

Signature · 1 line
					    Gilles.