From 1e08b64b43bf9c50b644da3f76d5a8bcc73f62da Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 19 Sep 2018 01:52:14 +0200 Subject: addding sysfs and pipes etc --- userspace/sysfs_write.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 userspace/sysfs_write.c (limited to 'userspace/sysfs_write.c') diff --git a/userspace/sysfs_write.c b/userspace/sysfs_write.c new file mode 100644 index 0000000..b35f063 --- /dev/null +++ b/userspace/sysfs_write.c @@ -0,0 +1,9 @@ +#include +int main() +{ + FILE *f=fopen("/sys/mem","w"); + uint32_t data=0xaabbccdd; + fwrite(&data,4,1,f); +// fclose(f); // not automatically by newlib? + fflush(f); +} -- cgit v1.2.3