|
573 | 573 | * @brief Get the Bosch M_CAN Message RAM base address
|
574 | 574 | *
|
575 | 575 | * For devicetree nodes with dedicated Message RAM area defined via devicetree, this macro returns
|
576 |
| - * the base address of the Message RAM, taking in the Message RAM offset into account. |
| 576 | + * the base address of the Message RAM. |
577 | 577 | *
|
578 | 578 | * @param node_id node identifier
|
579 |
| - * @return the Bosch M_CAN Message RAM base address |
| 579 | + * @return the Bosch M_CAN Message RAM base address (MRBA) |
| 580 | + */ |
| 581 | +#define CAN_MCAN_DT_MRBA(node_id) \ |
| 582 | + (mem_addr_t)DT_REG_ADDR_BY_NAME(node_id, message_ram) |
| 583 | + |
| 584 | +/** |
| 585 | + * @brief Get the Bosch M_CAN Message RAM address |
| 586 | + * |
| 587 | + * For devicetree nodes with dedicated Message RAM area defined via devicetree, this macro returns |
| 588 | + * the address of the Message RAM, taking in the Message RAM offset into account. |
| 589 | + * |
| 590 | + * @param node_id node identifier |
| 591 | + * @return the Bosch M_CAN Message RAM address |
580 | 592 | */
|
581 | 593 | #define CAN_MCAN_DT_MRAM_ADDR(node_id) \
|
582 |
| - (mem_addr_t)(DT_REG_ADDR_BY_NAME(node_id, message_ram) + CAN_MCAN_DT_MRAM_OFFSET(node_id)) |
| 594 | + (mem_addr_t)(CAN_MCAN_DT_MRBA(node_id) + CAN_MCAN_DT_MRAM_OFFSET(node_id)) |
583 | 595 |
|
584 | 596 | /**
|
585 | 597 | * @brief Get the Bosch M_CAN Message RAM size
|
|
782 | 794 | */
|
783 | 795 | #define CAN_MCAN_DT_INST_MCAN_ADDR(inst) CAN_MCAN_DT_MCAN_ADDR(DT_DRV_INST(inst))
|
784 | 796 |
|
| 797 | +/** |
| 798 | + * @brief Equivalent to CAN_MCAN_DT_MRBA(DT_DRV_INST(inst)) |
| 799 | + * @param inst DT_DRV_COMPAT instance number |
| 800 | + * @return the Bosch M_CAN Message RAM Base Address (MRBA) |
| 801 | + * @see CAN_MCAN_DT_MRBA() |
| 802 | + */ |
| 803 | +#define CAN_MCAN_DT_INST_MRBA(inst) CAN_MCAN_DT_MRBA(DT_DRV_INST(inst)) |
| 804 | + |
785 | 805 | /**
|
786 | 806 | * @brief Equivalent to CAN_MCAN_DT_MRAM_ADDR(DT_DRV_INST(inst))
|
787 | 807 | * @param inst DT_DRV_COMPAT instance number
|
788 |
| - * @return the Bosch M_CAN Message RAM base address |
| 808 | + * @return the Bosch M_CAN Message RAM address |
789 | 809 | * @see CAN_MCAN_DT_MRAM_ADDR()
|
790 | 810 | */
|
791 | 811 | #define CAN_MCAN_DT_INST_MRAM_ADDR(inst) CAN_MCAN_DT_MRAM_ADDR(DT_DRV_INST(inst))
|
|
0 commit comments