mirror of
https://github.com/richardghirst/PiBits.git
synced 2025-02-26 19:54:16 +01:00
Sketch out temporary data
This commit is contained in:
parent
d6e1b2efe5
commit
90dfe77fd5
@ -316,6 +316,20 @@ void cleanup_module(void)
|
|||||||
unregister_chrdev_region(devno, 1);
|
unregister_chrdev_region(devno, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This stores the /dev/servoblaster content for a given user process.
|
||||||
|
struct userReturnedData {
|
||||||
|
int idx=0;
|
||||||
|
char returnedData[NUM_SERVOS * 10];
|
||||||
|
};
|
||||||
|
|
||||||
|
// This stores one user command (single line) for a given user process.
|
||||||
|
// e.g. "3=180"
|
||||||
|
// Line length is expected to be <32
|
||||||
|
struct userCommandData {
|
||||||
|
int idx=0;
|
||||||
|
char commandData[32];
|
||||||
|
};
|
||||||
|
|
||||||
// kmalloc the temporary data required for each user:
|
// kmalloc the temporary data required for each user:
|
||||||
// *returnedData string for dev_read
|
// *returnedData string for dev_read
|
||||||
// *useCommand buffer for dev_write to allow incremental writing of data.
|
// *useCommand buffer for dev_write to allow incremental writing of data.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user