C source for using Mailbox Interface? - Raspberry Pi Forums
i extract information raspberry pi serial number, board model, board revision, cpu clock rate, temperature in c program. looks have couple of options:
1. use vcgencmd obtain information. example, can temperature vcgencmd measure_temp. require system call.
2. read appropriate system file information. example, can temperature cat /sys/class/thermal/thermal_zone0/temp. require reading , parsing text file.
3. use mailbox interface. example, should able temperature using tag 0x00030006. can max temperatures through interface.
question: interface available user space c program? there example code or library use reference? i've found usage of mailbox interface in regards graphics, that's not goal here.
finally, please let me know if it's "more correct" use 1 of previous methods. background programming c real-time rtoses, linux adds layer that's new me. if reading files linux way, can although appears vcgencmd doing same things want in program.
thanks!
1. use vcgencmd obtain information. example, can temperature vcgencmd measure_temp. require system call.
2. read appropriate system file information. example, can temperature cat /sys/class/thermal/thermal_zone0/temp. require reading , parsing text file.
3. use mailbox interface. example, should able temperature using tag 0x00030006. can max temperatures through interface.
question: interface available user space c program? there example code or library use reference? i've found usage of mailbox interface in regards graphics, that's not goal here.
finally, please let me know if it's "more correct" use 1 of previous methods. background programming c real-time rtoses, linux adds layer that's new me. if reading files linux way, can although appears vcgencmd doing same things want in program.
thanks!
raspberrypi
Comments
Post a Comment