Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2981565
Remove dead code
henrygab Apr 12, 2020
b4d777f
Expose API for count of used/free channels
henrygab Apr 13, 2020
af68035
analogWrite() avoids hostile takeover of PWM peripherals
henrygab Apr 13, 2020
a771af3
remove dead code
henrygab Apr 13, 2020
ab1b904
opt-in ownership of PWM peripheral
henrygab Apr 26, 2020
d469728
Use HwPWM ownership abstraction
henrygab Apr 27, 2020
d5dc053
Use HwPWM ownership abstraction
henrygab May 1, 2020
3efce16
Servo can also use HwPWM ownership abstraction
henrygab May 4, 2020
c58c01d
Add check for PWM being ENABLED
henrygab May 4, 2020
c190318
Use const void* for ownership token
henrygab May 4, 2020
027bcd3
Fix check for connected pins
henrygab May 4, 2020
85e41af
remove dead code
henrygab May 10, 2020
a6e0d2c
Prefer `uintptr_t` to `void const *` for ownership token
henrygab May 11, 2020
0acacf6
Finish conversion back to `uintptr_t` token
henrygab May 11, 2020
145167b
tone() auto-release ownership
henrygab May 13, 2020
bbc4531
Improve logging for end users
henrygab May 14, 2020
aebdca3
Ensure default value for `analogWriteResolution()`
henrygab May 14, 2020
dd06e2f
Fix HwPWM debug logging typo
henrygab May 14, 2020
be9927e
Simplify by auto-detecting when called from ISR
henrygab Jul 11, 2020
37935c7
Remove always_inline attribute
henrygab Jul 11, 2020
e58b39e
Reduce debug output for analog_write()
henrygab Jul 11, 2020
eb55315
Explicit `void` for no parameters
henrygab Jul 11, 2020
a2a4371
Remove static assertion
henrygab Jul 11, 2020
43da173
Update noTone() to be safe to call from ISR
henrygab Jul 11, 2020
d00de2d
Change variable name per @hathach request.
henrygab Jul 11, 2020
d7b18ed
Code review required comment removal
henrygab Jul 11, 2020
29843da
Redefine tone() without ISR
henrygab Aug 3, 2020
e200ee8
Remove deeper debug level 3
henrygab Aug 3, 2020
db5e0d6
Merge branch 'master' into PWM_Conflicts
henrygab Aug 7, 2020
68a9302
Fix off-by-one typo
henrygab Aug 8, 2020
2019117
Merge branch 'PWM_Conflicts' of https://github.com/henrygab/Adafruit_…
henrygab Aug 8, 2020
a566c69
With no ISR, use Mutex (not Binary) semaphore
henrygab Aug 12, 2020
e99b5ea
Use C++11 atomic
henrygab Aug 12, 2020
02045e3
Poe-tay-toe, poe-tah-toe
henrygab Aug 12, 2020
fdf405c
@hathach believes having `noexcept` means code might throw exceptions…
henrygab Aug 12, 2020
4555fc1
Rename struct per @hathach request
henrygab Aug 12, 2020
1ba1299
change casing of class functions per @hathach request
henrygab Aug 12, 2020
a7ffaaa
@hathach doesn't like static_assert
henrygab Aug 12, 2020
5f3d871
@hathach says internal classes should not guard against API misuse ..…
henrygab Aug 12, 2020
53819e5
More removal of `noexcept` markings
henrygab Aug 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
@hathach doesn't like static_assert
  • Loading branch information
henrygab committed Aug 12, 2020
commit a7ffaaadbd073a4d9f4cb9254fa448dccbc7cc1e
4 changes: 0 additions & 4 deletions cores/nRF5/Tone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ constexpr inline static uint64_t _calculate_pulse_count(uint32_t frequency, uint
// range for frequency == [20..25000],
// range for duration == [ 1..0xFFFF_FFFF]
// so range of result == [ 1..0x18_FFFF_FFE7] (requires 37 bits)
static_assert(sizeof(unsigned long long) >= sizeof(uint64_t));
return
(duration == 0) ?
0 :
Expand Down Expand Up @@ -174,9 +173,6 @@ inline static int _bits_used(unsigned long long x) {
*/
void tone(uint8_t pin, unsigned int frequency, unsigned long duration)
{
static_assert(sizeof(unsigned long int) <= sizeof(uint32_t));
static_assert(sizeof(unsigned int) <= sizeof(uint32_t));

// Used only to protect calls against simultaneous multiple calls to tone().
// Using a function-local static to avoid accidental reference from ISR or elsewhere,
// and to simplify ensuring the semaphore gets initialized.
Expand Down