diff options
Diffstat (limited to 'userspace/sysfs_write.c')
| -rw-r--r-- | userspace/sysfs_write.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 <stdio.h> +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); +} |
