0

I am running Windows CE on an IMx6 chip. I am trying to read button states during the bootloader stages to set the device to a different state.

Is there a GPIO library that I can generally call anywhere during bootloader? I have been trying to call the functions in common_ddk.h (DDK = Device Driver kit) but I am getting errors.

Mike
  • 4,041
  • 6
  • 20
  • 37
Angelo Charl
  • 347
  • 4
  • 15

1 Answers1

2

There is no OS-Defined way to access GPIO in Windows CE. Every BSP can provide his own API/driver interface. Some do this by extending DDK, but there is no standard and, anyway, you will need different libraries (without any os-specific dependency like drivers or API calls) to access HW in the bootloader so, even if you have a solution for OS, that may not apply to the loader. If you have the bootloader code you may check how GPIOs are accessed there, if you don't I would contact the vendor to check if they provide some ways to customize it or access to the code.

Valter Minute
  • 2,177
  • 1
  • 11
  • 13
  • I did a direct register access with the use of INREG32(foo). – Angelo Charl Sep 08 '18 at 11:16
  • This is probably a good solution. If you have to just set a few parameters that should work and, being the bootloader single-core and single-thread, you'll probably don't have to manage any concurrent access issue. – Valter Minute Sep 11 '18 at 05:17