From 2f719330b8afee5075b48d428c836e2c0a3bb14e Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sun, 4 Nov 2018 23:46:12 -0500 Subject: vfs, initrd --- src/user/user.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/user') diff --git a/src/user/user.c b/src/user/user.c index 620ffd0..eb2d662 100644 --- a/src/user/user.c +++ b/src/user/user.c @@ -1,6 +1,8 @@ -#include #include "priv_gpio.h" -#include + +#include +#include +#include void user_delay(uint32_t ms) { @@ -28,6 +30,11 @@ void user_main(void) { gpio(GPIO_MODE, 5, OUTPUT); + int test = vfs_open("A:/hello", VFS_FILE_READ); + char *buf = malloc(20); + int count = vfs_read(test, 20, (uint8_t *)buf); + (void)count; + if (fork() == 0) { while (1) { gpio(GPIO_OUT, 5, 1); -- cgit v1.2.3