59 Commits
Author SHA1 Message Date
nqtronix 196edda9d3 Fix typo 2022-07-02 21:16:43 +02:00
nqtronix 4534d00213 Updade Ateml Studio project file to new version (no other changes) 2022-07-02 21:15:40 +02:00
nqtronix 0fe27bda05 Update gitignore 2022-07-02 21:14:56 +02:00
nqtronix ab36012d71 Update readme, fix typos 2022-07-02 21:09:34 +02:00
nqtronix 5a49e58ade Merge branch 'write_multiple' 2021-08-26 10:20:12 +02:00
nqtronix dcc661029f Cosmetic changes
- macro parameters description
- removed unnecassary variable
- tabs instead of spaces
2021-08-26 10:16:35 +02:00
nqtronix bfd2e227a8 Add test case for '_write_multiple()' with overflow + rename 2021-08-26 10:03:40 +02:00
nqtronix 273fc3ef4c Fix issue #3 (replace 'unsigned long long' with 'uint64_t') 2021-08-23 15:25:56 +02:00
Benedikt-Alexander Mokroß 5cd061bf6f Fixed level increment
In the original Pull Request, when the buffer needed to wrap the write, the level was incremented by `tocopy` bytes again instead of only `btw` (bytes left to copy after wrap).
2021-08-23 11:01:24 +02:00
nqtronix 8bebcbc70e Fix usage of '_fff_init()' in demo code and the example in the readme 2021-08-22 16:10:48 +02:00
nqtronix c9e14a9950 Update year in license file 2021-08-22 15:55:10 +02:00
nqtronix 72acee07e1 Fix '_fff_read()', now correctly returns 0 if fifo empty with -O0 flag
All test pass with every optimisation settings
2021-08-22 15:54:45 +02:00
nqtronix 5b4566d3f6 Update cosmetic end of line characters in some files
Don't know why this is needed, but git detected the change so it has to be commited
2021-08-22 15:07:11 +02:00
Benedikt-Alexander Mokroß 6ad61300e0 Added macro _fff_write_multiple
The macro allows to write an array of elements to the fifo in a circular buffer manner.

Signed-off-by: Benedikt-Alexander Mokroß <github@bamkrs.de>
2021-04-19 10:16:42 +02:00
nqtronix be83201fc8 Release 0.8.0 v0.8.0 2019-01-20 17:22:54 +01:00
nqtronix 9e12d322e8 Fix '_fff_rebase()', passes all tests
- incices will be updated after rebase
- prevent underflow if _id.read == 0
- use macro to get mask
- tmp value is now correct type
2019-01-20 16:27:14 +01:00
nqtronix d914ddd370 Implement tests for '_fff_rebase()' 2019-01-20 16:25:22 +01:00
nqtronix 744a8fdf22 Update readme 2019-01-20 15:37:59 +01:00
nqtronix b9a98c56a6 Implement _fff_rebase(_id) to ease usage of strings in functions
See file for detailed macro explaination. No tests implemented yet.
2019-01-20 12:22:21 +01:00
nqtronix b79f8fe36a Update readme section 'limitations' to match version 0.7.x 2018-11-12 17:10:32 +01:00
nqtronix ad58d70907 Fix readme 2018-11-10 22:33:51 +01:00
nqtronix 6bf18e14d1 Update readme with section 'Configuration' 2018-11-10 22:15:37 +01:00
nqtronix 482d16dec0 Fix '_depth' and 'FIFOFAST_MAX_DEPTH_POINTABLE' sanity checks
Previously some invalid values (not a 2^n value) were accepted, in which cases it compiled without error, BUT creates major runtime bugs. To prevent this, all '_depth' inputs (including the config '#define FIFOFAST_MAX_DEPTH_POINTABLE') are rounded up to the next possible value.

The upper bound check implemended by '_FFF_GET_ARRAYDEPTH_P' was maually tested with a reasonable size of 255, 256 and 257 elements and it behaved as expected.
2018-11-10 21:57:16 +01:00
nqtronix e86e142d35 Fix readme (whitespace and formatting) 2018-11-10 08:52:45 +01:00
nqtronix 6446d3ac77 Update comments (build-in documentation) 2018-11-09 21:43:52 +01:00
nqtronix 58832824bb Release 0.7.0
improved usage of struct member 'level'
- 'level' contains now real value, even if fifo is full
- demo-code compiles with 25% less flash usage
- less if-statements required, performance therefore increased
v0.7.0
2018-11-09 21:27:57 +01:00
nqtronix 0b37fd3a6c Improve user config for max depth of pointable fifos
The correct types for the struct are now chosen automaticly based on a maximum fifo depth specified by the user.
2018-11-09 21:21:56 +01:00
nqtronix a8d06c0899 Improve usage of struct member level
Before .level == .mask could mean either full or almost full, depending on the members .write and .read. This design decision was supposed to reduce ram usage as much as possible, but was responsible for more if-statements in the code. Now .level can be .mask+1, but this requires a larger datatype for fifos with a depth 256 or larger, which is chosen automatically. Overall, the new code reduces the flash usage of the test code by 25%!
2018-11-09 20:47:13 +01:00
nqtronix 7aaa443fae Fix minimal code example in readme 2018-11-09 17:45:33 +01:00
nqtronix ae9078ac32 Release 0.6.0 v0.6.0 2018-11-09 17:18:30 +01:00
nqtronix bf6d5683f0 Update readme.md with section 'Pointable Fifos'
The given examples are taken from the file 'fifofast_test.c'. The entry on the 'Planned Featues' list has been removed.
2018-11-09 17:16:42 +01:00
nqtronix 66498fb9c2 Add test for inline functions
All implemented inline functions are now automatically tested and pass all tests. See 'fifofast.c' for usage examples.
2018-11-09 16:31:50 +01:00
nqtronix b9af9b88eb Add inline functions
Most macros are now also implemented as an inline function. These function accept a pointer toa pointable fifo as a parameter. The "read" and "add" functions are not implemented yet
2018-11-09 16:29:47 +01:00
nqtronix 1584e9880a Fix readme (added missing parameter) 2018-11-08 19:39:10 +01:00
nqtronix fb6c7c2a06 Release 0.5.0
Features automatic testing and an updated readme
v0.5.0
2018-11-08 19:22:00 +01:00
nqtronix 9016f396ca Move test code into seperate file 'fifofast_test.c/.h'
To do the testing in a separate file, the declarations have been moved into a seperate  header 'fifofast_demo.h'
2018-11-08 18:24:50 +01:00
nqtronix 194283d652 Fix '_fff_declare_a(...)' macro
To correctly create an array it is best to state the size at time of declaration. Unfortunatly the size must be specified in the .h AND .c file. We recommend using a #define'd value
2018-11-08 18:22:05 +01:00
nqtronix f89fc92d02 Add 'unittrace' and update the test code
Test fully passes
2018-11-07 21:15:24 +01:00
nqtronix 2c60fea35a Refactor internal macro names (_FFF_*) 2018-11-07 18:49:00 +01:00
nqtronix 0bd45bd1a6 [update] updated macro_type.h for a slighly cleaner solution 2018-11-07 18:44:34 +01:00
nqtronix 1327282bac [change] index type set by typedef instead of macro 2018-10-29 21:47:55 +01:00
nqtronix 1f7a82d0ed [fix] _fff_init_a() can now be used to globaly initialise a variable v0.4.1 2018-10-26 20:29:27 +02:00
nqtronix 8612c57557 [snapshot 0.4.0] Arrays of fifos now possible... [+2]
... Example code is included ath the end of fifofast_demo.c
[change] structure name generation has been unified. This requires no change in the user's code
[note] optimisation has been disabled, because else GCC optimizes fifos away, DESPITE volatile declaration (at least for testing in the simulator)
2018-10-24 18:18:08 +02:00
nqtronix 75b568ff94 [fix] 0.3.5 did not compile because of missing defined
I've no idea why I forgot to compile last version, but the issue is fixed now.
2018-10-24 07:15:13 +02:00
nqtronix 6708be55ae [new] aligned data example in fifofast_demo.c [+1]
[cleanup] in preparation to re-introduce the inline functions the three pointable fifo-types have been unified. You can gloabally select the desired max size with 'FIFOFAST_INDEX_TYPE'
2018-10-23 21:57:09 +02:00
nqtronix 9e92c11435 [fix] unused debug variables don't cause warnings anymore 2018-10-22 19:56:51 +02:00
nqtronix e7fb8a1de8 [cleanup] only include what is really needed 2018-10-22 18:19:50 +02:00
nqtronix 86116f0325 [fix] macro file structure correct in the .cproj file 2018-10-22 17:52:32 +02:00
nqtronix a3bd4c5a56 [update] optimised log2 macro by using a GCC build-in function...
... This also fixed a bug with the log2_16 and log2_32 macros (which was not further investigated, because both macros have been replaced now).
2018-10-14 17:07:26 +02:00
nqtronix 4d78697143 [update] changed underlying macro file structure 2018-10-14 16:14:31 +02:00