10 Commits

Author SHA1 Message Date
Ville Juven
59e86c490d Remove include <log.h> from defines.h
The reason for this is that log.h includes drv_hrt.h which sucks in
half the project's include files with it, which causes strange build
issues
2022-09-29 07:56:24 +02:00
Daniel Agar
a57b9f9381 delete drv_baro.h, drv_mag.h, drv_range_finder.h, drv_device.h and purge UAVCAN CDev usage 2021-01-12 22:04:52 -05:00
Daniel Agar
de4f594937 DriverFramework purge
The bulk of this change was tightly coupled and needed to be deleted in one pass. Some of the smaller changes were things that broke as a result of the initial purge and subsequently fixed by further eradicating unnecessary platform differences. Finally, I deleted any dead code I came across in the related files I touched while going through everything.

 - DriverFramework (src/lib/DriverFramework submodule) completely removed
 - added dspal submodule in qurt platform (was brought in via DriverFramework)
 - all df wrapper drivers removed
 - all boards using df wrapper drivers updated to use in tree equivalents
 - unused empty arch/board.h on posix and qurt removed
 - unused IOCTLs removed (pub block, priv, etc)
 - Integrator delete methods only used from df wrapper drivers
 - commander: sensor calibration use "NuttX version" everywhere for now
 - sensors: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - battery_status: update to px4_{open, read, close} instead of DevMgr wrapper (adc open for analog differential pressure)
 - cdev cleanup conflicting typedefs and names with actual OS (pollevent_t, etc)
 - load_mon and top remove from linux boards (unused)
 - delete unused PX4_MAIN_FUNCTION
 - delete unused getreg32 macro
 - delete unused SIOCDEVPRIVATE define
 - named each platform tasks consistently
 - posix list_devices and list_topics removed (list_files now shows all virtual files)
2020-01-13 14:07:03 -05:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
a2f4757e31 CDev extract from drivers Device class hierarchy
- leave CDev shim for now until all usage is updated
2018-08-27 13:14:15 -04:00
Beat Küng
2c148f07bd
cdev: delete the prev_pollset in unlocked state
Because it uses a semaphore.
2018-07-31 11:49:45 +02:00
Beat Küng
13f2315314 CDev: add DEVICE_POLL_DEBUG macro that removes all poll debug output from the build by default
Reduces 'uorb_tests latency_test' by about 1us
2018-07-30 23:06:32 +02:00
Beat Küng
99fd1f7213 CDev::poll_notify_one: remove checking the semaphore counter
The check is unnecessary. In the worst case the semaphore gets unlocked
twice, but it's not an issue because the waiter is only interested in the
first sem_post(), and the semaphore is then not used anymore.
2018-07-30 23:06:32 +02:00
Beat Küng
72773b75c3 CDev::poll: disable IRQs instead of using an expensive semaphore
poll() is one of the heavily used methods and thus needs to be optimized
as much as possible.

Test on Pixracer: uorb_tests latency_test
Before:
uORB note: ---------------- LATENCY TEST ------------------
INFO  [uorb_tests] mean:     40.4320 us
INFO  [uorb_tests] std dev:   1.3466 us
INFO  [uorb_tests] min:      39 us
INFO  [uorb_tests] max:      57 us
INFO  [uorb_tests] missed topic updates: 0
This Patch:
uORB note: ---------------- LATENCY TEST ------------------
INFO  [uorb_tests] mean:     31.3480 us
INFO  [uorb_tests] std dev:   1.4584 us
INFO  [uorb_tests] min:      30 us
INFO  [uorb_tests] max:      45 us
INFO  [uorb_tests] missed topic updates: 0
2018-07-30 23:06:32 +02:00
Daniel Agar
ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00