fix: Use an XList for the domains in ST-LIB#535
Closed
victor-Lopez25 wants to merge 24 commits into
Closed
Conversation
Unfortunately the dummy is necessary but now we only need to specify a domain in a single place had to add ## to __VA_ARGS__ for it to remove the comma when there are no varargs this does not work in msvc unless -Zc:preprocessor is specified because their implementation of macros works differently
Contributor
Author
|
Dummy also needed an Entry structure but with that it worked :) |
Contributor
Author
|
main.cpp used: //#include "main.h"
#include "ST-LIB.hpp"
using ST_LIB::DigitalOutputDomain;
constexpr DigitalOutputDomain::DigitalOutput led1{ST_LIB::PB0};
constexpr DigitalOutputDomain::DigitalOutput led2{ST_LIB::PE1};
constexpr DigitalOutputDomain::DigitalOutput led3{ST_LIB::PB14};
int main(void) {
using myBoard = ST_LIB::Board<led1, led2, led3>;
myBoard::init();
auto &green_led = myBoard::instance_of<led1>();
auto &yellow_led = myBoard::instance_of<led2>();
auto &gred_led = myBoard::instance_of<led3>();
while (1) {
green_led.toggle();
yellow_led.toggle();
gred_led.toggle();
//wait_one_second();
for(uint32_t i = 0; i < 500000; i++)
__NOP();
}
}
void Error_Handler(void) {
ErrorHandler("HAL error handler triggered");
while (1) {
}
}
extern "C" {
void assert_failed(uint8_t *file, uint32_t line) {
while (1) {
}
}
} |
Contributor
|
At the end, this feature won't work, as the MPUManager needs more flexibility. Check #537 |
* Initial structure * no need to have an id for instance * erased no longer needed code * Added DigitalInput and DigitalOutput Services, and added support for Alternate functions * Replaced throw by undefined function * Implemented alternate functions * Added linker script and startup code, and fixed using hal template conf * Added initial GPIO mock * added pragma once on pines file * Remove mock infrastructure (still wip)
Contributor
Author
|
I don't see where the MPUManager needs more flexibility but if it does, it can still work with the XList, just don't include it in the XList: #define DomainXList \
X(GPIODomain, gpio) \
X(DigitalOutputDomain, dout, GPIODomain::Init<gpioN>::instances) \
X(DigitalInputDomain, din, GPIODomain::Init<gpioN>::instances)
// Do not use this class
struct Dummy {
static const std::size_t max_instances{1};
struct Entry { uint32_t dummy; };
};
#define X(x, y, ...) x,
using DomainsCtx = BuildCtx<DomainXList Dummy, MPUManager>;
// etc. |
Contributor
Author
|
Okay, I saw where it does need more flexibility, but my point still stands. Both can coexist. |
…ro-pin configurations (#546)
* fixed getting wrong instance * marked indexs as mutable * Fixed instance_of method. Now add interface needs the Device
* Add initial implementation of scheduler * Try to fix -Wuninitialized warning * Try to remove Wuninitialized warning temporarily * Remove unnecessary clear of task element * fix: Readability and todo for validation * fix: allocate_slot * Add explenation of sorted_task_ids_, static_assert for the bitmaps * Remove long_wait_remaining_us_ * fix: better get_at * fix: better front_id Compiler would've probably optimized it but it's better to make it explicit * fix: endianness in pop_front * Added unlikely to release_slot conditional * fix: Correct comment explenation * No bit field insert, it annoyed me * No more diagnostic ignore * fix: loss in accuracy by not adding 1: #534 (comment) * fix: Moved active_task_count_ modification * Actually set used_bitmap_ in allocate_slot * only include sources when cross-compiling * modify CMakeLists inside Tests * feat: use ugly ifdef guards for host testing purposes * add sample tests for Scheduler * add emulated ticking * test for execution count * fix: CI * fix: expected result in test case + explanation * add compiler specific and CoreMacros * copy files from LL and CMSIS for TIM Registers * bridge between LL MMIO Timer and user defined TIMER * reduce the number of ugly macros * compile the new mock file * update test * enable debugging of tests with TestMate C++ extension * feat: add DSB and ISB intructions in x86_64 * feat: add NVIC * add NVIC logic * feat: use NVIC and remove print * fix: move extern"C" block to allow using <iostream> * add Register class to allow for side effects * feat: use newly created Register class for side effects, neat trick in CNT write * feat: be as realistic as possible in test, by using CNT++ * feat: remove unnecessary include * feat: add an __RBIT impl for x86_64 * fix: compilation * fix: used_bitmap_ -> free_bitmap_ * Added tests check in CI/CD * fix(ci/cd): output folder * Added ARM specific instructions to be able to compile in ARM hosts (Mac) * Fix: compiler barrier for msvc, hopefully works * Fix: Try to fix -Wchanges-meaning warning * Fix typo * Update Inc/MockedDrivers/common.hpp #534 (comment) Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com> * Actually do the change github didn't do :/ * Fix typo p2 * Fix another typo * Fix unsigned long - 64bit when testing using LL functions * Minor fixes to scheduler Rebased from remotes/origin/MockTim * Fix: uint32_t* cast of a word instead of the ptr * Fix: remove active_task_count_ decrement in pop_front() #534 (comment) * Try fix Wstrict-aliasing in front_id * Try fix Wstrict-aliasing again * Fix typo in allocate_slot * fix: test UsedBitmap -> FreeBitmap * used_bitmap_ -> free_bitmap_ in test part 2 * fixed tests discovery * fix: set_timeout() test * Add a test, fix the error (kind of) * Fix: underflow in schedule_next_interval * Fix: call schedule_next_interval() in start() * Fix: invert condition, that was stupid * feat: add test showcasing possible usage within StateMachine logic * fix: Calculate correct prescaler & add to HALAL.hpp * Try to fix tests * try to fix tests part 2 * Try to fix tests part 3 * part 4 - add the wrapper.c to cmake, will this work? * part 5 - fix cmake stm32h723xx_wrapper.c path * fix: try to fix tests part 6 * fix: volatile warnings * fix: active_PSC is now set when PSC is set * fix: remove outdated comment * fix: tests part 7, should work now * fix: remove unecessary if, return if cancelled in cancel_timeout * Pop all due tasks, several might be due in the same tick * Revert force-push * fix: off by one error + configure_timer_for_interval should use uint32_t * fix: off by one error in schedule_next_interval() * All 15 tasks in MultipleTasks test, and it works * Add SameTaskMultipleTimes test, does all 16 tasks too * larger NUM_TICKS just in case * fix bug mentioned in previous cancel_timeout() * fix: id uint32_t -> uint16_t + bug fix * fix: remove TimerPeripheral::start and Time::start from HALAL::start * try to fix ci/cd * try to fix ci/cd part 2 * try to fix ci/cd part 3 * clean up ci/cd fix * Remove unnecessary warning ignore * fix: use wrapper instead of interface for stm32h7xx_ll_tim.h * fix ci/cd and add the other submodule to be automatically added * fix: actually add stm32h7xx_ll_tim_wrapper.h * try to fix ci/cd warning * try fix warnings again * fix: add ignore Woverflow to stm32h7xx_ll_tim * fix: remove need to ignore Woverflow warnings * fix: Remove tim_register_definitions.hpp We're already including them in stm32h723xx_wrapper * Fix overflow calculation and a test * Add link to wiki * fix: revert .vscode settings change * revert .vscode settings change part 2 * finish reverting change --------- Co-authored-by: Gonzalo Sánchez <gonzalosmoya24@gmail.com> Co-authored-by: Jorge Sáez <jorgeesg82@gmail.com> Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com> Co-authored-by: StefanCostea <stefanxenadu@gmail.com>
… return size_t (#543) * fix(GPIO): Alternative Function numbers were inverted * fix(GPIO): Revert previous fix, now invert AF mapping only on assignment * feat(ST-LIB): Make inscribe() return size_t and use it from higher Domains
* feat: add DSB and ISB intructions in x86_64 * feat: add NVIC * add NVIC logic * feat: use NVIC and remove print * fix: move extern"C" block to allow using <iostream> * add Register class to allow for side effects * feat: use newly created Register class for side effects, neat trick in CNT write * feat: be as realistic as possible in test, by using CNT++ * feat: remove unnecessary include * feat: add an __RBIT impl for x86_64 * fix: compilation * fix: used_bitmap_ -> free_bitmap_ * Added tests check in CI/CD * fix(ci/cd): output folder * Added ARM specific instructions to be able to compile in ARM hosts (Mac) * Fix: compiler barrier for msvc, hopefully works * Fix: Try to fix -Wchanges-meaning warning * Fix typo * Update Inc/MockedDrivers/common.hpp #534 (comment) Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com> * Actually do the change github didn't do :/ * Fix typo p2 * Fix another typo * Fix unsigned long - 64bit when testing using LL functions * Minor fixes to scheduler Rebased from remotes/origin/MockTim * Fix: uint32_t* cast of a word instead of the ptr * Fix: remove active_task_count_ decrement in pop_front() #534 (comment) * Try fix Wstrict-aliasing in front_id * Try fix Wstrict-aliasing again * Fix typo in allocate_slot * fix: test UsedBitmap -> FreeBitmap * used_bitmap_ -> free_bitmap_ in test part 2 * fixed tests discovery * fix: set_timeout() test * Add a test, fix the error (kind of) * Fix: underflow in schedule_next_interval * Fix: call schedule_next_interval() in start() * Fix: invert condition, that was stupid * feat: add test showcasing possible usage within StateMachine logic * fix: Calculate correct prescaler & add to HALAL.hpp * Try to fix tests * try to fix tests part 2 * Try to fix tests part 3 * part 4 - add the wrapper.c to cmake, will this work? * part 5 - fix cmake stm32h723xx_wrapper.c path * fix: try to fix tests part 6 * fix: volatile warnings * fix: active_PSC is now set when PSC is set * fix: remove outdated comment * fix: tests part 7, should work now * fix: remove unecessary if, return if cancelled in cancel_timeout * Pop all due tasks, several might be due in the same tick * Revert force-push * fix: off by one error + configure_timer_for_interval should use uint32_t * fix: off by one error in schedule_next_interval() * All 15 tasks in MultipleTasks test, and it works * Add SameTaskMultipleTimes test, does all 16 tasks too * larger NUM_TICKS just in case * fix bug mentioned in previous cancel_timeout() * fix: id uint32_t -> uint16_t + bug fix * fix: remove TimerPeripheral::start and Time::start from HALAL::start * try to fix ci/cd * try to fix ci/cd part 2 * try to fix ci/cd part 3 * clean up ci/cd fix * Remove unnecessary warning ignore * fix: use wrapper instead of interface for stm32h7xx_ll_tim.h * fix ci/cd and add the other submodule to be automatically added * fix: actually add stm32h7xx_ll_tim_wrapper.h * try to fix ci/cd warning * try fix warnings again * fix: add ignore Woverflow to stm32h7xx_ll_tim * fix: remove need to ignore Woverflow warnings * fix: Remove tim_register_definitions.hpp We're already including them in stm32h723xx_wrapper * Initial TimerDomain commit, lots of work to do... * Change name to TimerDomain.hpp in comment * feat: Implement getting AnyGeneralPurpose timer with priorities * Make prettier * Remove leftovers * Remove outdated comment * fix: Finish the comment :) * Clean up error messages, add comment * temp: setup to try to compile template_project * Try to get TimerDomain to compile * Add initial implementation of scheduler * Try to fix -Wuninitialized warning * Try to remove Wuninitialized warning temporarily * Remove unnecessary clear of task element * fix: Readability and todo for validation * fix: allocate_slot * Add explenation of sorted_task_ids_, static_assert for the bitmaps * Remove long_wait_remaining_us_ * fix: better get_at * fix: better front_id Compiler would've probably optimized it but it's better to make it explicit * fix: endianness in pop_front * Added unlikely to release_slot conditional * fix: Correct comment explenation * No bit field insert, it annoyed me * No more diagnostic ignore * fix: loss in accuracy by not adding 1: #534 (comment) * fix: Moved active_task_count_ modification * Actually set used_bitmap_ in allocate_slot * fix: used_bitmap_ -> free_bitmap_ * only include sources when cross-compiling * modify CMakeLists inside Tests * feat: use ugly ifdef guards for host testing purposes * add sample tests for Scheduler * add emulated ticking * test for execution count * fix: CI * fix: expected result in test case + explanation * add compiler specific and CoreMacros * copy files from LL and CMSIS for TIM Registers * bridge between LL MMIO Timer and user defined TIMER * reduce the number of ugly macros * compile the new mock file * update test * enable debugging of tests with TestMate C++ extension * feat: add DSB and ISB intructions in x86_64 * feat: add NVIC * add NVIC logic * feat: use NVIC and remove print * fix: move extern"C" block to allow using <iostream> * add Register class to allow for side effects * feat: use newly created Register class for side effects, neat trick in CNT write * feat: be as realistic as possible in test, by using CNT++ * feat: remove unnecessary include * feat: add an __RBIT impl for x86_64 * fix: compilation * Added tests check in CI/CD * fix(ci/cd): output folder * Added ARM specific instructions to be able to compile in ARM hosts (Mac) * Fix: compiler barrier for msvc, hopefully works * Fix: Try to fix -Wchanges-meaning warning * Fix typo * Update Inc/MockedDrivers/common.hpp #534 (comment) Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com> * Actually do the change github didn't do :/ * Fix typo p2 * Fix another typo * Fix unsigned long - 64bit when testing using LL functions * Fix: uint32_t* cast of a word instead of the ptr * Minor fixes to scheduler Rebased from remotes/origin/MockTim * Fix: remove active_task_count_ decrement in pop_front() #534 (comment) * Try fix Wstrict-aliasing in front_id * Try fix Wstrict-aliasing again * Fix typo in allocate_slot * fix: test UsedBitmap -> FreeBitmap * used_bitmap_ -> free_bitmap_ in test part 2 * fixed tests discovery * fix: set_timeout() test * Add a test, fix the error (kind of) * Fix: underflow in schedule_next_interval * Fix: call schedule_next_interval() in start() * Fix: invert condition, that was stupid * feat: add test showcasing possible usage within StateMachine logic * fix: Calculate correct prescaler & add to HALAL.hpp * Try to fix tests * try to fix tests part 2 * Try to fix tests part 3 * part 4 - add the wrapper.c to cmake, will this work? * part 5 - fix cmake stm32h723xx_wrapper.c path * fix: try to fix tests part 6 * fix: volatile warnings * fix: active_PSC is now set when PSC is set * fix: remove outdated comment * fix: tests part 7, should work now * fix: remove unecessary if, return if cancelled in cancel_timeout * Pop all due tasks, several might be due in the same tick * Revert force-push * fix: off by one error + configure_timer_for_interval should use uint32_t * fix: off by one error in schedule_next_interval() * All 15 tasks in MultipleTasks test, and it works * Add SameTaskMultipleTimes test, does all 16 tasks too * larger NUM_TICKS just in case * fix bug mentioned in previous cancel_timeout() * fix: id uint32_t -> uint16_t + bug fix * fix: remove TimerPeripheral::start and Time::start from HALAL::start * try to fix ci/cd * try to fix ci/cd part 2 * try to fix ci/cd part 3 * clean up ci/cd fix * Remove unnecessary warning ignore * fix: use wrapper instead of interface for stm32h7xx_ll_tim.h * fix ci/cd and add the other submodule to be automatically added * fix: actually add stm32h7xx_ll_tim_wrapper.h * try to fix ci/cd warning * try fix warnings again * fix: add ignore Woverflow to stm32h7xx_ll_tim * fix: remove need to ignore Woverflow warnings * fix: Remove tim_register_definitions.hpp We're already including them in stm32h723xx_wrapper * Initial TimerDomain commit, lots of work to do... * Change name to TimerDomain.hpp in comment * feat: Implement getting AnyGeneralPurpose timer with priorities * Make prettier * Remove leftovers * Remove outdated comment * fix: Finish the comment :) * Clean up error messages, add comment * temp: setup to try to compile template_project * Try to get TimerDomain to compile * Fix all compilation errors (yipee) * Try to fix compile errors when in template_project * Try to fix compile errors... Goodbye ErrorInRequestN I thought it could be used T-T * try fix again * slowly but surely * Fix TimerWrapper constructor * Add timer interrupt callbacks, use XList for TIM_HandleTypeDef definitions * try to choose 16 bit or 32 bit at compile time * Fix compilation issues * Fix overflow calculation and a test * Fix all remaining issues * Change TimerRequest values * Remove temporary function * fix: Remove static assert * fix: Change order of parameters * fix: timer 15 (hopefully?) * fix: Rollback removal of tim15 when getting AnyGeneralPurpose timer * fix: pins are now part of TimerWrapper, not TimerDomain * fix: Split TimerWrapper into a different file: TimerWrapper.hpp * fix: Use new way to add Domain to board * feat: Initial implementation of new PWM class * fix: Make PWM class more private * feat: Use an initializer_list to get the pins without needing a size * fix: Remove prescaler and period from TimerDomain * feat: Add Any32bitTimer to TimerDomain * fix: Rename Any32bitTimer to Any32bit * Fix docker build hopefully * feat: add a macro: get_timer_instance * fix: compile error * fix: revert change to .vscode settings * fix: tim3 is 16 bit, tim5 is 32 bit + start of pin af checking * More timer pin afs * More pins, todo: tim23 and tim24 * tim23, tim24 pins done, now programming time * next step: compile time check_pins * feat: Finish implementing check_pins * Add tests for TimerWrapper, not running them yet * Almost implement all wrappers for TimerDomain tests * Add TimerDomain.cpp to simulator * Further fix compile errors * Fix tests compilation! * NVIC ICER now clears the bit in NVIC ISER --------- Co-authored-by: Gonzalo Sánchez <gonzalosmoya24@gmail.com> Co-authored-by: Jorge Sáez <jorgeesg82@gmail.com> Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com> Co-authored-by: StefanCostea <stefanxenadu@gmail.com>
* Full of errors, but moving forward * Avanzando bien fino, casi implementado * Vamos bien encaminados * Bruh * Casi compila, casi * StateMachine compila, otras cosas no xd * Some error fixing * Se lleva el credito su prima en tanga * Compila por ahora?? * Compiles without state orders * Fixed StateOrder problems and some fixes on the state machine code * Now everything (nearly) is consteval * New concepts added to ensure StateEnum is a enum * Much more checks with concepts, implemented scheduler logic * Testing needed, but might work * Functional version? * State Machine now works!! * Moved static_vector to a seperate file
* Initial structure * no need to have an id for instance * erased no longer needed code * Added DigitalInput and DigitalOutput Services, and added support for Alternate functions * Replaced throw by undefined function * Implemented alternate functions * Added linker script and startup code, and fixed using hal template conf * Added initial GPIO mock * feat(MPU): Initial structure && design of the API * fix(MPU): Bug fixing (MPU subregion calculation, throws and alignment checks) * fix(MPU): Minor bug fixes (missing std::, incorrect subregion mask) * feat(MPU): Initial implementation of MPUManager refactor * feat(MPU)!: Bug fixing and changes on the infrastructure to allow proper MPU configuration * reafactor(MPU): Support legacy MPUManager without conflicts * fix(MPU): Remove MPUManager start call from HALAL init * feat(MPU): Modify linker scripts for MPU configuration * fix(MPU): Remove legacy things * fix(MPU): Fix legacy MPUManager * fix(MPU): Fix no buffer array of size zero issue * fix(MPU): Fix ST-LIB so that it accepts templated objects for MPU buffers * feat(MPU): Add concepts and safer interface * feat(MPU): Make construct method return a reference instead of pointer * fix(MPU): Relax constraints on MPU buffers to allow trivially destructible types * style(MPU): Better wording and documentation * feat(MPU): Make MPU ultra restrictive, should check that there's no region outside defined ones * fixed getting wrong instance * marked indexs as mutable * fix(MPU): Implemente st-lib fix * Fixed instance_of method. Now add interface needs the Device * fix(MPU): Apply the fix of the fix * fix(MPU): Make the MPUManager take it's buffer pointer from a linker symbol, to ensure initialization order doesn't matter * style(MPU): Remove comment * feat(MPU): Some missing things * fix: Delete hal_gpio_interface.h from this branch * refactor(MPU): Refactor the refactor of the MPU, now use linker script as source of truth * feat(MPU): Use more coherent MPU settings for better performance * fix(MPU): Make Stack and Heap use DTCM RAM * fix(MPU): Move ETH buffers to D1_NC ram, also add the buffer definition to the RAM linker script * fix(MPU): Use DTCM for static memory * feat(MPU): Add ram_code section for functions to be executed from ITCM RAM * fix(MPU): Fix comment with invalid syntax * fix(MPU): ADD ram_dx definitions to linker scripts * fix(MPU): Fix linker incompatibility thing * fix(MPU): Differentiate user, legacy, and buffer sections for MPU RAM allocations * fix(MPU): Reorder sections in linker script to ensure buffers are placed at the start * fix(MPU): Apply same change as before to the other linker * fix(MPU): Delete Ethernet::mpu_start functions for safety * feat(MPU): Add helpers * style(MPU): Use log2 and max instead of cascading logic in linker scripts * feat(MPU): Minor improvements * fix(MPU): Use std::ranges::find instead of contains to pass checks * feat(MPU): Change default memory domain to D1 for buffer allocations * feat(MPU): Use absolute values rather than addresses and casts for Linker Symbols, also clean up LD scripts * feat(MPU): Add constructor using entry to allow for named parameters * fix(MPU): Fix the compile error given by compile_error --------- Co-authored-by: Jorge Sáez <jorgeesg82@gmail.com>
* fix(MPU): Fix using undefined behaviour config * style(MPU): Add clarifying comments
* feat(MdmaPacket): Implement API and base structure, lacks integration with MDMA * feat(MdmaPacket): Drop support for containers and add mdma instance as parameter * feat(MdmaPacket): Now can specify Mdma instance * feat(MdmaPacket): MDMA manages buffers, can now change mdma instance * Fist draft of the MDMA * Some fixes, there are some problems with linking i think * Second draft of the mdma, now creates linked list (I think?) * Fixed some stuff :) * More changes, i think the api is finally done (hope so) * More changes, this fucking sucks * feat(Promises): Add Arena memory pool implementation * fix(Primises): Remove move semantics from Arena class, since they can be problematic with resource management. * feat(Promises): Implement Promises with fixed-size arenas * chore(Promises): Add Promises to HALAL. * fix(Promises): Fix circular dependency and incorrect RingBuffer usage * fix(Promises): Fix possible race condition in destroy method Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(Promises): Fix all and any methods to check correctly for existing callbacks * style(Promises): Double free detection in Arena is now in another if * fix(Promises): Use atomic operations for isResolved flag * fix(Promises): Add critical sections and maximum updates per cycle * MDMA v1.0 baby * Merged the promises, testing on course * fix(Promises): Revert mistake change in sntp_opts.h in commit b4df6ca * Fixes * style(Promises): Make maximums overwrittable in Promises.hpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(Promises): Ensure no memroy leaks in Promise::all and Promise::any * fix(Promises): Disable interrupts when adding to ready list * fix(Promises): Remove Promise::update() from HALAL::start() * feat(Promises): Add Stack class utility, doesn't use heap * feat(Promises): Use Stack for Arena (better locality), and add iterators to Arena * feat(Promises): Update Promises handling to avoid synchronization issues, now iterates over promises to check their state * fix(Promises): Defer release of chained promises in update method * fix(Promises): Defer chained promise cleanup to update * Packets now work, merge_packets now on progress * Promises to be tested, the rest works just fine :p * Now checking if the mdma_id exists * Copy paste typo, oops Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Now using array for the instances instead of unordered_maps * feat(Promises): Improve Stack * style(Promises): rename Arena to Pool and apply some style fixes * fix(Promises): Fix Pool pointer checing * feat(Promises): Fix Stack naming collision * feat(Promises): Use bitset in Pool. Not using bitmap to allow larger pools (either way, using a stack for allocation ensures some locality, so bit manipulation is not as useful here). * chore(Promises): Add Stack and Pool to CppUtils * fix(Promises): Change naming in Promises to acutally use Pool, instead of Arena * fix(Promises): Bug fixes and changes in the releasing to ensure proper memory management * fix(Promises): Avoid unnecessary copies of elements in Stack * fix(Promises): Fix pointer arithmetic in Pool * doc(Promises): Add some better comments in Promise * feat(Promises): Add null checks in Promise chaining and combinators * fix(Promises): Fix signed and unsigned comparison in Pool * feat(Promises): Add optimized bitmap iteration for Pool class when S <= 32 * feat(Promises): Add Promise::update() call in ST-LIB main update loop * fix(Promises): Include Promises header in HALAL.hpp whith SIM_ON * feat(Promises): Add wait() method for easier busy-waiting, to use only when needed * refactor(MdmaPacket): Make MdmaPacket inherit directly from Packet and use promises * chore(MdmaPacket): Add MdmaPacket to HALAL * feat(MDMA)!: Make MDMA use a pool of linked list nodes managed externally instead of managing them itself * fix(MDMA): Fix bugs with instance * fix(MDMA): Too many linked list nodes, not enough memory * feat(MdmaPacket): Make MdmaPacket compatible with MDMA linked list transfers, still lacks decoupling from instance logic * fix(MDMA): Fixes * Working on making the mdma work * Still not working the mdma packets * Esto es peor que el sida de testear * Work to be done, the auxilary buffer recieves data but crashes when it sends it to the destination buffer * Oops forgot to comment a thing :p * Now working yipeee * mdma V2.0 * Some errors fixed * Cosas * Changed Promise to bool pointer, and now working properly * Deleted promises and mdma packets from this branch * Now it compiles oops :p * Some suggested changed changes donde, ty clanker * Update Src/HALAL/Models/MDMA/MDMA.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Forgot to add the false condition to the data transfer * Damn * Coño con los conflictos * Fix condition to check if instance.done is not null, now it generates an errorhandler * MDMA packet bug fixed, now if you change the destination the bus will be selected correctly * Change MDMA node alignment and transfer settings * Remove NODES_MAX definition from MDMA.hpp Removed the NODES_MAX definition and related comments. * Now it compiles jeje * Fixed pr * AL final stack lo necesito * Al final stack lo necesito * Que lio de commits, pero solucionado * Eliminated useless hashmaps and added type adaptative nodes * Made transfer nodes D1_NC --------- Co-authored-by: Boris Mladenov Beslimov <borisbeslimov@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…f that the case, party starts
* Update Inc/MockedDrivers/common.hpp #534 (comment) Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com> * Actually do the change github didn't do :/ * Fix typo p2 * Fix another typo * Fix unsigned long - 64bit when testing using LL functions * Minor fixes to scheduler Rebased from remotes/origin/MockTim * Fix: uint32_t* cast of a word instead of the ptr * Fix: remove active_task_count_ decrement in pop_front() #534 (comment) * Try fix Wstrict-aliasing in front_id * Try fix Wstrict-aliasing again * Fix typo in allocate_slot * fix: test UsedBitmap -> FreeBitmap * used_bitmap_ -> free_bitmap_ in test part 2 * fixed tests discovery * fix: set_timeout() test * Add a test, fix the error (kind of) * Fix: underflow in schedule_next_interval * Fix: call schedule_next_interval() in start() * Fix: invert condition, that was stupid * feat: add test showcasing possible usage within StateMachine logic * fix: Calculate correct prescaler & add to HALAL.hpp * Try to fix tests * try to fix tests part 2 * Try to fix tests part 3 * part 4 - add the wrapper.c to cmake, will this work? * part 5 - fix cmake stm32h723xx_wrapper.c path * fix: try to fix tests part 6 * fix: volatile warnings * fix: active_PSC is now set when PSC is set * fix: remove outdated comment * fix: tests part 7, should work now * fix: remove unecessary if, return if cancelled in cancel_timeout * Pop all due tasks, several might be due in the same tick * Revert force-push * fix: off by one error + configure_timer_for_interval should use uint32_t * fix: off by one error in schedule_next_interval() * All 15 tasks in MultipleTasks test, and it works * Add SameTaskMultipleTimes test, does all 16 tasks too * larger NUM_TICKS just in case * fix bug mentioned in previous cancel_timeout() * fix: id uint32_t -> uint16_t + bug fix * fix: remove TimerPeripheral::start and Time::start from HALAL::start * try to fix ci/cd * try to fix ci/cd part 2 * try to fix ci/cd part 3 * clean up ci/cd fix * Remove unnecessary warning ignore * fix: use wrapper instead of interface for stm32h7xx_ll_tim.h * fix ci/cd and add the other submodule to be automatically added * fix: actually add stm32h7xx_ll_tim_wrapper.h * try to fix ci/cd warning * try fix warnings again * fix: add ignore Woverflow to stm32h7xx_ll_tim * fix: remove need to ignore Woverflow warnings * fix: Remove tim_register_definitions.hpp We're already including them in stm32h723xx_wrapper * Initial TimerDomain commit, lots of work to do... * Change name to TimerDomain.hpp in comment * feat: Implement getting AnyGeneralPurpose timer with priorities * Make prettier * Remove leftovers * Remove outdated comment * fix: Finish the comment :) * Clean up error messages, add comment * temp: setup to try to compile template_project * Try to get TimerDomain to compile * Add initial implementation of scheduler * Try to fix -Wuninitialized warning * Try to remove Wuninitialized warning temporarily * Remove unnecessary clear of task element * fix: Readability and todo for validation * fix: allocate_slot * Add explenation of sorted_task_ids_, static_assert for the bitmaps * Remove long_wait_remaining_us_ * fix: better get_at * fix: better front_id Compiler would've probably optimized it but it's better to make it explicit * fix: endianness in pop_front * Added unlikely to release_slot conditional * fix: Correct comment explenation * No bit field insert, it annoyed me * No more diagnostic ignore * fix: loss in accuracy by not adding 1: #534 (comment) * fix: Moved active_task_count_ modification * Actually set used_bitmap_ in allocate_slot * fix: used_bitmap_ -> free_bitmap_ * only include sources when cross-compiling * modify CMakeLists inside Tests * feat: use ugly ifdef guards for host testing purposes * add sample tests for Scheduler * add emulated ticking * test for execution count * fix: CI * fix: expected result in test case + explanation * add compiler specific and CoreMacros * copy files from LL and CMSIS for TIM Registers * bridge between LL MMIO Timer and user defined TIMER * reduce the number of ugly macros * compile the new mock file * update test * enable debugging of tests with TestMate C++ extension * feat: add DSB and ISB intructions in x86_64 * feat: add NVIC * add NVIC logic * feat: use NVIC and remove print * fix: move extern"C" block to allow using <iostream> * add Register class to allow for side effects * feat: use newly created Register class for side effects, neat trick in CNT write * feat: be as realistic as possible in test, by using CNT++ * feat: remove unnecessary include * feat: add an __RBIT impl for x86_64 * fix: compilation * Added tests check in CI/CD * fix(ci/cd): output folder * Added ARM specific instructions to be able to compile in ARM hosts (Mac) * Fix: compiler barrier for msvc, hopefully works * Fix: Try to fix -Wchanges-meaning warning * Fix typo * Update Inc/MockedDrivers/common.hpp #534 (comment) Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com> * Actually do the change github didn't do :/ * Fix typo p2 * Fix another typo * Fix unsigned long - 64bit when testing using LL functions * Fix: uint32_t* cast of a word instead of the ptr * Minor fixes to scheduler Rebased from remotes/origin/MockTim * Fix: remove active_task_count_ decrement in pop_front() #534 (comment) * Try fix Wstrict-aliasing in front_id * Try fix Wstrict-aliasing again * Fix typo in allocate_slot * fix: test UsedBitmap -> FreeBitmap * used_bitmap_ -> free_bitmap_ in test part 2 * fixed tests discovery * fix: set_timeout() test * Add a test, fix the error (kind of) * Fix: underflow in schedule_next_interval * Fix: call schedule_next_interval() in start() * Fix: invert condition, that was stupid * feat: add test showcasing possible usage within StateMachine logic * fix: Calculate correct prescaler & add to HALAL.hpp * Try to fix tests * try to fix tests part 2 * Try to fix tests part 3 * part 4 - add the wrapper.c to cmake, will this work? * part 5 - fix cmake stm32h723xx_wrapper.c path * fix: try to fix tests part 6 * fix: volatile warnings * fix: active_PSC is now set when PSC is set * fix: remove outdated comment * fix: tests part 7, should work now * fix: remove unecessary if, return if cancelled in cancel_timeout * Pop all due tasks, several might be due in the same tick * Revert force-push * fix: off by one error + configure_timer_for_interval should use uint32_t * fix: off by one error in schedule_next_interval() * All 15 tasks in MultipleTasks test, and it works * Add SameTaskMultipleTimes test, does all 16 tasks too * larger NUM_TICKS just in case * fix bug mentioned in previous cancel_timeout() * fix: id uint32_t -> uint16_t + bug fix * fix: remove TimerPeripheral::start and Time::start from HALAL::start * try to fix ci/cd * try to fix ci/cd part 2 * try to fix ci/cd part 3 * clean up ci/cd fix * Remove unnecessary warning ignore * fix: use wrapper instead of interface for stm32h7xx_ll_tim.h * fix ci/cd and add the other submodule to be automatically added * fix: actually add stm32h7xx_ll_tim_wrapper.h * try to fix ci/cd warning * try fix warnings again * fix: add ignore Woverflow to stm32h7xx_ll_tim * fix: remove need to ignore Woverflow warnings * fix: Remove tim_register_definitions.hpp We're already including them in stm32h723xx_wrapper * Initial TimerDomain commit, lots of work to do... * Change name to TimerDomain.hpp in comment * feat: Implement getting AnyGeneralPurpose timer with priorities * Make prettier * Remove leftovers * Remove outdated comment * fix: Finish the comment :) * Clean up error messages, add comment * temp: setup to try to compile template_project * Try to get TimerDomain to compile * Fix all compilation errors (yipee) * Try to fix compile errors when in template_project * Try to fix compile errors... Goodbye ErrorInRequestN I thought it could be used T-T * try fix again * slowly but surely * Fix TimerWrapper constructor * Add timer interrupt callbacks, use XList for TIM_HandleTypeDef definitions * try to choose 16 bit or 32 bit at compile time * Fix compilation issues * Fix overflow calculation and a test * Fix all remaining issues * Change TimerRequest values * Remove temporary function * fix: Remove static assert * fix: Change order of parameters * fix: timer 15 (hopefully?) * fix: Rollback removal of tim15 when getting AnyGeneralPurpose timer * fix: pins are now part of TimerWrapper, not TimerDomain * fix: Split TimerWrapper into a different file: TimerWrapper.hpp * fix: Use new way to add Domain to board * feat: Initial implementation of new PWM class * fix: Make PWM class more private * feat: Use an initializer_list to get the pins without needing a size * fix: Remove prescaler and period from TimerDomain * feat: Add Any32bitTimer to TimerDomain * fix: Rename Any32bitTimer to Any32bit * Fix docker build hopefully * feat: add a macro: get_timer_instance * fix: compile error * fix: revert change to .vscode settings * fix: tim3 is 16 bit, tim5 is 32 bit + start of pin af checking * More timer pin afs * More pins, todo: tim23 and tim24 * tim23, tim24 pins done, now programming time * next step: compile time check_pins * feat: Finish implementing check_pins * Add tests for TimerWrapper, not running them yet * Almost implement all wrappers for TimerDomain tests * Add TimerDomain.cpp to simulator * Further fix compile errors * Fix tests compilation! * NVIC ICER now clears the bit in NVIC ISER * fix: TimerDomain pins * hotfix! pwm compilation * Huge cleanup of TimerDomain, TimerWrapper + NewPWM now starts up the timer channel should work now? Also removed Wpedantic because I hate it * Keep TimerPeripheral behaviour - default psc = 5 * fix test * get_CCR_offset -> set_capture_compare * fix gpio operation mode * Fix frequency, it was a typo T-T * fix frequency completely, off by one errors and all * cleanup get_pwm() * fix get_pwm * remove these todos * add set_frequency, remove CLOCK_FREQ_MHZ_WITHOUT_PRESCALER * set_frequency [uint64_t -> float], remove psc default 5 * Added newlines to GetPinFromIdx to make it more readable * PWM gpio speed is now low * Add compile time check for one pin per channel per timer * remove outdated comment --------- Co-authored-by: Jorge Sáez <125664643+jorgesg82@users.noreply.github.com> Co-authored-by: StefanCostea <stefanxenadu@gmail.com> Co-authored-by: Jorge Sáez <jorgeesg82@gmail.com> Co-authored-by: Gonzalo Sánchez <gonzalosmoya24@gmail.com>
* Initial structure * no need to have an id for instance * erased no longer needed code * Added DigitalInput and DigitalOutput Services, and added support for Alternate functions * Replaced throw by undefined function * Implemented alternate functions * Added linker script and startup code, and fixed using hal template conf * Added initial GPIO mock * feat(MPU): Initial structure && design of the API * fix(MPU): Bug fixing (MPU subregion calculation, throws and alignment checks) * fix(MPU): Minor bug fixes (missing std::, incorrect subregion mask) * feat(MPU): Initial implementation of MPUManager refactor * feat(MPU)!: Bug fixing and changes on the infrastructure to allow proper MPU configuration * reafactor(MPU): Support legacy MPUManager without conflicts * fix(MPU): Remove MPUManager start call from HALAL init * feat(MPU): Modify linker scripts for MPU configuration * fix(MPU): Remove legacy things * fix(MPU): Fix legacy MPUManager * fix(MPU): Fix no buffer array of size zero issue * fix(MPU): Fix ST-LIB so that it accepts templated objects for MPU buffers * feat(MPU): Add concepts and safer interface * feat(MPU): Make construct method return a reference instead of pointer * fix(MPU): Relax constraints on MPU buffers to allow trivially destructible types * style(MPU): Better wording and documentation * feat(MPU): Make MPU ultra restrictive, should check that there's no region outside defined ones * feat(Sd): Initial implementation of the infrastructure for Sd * fix(Sd): Fix syntax errors * feat(Sd): Add Sd to ST-LIB * feat(Sd): Receive CD and WP pin active states * feat(Sd): Full implementation of the class * fix(Sd): Sd buffers use D1 memory * fix(Sd): Configure card speed * feat(Sd): Add debug mode * fix(Sd): Configure cd and wp pins in init * fix(Sd): Ensure * fix(Sd): Mismatched pointer and handle * fix(Sd): General small fixes * fix(Sd): General bugfixing * fix(Sd): Minor fixes * fix(Sd): Change throw to compile_error for better compile-time checks * fix(Sd): Private accesibility things * fix(Sd): Fix inline issue and add dependencies to CMakeLists.txt * fix(Sd): Fix GPIO configuration for SD card * fix(Sd): General bug fixing * fix(Sd): Move things to cpp and circular dependency fix * fix(Sd): General bugfixing, now works * fix(Sd): The Sd is too finicky, it needs it's freaking time * fixed getting wrong instance * marked indexs as mutable * fix(MPU): Implemente st-lib fix * fix(Sd): Implemenent st-lib fix * fix(Sd): Validate pin selection for SDMMC1 * style(Sd): Move things to .cpp and small style fixes * feat(Sd): Don't use a timeout but just return false if sd not ready * fix(Sd): Check that not too many blocks are being requested for write/read * fix(Sd): Typo * fix(Sd): Check limit of blocks * fix(Sd): Unnecesary operation * Fixed instance_of method. Now add interface needs the Device * fix(MPU): Apply the fix of the fix * fix(Sd): Use correct callbacks * fix(Sd): Fix the fix of the st-lib * fix(MPU): Make the MPUManager take it's buffer pointer from a linker symbol, to ensure initialization order doesn't matter * fix(Sd): Fix pin validation logic Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(Sd): Fix incorrect error message Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * style(Sd): Better wording Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * style(MPU): Remove comment * feat(Sd): Minor update * fix(Sd): Fix DomainsCtx and reorder MPUDomain things in ST-LIB.hpp * fix(Sd): Fix small things * fix(Sd): Remove duplicated global variables in Sd.cpp * fix(MPU): Reorder includes * fix(Sd): Correct SDMMC clock divider calculation and enable hardware flow control just in case * fix(Sd): Use inscribe for MPU buffers * fix(Sd): Delete artifact file * fix(Sd): Remove artifact of merge * style(SD): Small things --------- Co-authored-by: Jorge Sáez <jorgeesg82@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat(MdmaPacket): Implement API and base structure, lacks integration with MDMA * feat(MdmaPacket): Drop support for containers and add mdma instance as parameter * feat(MdmaPacket): Now can specify Mdma instance * feat(MdmaPacket): MDMA manages buffers, can now change mdma instance * Fist draft of the MDMA * Some fixes, there are some problems with linking i think * Second draft of the mdma, now creates linked list (I think?) * Fixed some stuff :) * More changes, i think the api is finally done (hope so) * More changes, this fucking sucks * feat(Promises): Add Arena memory pool implementation * fix(Primises): Remove move semantics from Arena class, since they can be problematic with resource management. * feat(Promises): Implement Promises with fixed-size arenas * chore(Promises): Add Promises to HALAL. * fix(Promises): Fix circular dependency and incorrect RingBuffer usage * fix(Promises): Fix possible race condition in destroy method Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(Promises): Fix all and any methods to check correctly for existing callbacks * style(Promises): Double free detection in Arena is now in another if * fix(Promises): Use atomic operations for isResolved flag * fix(Promises): Add critical sections and maximum updates per cycle * MDMA v1.0 baby * Merged the promises, testing on course * fix(Promises): Revert mistake change in sntp_opts.h in commit b4df6ca * Fixes * style(Promises): Make maximums overwrittable in Promises.hpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix(Promises): Ensure no memroy leaks in Promise::all and Promise::any * fix(Promises): Disable interrupts when adding to ready list * fix(Promises): Remove Promise::update() from HALAL::start() * feat(Promises): Add Stack class utility, doesn't use heap * feat(Promises): Use Stack for Arena (better locality), and add iterators to Arena * feat(Promises): Update Promises handling to avoid synchronization issues, now iterates over promises to check their state * fix(Promises): Defer release of chained promises in update method * fix(Promises): Defer chained promise cleanup to update * Packets now work, merge_packets now on progress * Promises to be tested, the rest works just fine :p * Now checking if the mdma_id exists * Copy paste typo, oops Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Now using array for the instances instead of unordered_maps * feat(Promises): Improve Stack * style(Promises): rename Arena to Pool and apply some style fixes * fix(Promises): Fix Pool pointer checing * feat(Promises): Fix Stack naming collision * feat(Promises): Use bitset in Pool. Not using bitmap to allow larger pools (either way, using a stack for allocation ensures some locality, so bit manipulation is not as useful here). * chore(Promises): Add Stack and Pool to CppUtils * fix(Promises): Change naming in Promises to acutally use Pool, instead of Arena * fix(Promises): Bug fixes and changes in the releasing to ensure proper memory management * fix(Promises): Avoid unnecessary copies of elements in Stack * fix(Promises): Fix pointer arithmetic in Pool * doc(Promises): Add some better comments in Promise * feat(Promises): Add null checks in Promise chaining and combinators * fix(Promises): Fix signed and unsigned comparison in Pool * feat(Promises): Add optimized bitmap iteration for Pool class when S <= 32 * feat(Promises): Add Promise::update() call in ST-LIB main update loop * fix(Promises): Include Promises header in HALAL.hpp whith SIM_ON * feat(Promises): Add wait() method for easier busy-waiting, to use only when needed * refactor(MdmaPacket): Make MdmaPacket inherit directly from Packet and use promises * chore(MdmaPacket): Add MdmaPacket to HALAL * Initial structure * no need to have an id for instance * feat(MDMA)!: Make MDMA use a pool of linked list nodes managed externally instead of managing them itself * fix(MDMA): Fix bugs with instance * fix(MDMA): Too many linked list nodes, not enough memory * erased no longer needed code * Added DigitalInput and DigitalOutput Services, and added support for Alternate functions * feat(MdmaPacket): Make MdmaPacket compatible with MDMA linked list transfers, still lacks decoupling from instance logic * fix(MDMA): Fixes * Replaced throw by undefined function * Implemented alternate functions * Added linker script and startup code, and fixed using hal template conf * Working on making the mdma work * Still not working the mdma packets * Esto es peor que el sida de testear * Work to be done, the auxilary buffer recieves data but crashes when it sends it to the destination buffer * Oops forgot to comment a thing :p * Now working yipeee * Added initial GPIO mock * mdma V2.0 * Some errors fixed * Cosas * feat(MPU): Initial structure && design of the API * fix(MPU): Bug fixing (MPU subregion calculation, throws and alignment checks) * fix(MPU): Minor bug fixes (missing std::, incorrect subregion mask) * feat(MPU): Initial implementation of MPUManager refactor * feat(MPU)!: Bug fixing and changes on the infrastructure to allow proper MPU configuration * reafactor(MPU): Support legacy MPUManager without conflicts * fix(MPU): Remove MPUManager start call from HALAL init * feat(MPU): Modify linker scripts for MPU configuration * fix(MPU): Remove legacy things * fix(MPU): Fix legacy MPUManager * fix(MPU): Fix no buffer array of size zero issue * fix(MPU): Fix ST-LIB so that it accepts templated objects for MPU buffers * feat(MPU): Add concepts and safer interface * feat(MPU): Make construct method return a reference instead of pointer * fix(MPU): Relax constraints on MPU buffers to allow trivially destructible types * style(MPU): Better wording and documentation * feat(MPU): Make MPU ultra restrictive, should check that there's no region outside defined ones * Changed Promise to bool pointer, and now working properly * Deleted promises and mdma packets from this branch * Now it compiles oops :p * Some suggested changed changes donde, ty clanker * Update Src/HALAL/Models/MDMA/MDMA.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Forgot to add the false condition to the data transfer * Damn * Coño con los conflictos * Fix condition to check if instance.done is not null, now it generates an errorhandler * feat(MdmaPacket): Implement MdmaPacket * fix(MdmaPacket): Small fixes * MDMA packet bug fixed, now if you change the destination the bus will be selected correctly * fix(MdmaPacket): Small fixes * fix(MDMA): Small fixes to MDMA * Change MDMA node alignment and transfer settings * fixed getting wrong instance * marked indexs as mutable * fix(MPU): Implemente st-lib fix * fix(MPU): Fix merge * feat(MdmaPacket): Add a MdmaPacketBase * Remove NODES_MAX definition from MDMA.hpp Removed the NODES_MAX definition and related comments. * Fixed instance_of method. Now add interface needs the Device * fix(MPU): Apply the fix of the fix * fix(MdmaPacket): Fix something went wrong somewhere in a merge * fix(MdmaPacket): Apply the fix of the fix * fix(MdmaPacket): Fix merge things that went wrong * Now it compiles jeje * fix(MPU): Make the MPUManager take it's buffer pointer from a linker symbol, to ensure initialization order doesn't matter * style(MdmaPacket): Forgot to rename a @param Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * style(MdmaPacket): Fix typo Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * style(MPU): Remove comment * feat(MdmaPacket): Move id to non-cached memory * fix(MDMA): Correct bus selection based on address ranges * feat(MDMA): Add alignment handling for nodes * chore(MdmaPacket): Undo changes that are not relevant to the pr * fix(MDMA): Correct bus selection * style(MdmaPacket): Make id jsut a normal value, since TCM is accessible by MDMA * style(MdmaPacket): Small nitpicks * Fix formatting in DomainsCtx declaration --------- Co-authored-by: Cantonplas <dcancat@etsinf.upv.es> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Daniel Cantó Catalán <144663567+Cantonplas@users.noreply.github.com> Co-authored-by: Jorge Sáez <jorgeesg82@gmail.com>
* PWM rework, now in HALAL/Services/PWM (not in pwm/pwm) * Add DualPWM implementation, deadtime might be wrong? * both timerpins must be pwm pins * fix timer_wrapper_test (hopefully) * fix stuff found wrong in pwm.hpp when making dualpwm.hpp * fix deadtime calculation * fix: Max pins per timer is 7
…frastructure/xlist
Contributor
Author
|
Did this in a different branch bcos I think I messed this one up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unfortunately the dummy is necessary but now we only need to specify a domain in a single place.
Had to add ## to VA_ARGS for it to remove the comma when there are no varargs. This does not work in msvc unless -Zc:preprocessor is specified because their implementation of macros works differently