1
0
mirror of https://github.com/richardghirst/PiBits.git synced 2024-11-28 12:24:11 +01:00

Sketch out temporary data

This commit is contained in:
Robin Mallinson 2012-11-18 14:55:27 +00:00
parent d6e1b2efe5
commit 90dfe77fd5

View File

@ -316,6 +316,20 @@ void cleanup_module(void)
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:
// *returnedData string for dev_read
// *useCommand buffer for dev_write to allow incremental writing of data.