|
ELEC-C7222
Libraries for ELEC C7222 Course Work
|
C7222 course abstractions namespace. More...
Classes | |
| class | AdvertisementData |
| Generic advertisement data structure builder. More... | |
| class | AdvertisementDataBuilder |
| Builder for assembling a complete advertising payload. More... | |
| class | Attribute |
| ATT attribute wrapper with BTstack-compatible fields. More... | |
| class | AttributeServer |
| Encapsulates the ATT attribute server for the Pico W BLE stack. More... | |
| class | Ble |
| Singleton entry point for BLE configuration and events. More... | |
| class | BleAddress |
| BLE address container with an associated address type. More... | |
| class | Button |
| Input-only GPIO wrapper intended for push-buttons. More... | |
| class | ButtonEvent |
| Thread-safe event wrapper for button IRQ notifications. More... | |
| class | Characteristic |
| Represents a GATT Characteristic with its declaration, value, and descriptors. More... | |
| class | CopyableOnly |
| Convenience base that allows copy but forbids move. More... | |
| class | FreeRtosBinarySemaphore |
| Ownership-based wrapper for a FreeRTOS-style binary semaphore. More... | |
| class | FreeRtosCountingSemaphore |
| Ownership-based wrapper for a FreeRTOS-style counting semaphore. More... | |
| class | FreeRtosCriticalSection |
| Critical-section wrapper with destructor-based exit cleanup. More... | |
| class | FreeRtosEventGroup |
| Ownership-based wrapper for an event bit group. More... | |
| class | FreeRtosMessageBuffer |
| Ownership-based wrapper for discrete message buffering. More... | |
| class | FreeRtosMutex |
| Ownership-based wrapper for a standard mutex with destructor cleanup. More... | |
| class | FreeRtosQueue |
| Ownership-based wrapper for a fixed-size item queue. More... | |
| class | FreeRtosRecursiveMutex |
| Ownership-based wrapper for a recursive mutex with destructor cleanup. More... | |
| class | FreeRtosStreamBuffer |
| Ownership-based wrapper for byte-stream buffering. More... | |
| class | FreeRtosTask |
| Ownership-based wrapper for a task/thread execution object. More... | |
| class | FreeRtosTaskNotification |
| Utility interface for direct task notifications. More... | |
| class | FreeRtosTimer |
| Ownership-based C++ wrapper for FreeRTOS software timers. More... | |
| class | Gap |
| Manages Generic Access Profile (GAP) functionality for BLE. More... | |
| class | GpioIn |
| GPIO input-only wrapper with pull configuration and optional IRQ. More... | |
| class | GpioOut |
| GPIO output-only wrapper with output configuration and drive strength. More... | |
| class | Led |
| Output-only GPIO wrapper intended for LEDs. More... | |
| class | MovableOnly |
| Convenience base that allows move but forbids copy. More... | |
| class | NonCopyable |
| Disable copy operations while keeping move operations enabled. More... | |
| class | NonCopyableNonMovable |
| Disable both copy and move operations. More... | |
| class | NonMovable |
| Disable move operations while keeping copy operations enabled. More... | |
| class | OnBoardLED |
| Simple on-board LED controller. More... | |
| class | OnChipTemperatureSensor |
| Reads the RP2040 on-chip temperature sensor via the ADC. More... | |
| class | PicoWBoard |
| Board-level convenience wrapper for the C7222 Pico W board. More... | |
| class | Platform |
| Singleton access to platform-specific devices and initialization. More... | |
| class | PwmOut |
| Output-only PWM wrapper with period and duty configuration. More... | |
| class | SafeLed |
| LED wrapper that prevents simultaneous control from multiple threads. More... | |
| class | SecurityManager |
| Manages BLE security configuration and pairing-related events. More... | |
| class | Service |
| Represents a GATT Service with its characteristics and included services. More... | |
| class | Uuid |
| UUID storage for 16-bit and 128-bit UUIDs. More... | |
Typedefs | |
| using | ConnectionHandle = uint16_t |
Variables | |
| constexpr size_t | kAdvertisementDataLegacyMaxSize = 31 |
| Maximum length for legacy advertising data (length + type + value). | |
| constexpr size_t | kAdvertisementDataStructHeaderOverhead = 2 |
| Overhead bytes for an AD structure (length + type). | |
C7222 course abstractions namespace.
This namespace is shared by all hardware abstractions used in the course.
| using c7222::ConnectionHandle = typedef uint16_t |
|
strong |
|
strong |
BLE error codes used across HCI/L2CAP/ATT/GATT and BTstack helpers.
Values are aligned with BTstack and Bluetooth error/status codes where applicable.
| Enumerator | |
|---|---|
| kSuccess | Generic HCI status and controller errors. |
| kUnknownHciCommand | |
| kUnknownConnectionIdentifier | |
| kHardwareFailure | |
| kPageTimeout | |
| kAuthenticationFailure | |
| kPinOrKeyMissing | |
| kMemoryCapacityExceeded | |
| kConnectionTimeout | |
| kConnectionLimitExceeded | |
| kSynchronousConnectionLimitToADeviceExceeded | |
| kAclConnectionAlreadyExists | |
| kCommandDisallowed | |
| kConnectionRejectedDueToLimitedResources | |
| kConnectionRejectedDueToSecurityReasons | |
| kConnectionRejectedDueToUnacceptableBdAddr | |
| kUnsupportedFeatureOrParameterValue | |
| kInvalidHciCommandParameters | |
| kRemoteUserTerminatedConnection | |
| kConnectionAcceptTimeoutExceeded | |
| kRemoteDeviceTerminatedConnectionDueToLowResources | |
| kRemoteDeviceTerminatedConnectionDueToPowerOff | |
| kConnectionTerminatedByLocalHost | |
| kRepeatedAttempts | |
| kPairingNotAllowed | |
| kUnknownLmpPdu | |
| kUnsupportedRemoteFeatureUnsupportedLmpFeature | |
| kScoOffsetRejected | |
| kScoIntervalRejected | |
| kScoAirModeRejected | |
| kInvalidLmpParametersInvalidLlParameters | |
| kUnspecifiedError | |
| kUnsupportedLmpParameterValueUnsupportedLlParameterValue | |
| kRoleChangeNotAllowed | |
| kLmpResponseTimeoutLlResponseTimeout | |
| kLmpErrorTransactionCollision | |
| kLmpPduNotAllowed | |
| kEncryptionModeNotAcceptable | |
| kLinkKeyCannotBeChanged | |
| kRequestedQosNotSupported | |
| kInstantPassed | |
| kPairingWithUnitKeyNotSupported | |
| kDifferentTransactionCollision | |
| kReserved | |
| kQosUnacceptableParameter | |
| kQosRejected | |
| kChannelClassificationNotSupported | |
| kInsufficientSecurity | |
| kParameterOutOfMandatoryRange | |
| kRoleSwitchPending | |
| kReservedSlotViolation | |
| kRoleSwitchFailed | |
| kExtendedInquiryResponseTooLarge | |
| kSecureSimplePairingNotSupportedByHost | |
| kHostBusyPairing | |
| kConnectionRejectedDueToNoSuitableChannelFound | |
| kControllerBusy | |
| kUnacceptableConnectionParameters | |
| kDirectedAdvertisingTimeout | |
| kConnectionTerminatedDueToMicFailure | |
| kConnectionFailedToBeEstablished | |
| kMacConnectionFailed | |
| kCoarseClockAdjustmentRejectedButWillTryToAdjustUsingClockDragging | |
| kBtstackConnectionToBtdaemonFailed | BTstack framework errors. |
| kBtstackActivationFailedSystemBluetooth | |
| kBtstackActivationPoweronFailed | |
| kBtstackActivationFailedUnknown | |
| kBtstackNotActivated | |
| kBtstackBusy | |
| kBtstackMemoryAllocFailed | |
| kBtstackAclBuffersFull | |
| kL2capCommandRejectReasonCommandNotUnderstood | L2CAP errors and results. |
| kL2capCommandRejectReasonSignalingMtuExceeded | |
| kL2capCommandRejectReasonInvalidCidInRequest | |
| kL2capConnectionResponseResultSuccessful | |
| kL2capConnectionResponseResultPending | |
| kL2capConnectionResponseResultRefusedPsm | |
| kL2capConnectionResponseResultRefusedSecurity | |
| kL2capConnectionResponseResultRefusedResources | |
| kL2capConnectionResponseResultErtmNotSupported | |
| kL2capConnectionResponseResultRtxTimeout | |
| kL2capConnectionBasebandDisconnect | |
| kL2capServiceAlreadyRegistered | |
| kL2capDataLenExceedsRemoteMtu | |
| kL2capServiceDoesNotExist | |
| kL2capLocalCidDoesNotExist | |
| kL2capConnectionResponseUnknownError | |
| kRfcommMultiplexerStopped | RFCOMM errors. |
| kRfcommChannelAlreadyRegistered | |
| kRfcommNoOutgoingCredits | |
| kRfcommAggregateFlowOff | |
| kRfcommDataLenExceedsMtu | |
| kHfpRemoteRejectsAudioConnection | HFP errors. |
| kSdpHandleAlreadyRegistered | SDP errors. |
| kSdpQueryIncomplete | |
| kSdpServiceNotFound | |
| kSdpHandleInvalid | |
| kSdpQueryBusy | |
| kAttHandleValueIndicationInProgress | ATT indication flow control errors. |
| kAttHandleValueIndicationTimeout | |
| kAttHandleValueIndicationDisconnect | |
| kAttErrorReadNotPermitted | ATT Error: Read Not Permitted (0x02 from spec). |
| kAttErrorWriteNotPermitted | ATT Error: Write Not Permitted (0x03 from spec). |
| kAttErrorInsufficientAuthentication | ATT Error: Insufficient Authentication (0x05 from spec). |
| kAttErrorInsufficientAuthorization | ATT Error: Insufficient Authorization (0x08 from spec). |
| kAttErrorInvalidAttrValueLength | ATT Error: Invalid Attribute Value Length (0x0D from spec). |
| kAttErrorInsufficientEncryption | ATT Error: Insufficient Encryption (0x0F from spec). |
| kGattClientNotConnected | GATT client errors. |
| kGattClientBusy | |
| kGattClientInWrongState | |
| kGattClientDifferentContextForAddressAlreadyExists | |
| kGattClientValueTooLong | |
| kGattClientCharacteristicNotificationNotSupported | |
| kGattClientCharacteristicIndicationNotSupported | |
| kBnepServiceAlreadyRegistered | BNEP errors. |
| kBnepChannelNotConnected | |
| kBnepDataLenExceedsMtu | |
| kBnepSetupConnectionError | |
| kObexUnknownError | OBEX errors. |
| kObexConnectFailed | |
| kObexDisconnected | |
| kObexNotFound | |
| kObexNotAcceptable | |
| kObexAborted | |
| kMeshErrorAppkeyIndexInvalid | Mesh errors. |
|
strong |
|
strong |
GPIO input event bitmask for IRQ configuration.
These values are bit flags and can be OR-ed together. Composite values (BothLevels, BothEdges, All) are provided for convenience.
|
strong |
|
strong |
| void c7222::FreeRtosTimerCallback | ( | void * | timer | ) |
Internal use only. This function is invoked as a callback when the FreeRTOS timer expires.
This function should not be used directly by the user. It is intended to be called by the FreeRTOS timer infrastructure to handle timer expiration events. Ensure that any logic that needs to be executed on timer expiry is encapsulated within the FreeRtosTimer class and its associated callback mechanism.
| timer | A pointer to the timer instance that has expired. |
|
constexpr |
Bitwise AND for two Properties values.
|
constexpr |
Bitwise AND: Properties & uint16_t.
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
Bitwise AND operator for Characteristic::Properties.
| lhs | Left-hand side operand |
| rhs | Right-hand side operand |
|
constexprnoexcept |
|
constexpr |
|
constexpr |
Bitwise AND: uint16_t & Properties.
|
constexprnoexcept |
Bitwise AND assignment operator for Characteristic::Properties.
| lhs | Left-hand side operand (modified) |
| rhs | Right-hand side operand |
|
inline |
|
constexpr |
Bitwise AND assignment: uint16_t &= Properties.
| std::vector< uint8_t > c7222::operator+ | ( | const AdvertisementData & | lhs, |
| const AdvertisementData & | rhs | ||
| ) |
Concatenate two AD structures into a raw byte vector.
Use this when building a single advertising payload from multiple AdvertisementData objects. The caller is responsible for ensuring the combined size stays within the legacy 31-byte limit.
| std::ostream & c7222::operator<< | ( | std::ostream & | os, |
| BleError | error | ||
| ) |
Stream output helper for BleError.
| std::ostream & c7222::operator<< | ( | std::ostream & | os, |
| Characteristic::Properties | props | ||
| ) |
Stream output operator for Characteristic::Properties. Outputs a human-readable list of properties (e.g., "Read | Write | Notify").
| os | Output stream |
| props | Properties bitmask |
| std::ostream & c7222::operator<< | ( | std::ostream & | os, |
| const Attribute & | attr | ||
| ) |
Stream insertion operator for Attribute. Outputs the attribute handle, UUID, and parsed properties flags.
| std::ostream & c7222::operator<< | ( | std::ostream & | os, |
| const BleAddress & | addr | ||
| ) |
| std::ostream & c7222::operator<< | ( | std::ostream & | os, |
| const Characteristic & | characteristic | ||
| ) |
Stream output operator for Characteristic. Outputs comprehensive information about the characteristic including UUID, properties, handles, value, and all descriptors.
Stream insertion operator for Characteristic. Outputs the characteristic UUID, properties, security requirements, and descriptors.
| os | Output stream |
| characteristic | The characteristic to output |
| std::ostream & c7222::operator<< | ( | std::ostream & | os, |
| const SecurityManager & | sm | ||
| ) |
Stream insertion operator for SecurityManager state and configuration.
| std::ostream & c7222::operator<< | ( | std::ostream & | os, |
| const Uuid & | uuid | ||
| ) |
Prints the UUID to a stream.
This is the definition corresponding to the friend declaration above.
|
constexpr |
Bitwise XOR for two Properties values.
|
constexpr |
Bitwise XOR: Properties ^ uint16_t.
|
constexprnoexcept |
Bitwise XOR operator for Characteristic::Properties.
| lhs | Left-hand side operand |
| rhs | Right-hand side operand |
|
constexpr |
|
constexpr |
Bitwise XOR: uint16_t ^ Properties.
|
constexprnoexcept |
Bitwise XOR assignment operator for Characteristic::Properties.
| lhs | Left-hand side operand (modified) |
| rhs | Right-hand side operand |
|
inline |
|
constexpr |
Bitwise XOR assignment: uint16_t ^= Properties.
|
constexpr |
Bitwise OR for two Properties values.
|
constexpr |
Bitwise OR: Properties | uint16_t.
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
Bitwise OR operator for Characteristic::Properties.
| lhs | Left-hand side operand |
| rhs | Right-hand side operand |
|
constexprnoexcept |
|
constexpr |
|
constexpr |
Bitwise OR: uint16_t | Properties. Enables mixing uint16_t with Properties in either operand order.
|
constexprnoexcept |
Bitwise OR assignment operator for Characteristic::Properties.
| lhs | Left-hand side operand (modified) |
| rhs | Right-hand side operand |
|
inline |
|
constexpr |
Bitwise OR assignment: uint16_t |= Properties.
|
constexpr |
Bitwise NOT for a Properties value.
|
constexprnoexcept |
Bitwise NOT operator for Characteristic::Properties.
| prop | Properties to invert |
|
constexpr |
|
constexpr |
Maximum length for legacy advertising data (length + type + value).
|
constexpr |
Overhead bytes for an AD structure (length + type).