aboutsummaryrefslogtreecommitdiffstats
path: root/src/basecmd.c
Commit message (Collapse)AuthorAgeFilesLines
* basecmd: Use oid_ prefix for the oid manipulation functionsKevin O'Connor2017-03-091-11/+11
| | | | | | | Consistently use an "oid_" prefix on the oid functions - this makes them similar to other functions with a common prefix. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* basecmd: Generalize the "move queue" runtime storageKevin O'Connor2017-03-081-25/+66
| | | | | | | | | Detect the maximum size of each "move queue" item during the configuration phase instead of using the stepper move struct. This allows the stepper code to be contained entirely in stepper.c and it allows for future run time allocations from other types of objects. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialhdl: Load the mcu's 64bit clock at start of connectionKevin O'Connor2017-03-031-4/+16
| | | | | | | | Store a full 64bit uptime in the mcu and query it at the start of each connection. This ensures the host's 64bit clock is always in synch with the mcu's clock. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Minor change - remove unneeded header filesKevin O'Connor2017-01-141-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* basecmd: Improve accuracy of stats "sumsq" variableKevin O'Connor2017-01-091-2/+13
| | | | | | | | | | | | Use a base of 256 instead of 65536 when calculating the sum of the square of the clock differences in the stats. This makes the calculation more accurate. Export the new base via DECL_CONSTANT for the host to access. Use DIV_ROUND_UP() when adjusting for the base to ensure no lost ticks. Do the division after multiplication in the common case where the time between stats_task() invocations is less than 64K ticks. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Use uint_fast8_t for return type of timersKevin O'Connor2016-06-141-1/+1
| | | | | | | | Some architectures are faster passing regular integers than 8bit integers. Use uint_fast8_t so that the architecture chooses the appropriate type. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* irq: Allow boards to define the return type of irq_save()Kevin O'Connor2016-06-131-3/+3
| | | | | | | | The AVR wants a uint8_t return type for irq_save(), but other architectures will generally prefer int. Allow the board to configure the size of the flag by introducing an irqstatus_t typedef. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Change sched_from_ms() to sched_from_us()Kevin O'Connor2016-06-021-1/+1
| | | | | | | Some code may require micro-second precision so update sched_from_ms() to use micro-seconds. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+301
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>