It's all right with me if people use my implementation of USB Power
Delivery in anything. This will make writing firmware for the PD Buddy
Dev a lot more reasonable, once it exists.
All the internal functions and definitions have been moved out of
lib/include/. Includes are made with the semantically correct brackets
("" or <>) throughout the firmware and library. That is to say, the
library is essentially done at this point, with only documentation
changes left to be made.
Now the user-visible FUSB302B functions all take a struct
pdb_fusb_config * as a parameter. The static functions don't use it
yet, but at least the public API of this code is in its finished state.
Apparently one of the threads was using too much stack space?? This
will require investigtion later, but for now increasing their stack
space fixed some weird problems I was having with this patch.
/!\ BROKEN BUILD /!\
This commit moves the library code to the library directory. This
causes the firmware to not compile. A few changes were made to reduce
the nubmer of errors, but some errors just aren't going to go away until
I go ahead with the planned changes.
There are still a few things that the standard says we Shall do and we
don't, but it Works For Me™. I haven't implemented anything with
regards to GiveBack support, but that doesn't matter just yet. Our
handling of VDMs isn't quite right either. Anyway, it successfully
negotiates with so-called Split PDO power supplies, which is more than I
can say about some commercial products.