Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit ff57a5d

Browse files
Document return values of bcm_host_get_peripheral_* functions for…clarity.
Signed-off-by: Daniel Indictor <[email protected]>
1 parent 54fd97a commit ff57a5d

File tree

1 file changed

+11
-0
lines changed
  • host_applications/linux/libs/bcm_host/include

1 file changed

+11
-0
lines changed

host_applications/linux/libs/bcm_host/include/bcm_host.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,19 @@ int32_t graphics_get_display_size( const uint16_t display_number,
4343
uint32_t *width,
4444
uint32_t *height);
4545

46+
/* These functions refer to the peripherals that all Pi's share,
47+
* which start 0x0200_0000 bytes higher than the "main peripheral"
48+
* physical addresses from the BCM2xxx datasheets. For example,
49+
* if you want the physical address of the GPIO's base address,
50+
* you should add 0x0020_0000 to the value this function returns,
51+
* since the GPIO base address is 0x0220_0000 bytes higher than the
52+
* base address of the main peripherals.
53+
* Source:
54+
* https://github.com/raspberrypi/linux/blob/a90998a3e549911234f9f707050858b98b71360f/arch/arm/boot/dts/bcm2711.dtsi#L34
55+
*/
4656
unsigned bcm_host_get_peripheral_address(void);
4757
unsigned bcm_host_get_peripheral_size(void);
58+
4859
unsigned bcm_host_get_sdram_address(void);
4960

5061
#include "interface/vmcs_host/vc_dispmanx.h"

0 commit comments

Comments
 (0)