1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
Marian Buschsieweke
2d81738cb9
drivers/pulse_counter: Use C11 atomics & bugfix
- Previously the pulse counter used GCC's built-in functions for atomic memory
  access. This PR changes this to use C11 atomics instead:
    - Use of C11 atomics instead of atomic build-in functions makes the code
      more portable and readable.
- Previously pulse_counter_reset() did not use an atomic function, so that
  resets would be racy. (E.g. on the 8-bit AVR platform an 16-bit store is
  not atomic, unless special care (like using C11 atomics) is taken.)
2019-11-26 14:04:42 +01:00
Kees Bakker
8991c21d30 drivers/pulse_counter: refactor the prototypes of read funcs
This change makes it more clear that the dev is modified in some of the
read functions. Only pulse_counter_read_without_reset gets a const
pointer argument.

Also, use pulse_counter_t pointers instead of void pointers where
possible.
2019-01-09 23:06:54 +01:00
9f8386c215 drivers*: add saul doc group to related drivers 2018-08-27 11:32:20 +02:00
Joakim Nohlgård
fef0be8c4c pulse_counter: Editorial changes to docs 2018-04-28 15:37:41 +02:00
Hyungsin
a0587ca306 drivers/pulse_counter: initial implementation 2018-01-17 06:28:13 -08:00