From ff57a5db9b117c360e8431656eda7eb13c7ca323 Mon Sep 17 00:00:00 2001 From: Daniel Indictor Date: Tue, 26 Jul 2022 21:57:43 -0400 Subject: [PATCH] =?UTF-8?q?=20Document=20return=20values=20of=20bcm=5Fhost?= =?UTF-8?q?=5Fget=5Fperipheral=5F*=20functions=20for=E2=80=A6clarity.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Indictor --- .../linux/libs/bcm_host/include/bcm_host.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/host_applications/linux/libs/bcm_host/include/bcm_host.h b/host_applications/linux/libs/bcm_host/include/bcm_host.h index 5cd46425c..c3d3e82f1 100644 --- a/host_applications/linux/libs/bcm_host/include/bcm_host.h +++ b/host_applications/linux/libs/bcm_host/include/bcm_host.h @@ -43,8 +43,19 @@ int32_t graphics_get_display_size( const uint16_t display_number, uint32_t *width, uint32_t *height); +/* These functions refer to the peripherals that all Pi's share, + * which start 0x0200_0000 bytes higher than the "main peripheral" + * physical addresses from the BCM2xxx datasheets. For example, + * if you want the physical address of the GPIO's base address, + * you should add 0x0020_0000 to the value this function returns, + * since the GPIO base address is 0x0220_0000 bytes higher than the + * base address of the main peripherals. + * Source: + * https://github.com/raspberrypi/linux/blob/a90998a3e549911234f9f707050858b98b71360f/arch/arm/boot/dts/bcm2711.dtsi#L34 + */ unsigned bcm_host_get_peripheral_address(void); unsigned bcm_host_get_peripheral_size(void); + unsigned bcm_host_get_sdram_address(void); #include "interface/vmcs_host/vc_dispmanx.h"