ELEC-C7222
Libraries for ELEC C7222 Course Work
Loading...
Searching...
No Matches
freertos_event_group.hpp
Go to the documentation of this file.
1
5#ifndef ELEC_C7222_UTILS_FREERTOS_EVENT_GROUP_HPP
6#define ELEC_C7222_UTILS_FREERTOS_EVENT_GROUP_HPP
7
8#include <cstdint>
9
10#include "non_copyable.hpp"
11
12namespace c7222 {
13
37 public:
41 bool Initialize();
44
50 std::uint32_t SetBits(std::uint32_t bits);
56 bool SetBitsFromISR(std::uint32_t bits);
62 std::uint32_t ClearBits(std::uint32_t bits);
71 std::uint32_t WaitBits(std::uint32_t bits_to_wait_for,
72 bool clear_on_exit,
73 bool wait_for_all_bits,
74 std::uint32_t ticks_to_wait);
76 std::uint32_t GetBits() const;
78 std::uint32_t GetBitsFromISR() const;
80 bool IsValid() const;
81
82 private:
83 void* handle_{nullptr};
84};
85
86} // namespace c7222
87
88#endif // ELEC_C7222_UTILS_FREERTOS_EVENT_GROUP_HPP
Ownership-based wrapper for an event bit group.
Definition freertos_event_group.hpp:36
std::uint32_t WaitBits(std::uint32_t bits_to_wait_for, bool clear_on_exit, bool wait_for_all_bits, std::uint32_t ticks_to_wait)
Wait until required event bits are satisfied.
std::uint32_t GetBitsFromISR() const
std::uint32_t GetBits() const
bool SetBitsFromISR(std::uint32_t bits)
Set bits from ISR context.
~FreeRtosEventGroup()
Destroy event group resources if initialized.
bool Initialize()
Initialize (or re-initialize) the event group.
std::uint32_t ClearBits(std::uint32_t bits)
Clear bits in the event group.
std::uint32_t SetBits(std::uint32_t bits)
Set bits in the event group.
FreeRtosEventGroup()
Construct and initialize an event group.
Disable both copy and move operations.
Definition non_copyable.hpp:75
C7222 course abstractions namespace.
Definition ble.hpp:20
Base classes to control copy/move semantics.