Commit Graph

9 Commits

Author SHA1 Message Date
Kwabena W. Agyeman
fd349649ae Fix fballoc for complex allocations 2020-10-28 22:21:18 -07:00
Kwabena W. Agyeman
dbdf26d93c Frame buffer respects fb alloc now 2020-07-20 16:14:16 -07:00
Kwabena W. Agyeman
7ad61b725e Adds hint system to fb_alloc
With this commit fb_alloc now takes hints to better decide which ram to
give (internal or sdram).

Only fb_alloc_all calls are given any hints right now as some of the
calls need as much ram as possible and will cause failures to happen if
a small amount of fast internal sram is returned.

Anyway, hints can be used to tune where things are placed by fb_alloc.
2019-10-04 21:47:54 -07:00
Kwabena W. Agyeman
443ba3bff8 AprilTags Support
Works super good.
2017-02-09 17:37:18 -05:00
Kwabena W. Agyeman
02af722fe8 Fixed fb_alloc() with mark for recently re-worked code.
I also tested the firmware for about an hour to make sure there was no
stack leak.

Note that I prefer for fb_free() to still be called versus
fb_free_till_mark() doing that for you in the code.

For functions without this fix they will just free the entire fb_alloc
stack when an exception happens. For functions with this fix they will
only free up to and including the mark. Since there are no places in the
firmware where you could start building a second fb_alloc stack when one
is already in place this point is moot currently. But, if we do
something like that in the future the problem will have already been
solved.

Any new code or re-worked code should use the mark function.
2017-01-18 18:39:08 -05:00
Kwabena W. Agyeman
302deb0662 Add file read speed.
File reading is runing ultra fast now. We're getting that SD card speed
the STM32 promised now. The file buffer commands have been updated to
alloc as much available memory to read as much of a file in as possible
now to speed up things. This works really great.

Note however, while the file buffer is active you have to use the file
buffer versions of tell and size. Spent a few hours on tracking down an
error related to not using the buffered versions.
2016-03-08 23:38:13 -05:00
Kwabena W. Agyeman
98800c31c7 Add fb_alloc_all.
Now you can just grab all the free ram in the frame buffer in one go.
This fixes problems figuring out how many lines to alloc. Will update line
op code with this new info later.
2016-03-05 11:27:37 -05:00
iabdalkader
f3e85e1dbb Add fb_free_all.
* Free all blocks allocated on fb ram
2016-02-20 17:41:21 +02:00
iabdalkader
db667c061f Rename fb_stack to fb_alloc and call init0 in main 2016-02-17 05:24:17 +02:00