mirror of
https://github.com/ebrandi/FDD-book.git
synced 2026-12-06 00:23:30 +00:00
Organize companion code and materials by book part: part-01/ Foundations part-02/ Kernel & driver fundamentals part-03/ Character & block devices part-04/ Networking & storage part-05/ Buses & advanced topics part-06/ Debugging & performance part-07/ Real-world drivers appendices/ Supplementary material README.md Overview and build instructions
26 lines
555 B
C
26 lines
555 B
C
/*
|
|
* evdemo.h - shared user/kernel definitions for the evdemo driver.
|
|
*
|
|
* The evdemo pseudo-device exposes a queue of synthetic events. This
|
|
* header defines the event record that userland reads from the
|
|
* /dev/evdemo device node.
|
|
*/
|
|
|
|
#ifndef _EVDEMO_H_
|
|
#define _EVDEMO_H_
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/time.h>
|
|
|
|
struct evdemo_event {
|
|
struct timespec ev_time;
|
|
uint32_t ev_type;
|
|
uint32_t ev_code;
|
|
int64_t ev_value;
|
|
};
|
|
|
|
#define EVDEMO_EV_TYPE_TICK 1
|
|
#define EVDEMO_EV_TYPE_TRIGGER 2
|
|
#define EVDEMO_EV_TYPE_BURST 3
|
|
|
|
#endif /* _EVDEMO_H_ */
|