mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-10 00:36:00 +00:00
CAN bus completion of abstract class
Can additions
This commit is contained in:
parent
436e7a7336
commit
22dd70cb70
@ -80,6 +80,14 @@ namespace sta
|
||||
void disableFilter(uint8_t idx) override;
|
||||
void clearFilters() override;
|
||||
|
||||
// TODO
|
||||
CanPendingRxFifos getPendingRxFifos() override;
|
||||
|
||||
// Const getters
|
||||
uint8_t maxFilterCount() const override;
|
||||
uint8_t maxFifoCount() const override;
|
||||
uint8_t maxPayloadSize() const override;
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Initialize filter settings.
|
||||
|
@ -168,6 +168,29 @@ namespace sta
|
||||
config->SlaveStartFilterBank = MAX_FILTER_COUNT;
|
||||
}
|
||||
}
|
||||
|
||||
CanPendingRxFifos STM32CanController::getPendingRxFifos(){
|
||||
CanPendingRxFifos pendingFifos(42, 3);
|
||||
|
||||
// Example implementation:
|
||||
//pendingFifos.fifo0Pending = HAL_CAN_GetRxFifoFillLevel(handle_, CAN_RX_FIFO0) != 0;
|
||||
//pendingFifos.fifo1Pending = HAL_CAN_GetRxFifoFillLevel(handle_, CAN_RX_FIFO1) != 0;
|
||||
|
||||
return pendingFifos;
|
||||
}
|
||||
|
||||
uint8_t STM32CanController::maxFilterCount() const{
|
||||
return MAX_FILTER_COUNT;
|
||||
}
|
||||
|
||||
uint8_t STM32CanController::maxFifoCount() const {
|
||||
return MAX_FIFO_COUNT;
|
||||
}
|
||||
|
||||
uint8_t STM32CanController::maxPayloadSize() const {
|
||||
return MAX_PAYLOAD_SIZE;
|
||||
}
|
||||
|
||||
} // namespace sta
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user