Commit Graph
31 Commits
Author SHA1 Message Date
hathach 13a01fe7a8 change token type from uintptr_t to uint32_t 2020-08-27 15:41:47 +07:00
hathach 3cc5b5ba73 revert to use C11 atomic which is implemented by LDREX/STREX on M4 2020-08-27 15:28:38 +07:00
hathach c3f8e34790 refactor hardware pwm 2020-08-25 17:50:08 +07:00
hathach 947d8bb6f7 clean up pwn and analog
replace built-in atomic with freeRTOS critical functions
2020-08-25 10:06:43 +07:00
Henry Gabryjelski 02045e3b30 Poe-tay-toe, poe-tah-toe 2020-08-11 22:35:19 -07:00
Henry Gabryjelski e99b5ea40e Use C++11 atomic 2020-08-11 22:24:37 -07:00
Henry Gabryjelski 29843dacb0 Redefine tone() without ISR
Other minor changes include:
* Enable RTT option for output
  (requires platform.local.txt or boards.local.txt)
* Allow setting compiler optimization
  (requires platform.local.txt or boards.local.txt)
2020-08-03 01:43:25 -07:00
Henry Gabryjelski eb55315d4f Explicit void for no parameters
Per @hathach comments
https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/496/files/d7e005cc99d4db22a3e6940279e5a59b995f247e#r452772810
2020-07-28 23:05:12 -07:00
Henry Gabryjelski 37935c7938 Remove always_inline attribute
Per @hathach request
https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/496#discussion_r452713305
2020-07-28 23:05:12 -07:00
Henry Gabryjelski be9927e497 Simplify by auto-detecting when called from ISR
Thanks to @hathach for recommendation:
https://github.com/adafruit/Adafruit_nRF52_Arduino/pull/496#discussion_r452712103
2020-07-28 23:05:12 -07:00
Henry Gabryjelski 145167b579 tone() auto-release ownership 2020-07-28 23:05:11 -07:00
Henry Gabryjelski 0acacf67b8 Finish conversion back to uintptr_t token 2020-07-28 23:05:11 -07:00
Henry Gabryjelski a6e0d2c925 Prefer uintptr_t to void const * for ownership token 2020-07-28 23:05:11 -07:00
Henry Gabryjelski c190318bb9 Use const void* for ownership token 2020-07-28 23:05:10 -07:00
Henry Gabryjelski ab1b90490c opt-in ownership of PWM peripheral 2020-07-28 23:05:09 -07:00
Henry Gabryjelski b4d777f7f3 Expose API for count of used/free channels 2020-07-28 23:05:09 -07:00
hathach 04c45e13d9 close #105 pwm remove pin
refactor hwpwm sketch
2019-01-10 16:13:04 +07:00
hathach d5dc04de03 correct pca10056 pins 2018-11-06 16:11:04 +07:00
hathach 488006a45b add HwPWM3 for nrf52840 2018-11-05 17:00:48 +07:00
hathach 4640481d02 update Copyright year to 2018 2018-07-27 16:20:36 +07:00
hathach 456cb4a628 fix PWM max_value type cause incorrect servo behavior (640Hz instead of 50hz) 2018-07-12 15:58:01 +07:00
hathach 739f98b683 add readPin() and readChannel() to hw pwm
ported Servo library (not tested)
2017-07-25 00:38:59 +07:00
hathach f5e23fdaba add setMaxValue() to HW PWM 2017-07-24 23:16:22 +07:00
hathach 720cb0c82e rename HardwarePWM PWMn to HwPWMn to avoid name conflict 2017-07-24 22:16:37 +07:00
hathach 33a6bb3642 rename PWM begun() to enabled() 2017-04-10 15:15:58 +07:00
hathach a335699296 only enter low power mode waitForEvent() in idle if there is no active PWM 2017-04-09 14:42:26 +07:00
hathach 7168d198ef make HardwarePWM compatible with Neopixel DMA 2017-03-28 22:15:22 +07:00
hathach 8cb712c377 remove debug code 2017-03-25 01:49:13 +07:00
hathach b77e907702 clean up 2017-03-25 01:01:38 +07:00
hathach 0c5273b1c6 merge begin() and start() 2017-03-25 00:22:09 +07:00
hathach 953c55b218 adding HardwarePWM support 2017-03-24 15:57:47 +07:00