Is there a difference between gpiomem4 and gpiochip4? Does the gpiod library give any indications about gpiomem devices?3. Tell the code where to find the GPIO. Originally the Raspberry Pi had a single gpiomem device, which was mapped into memory and we could use it with Python modules such as RPi.GPIO. With the Raspberry Pi 5 and the RP1 chip we now have dynamically split devices, and our GPIO is at gpiomem4.
chip = gpiod.Chip('gpiochip4')
4. Create a variable called led_line and store a reference to the LED GPIO pin. The gpiod module uses lines to refer to the GPIO pins.
led_line = chip.get_line(LED_PIN)
But I agree there is a contradiction, which I can't explain.