ironsheep / p2-flash-fs Goto Github PK
View Code? Open in Web Editor NEWChip's Flash FS with a standard API for accessing the FLASH chip on the P2 Edge Module.
License: MIT License
Chip's Flash FS with a standard API for accessing the FLASH chip on the P2 Edge Module.
License: MIT License
The write function returns only a status, and no indication of how many bytes were written.
The write function should probably act like Unix (and Windows) and return the count of bytes actually written, rather than a status of 0 on success. This will allow us to detect things like flash full, and also be more consistent with how other OSes work.
I can work around this in the flexspin VFS layer, but it seems like it might surprise other users as well who are used to POSIX and Windows APIs.
No response
Tested in latest github sources
No or unsure. This never worked, or I haven't tried before.
P2 Board: P2 Eval Board
P2 Compiler: both flexspin and PNut v39
Read seems to return 1 byte more than the requested number of bytes. For example:
CON
_clkfreq = 250_000_000
OBJ
flash: "flash_fs"
DAT
buf BYTE 128
PUB demo() | r, handle
flash.mount()
handle := flash.open(@"rwblocks.bin", "r")
if handle >= 0
r := flash.read(handle, @buf[0], 32)
debug("requested 32 bytes, read returned ", sdec_(r))
flash.close(handle)
flash.unmount()
outputs:
Cog0 requested 32 bytes, read returned 33
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.