PAL IOBus functions are not const correct Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
apmorton
Posts: 36
Joined: Fri Sep 29, 2017 10:26 am
Been thanked: 16 times

PAL IOBus functions are not const correct  Topic is solved

Postby apmorton » Thu Apr 26, 2018 12:03 pm

The following function definitions:

Code: Select all

  ioportmask_t palReadBus(IOBus *bus);
  void palWriteBus(IOBus *bus, ioportmask_t bits);
  void palSetBusMode(IOBus *bus, iomode_t mode);

should be changed to:

Code: Select all

  ioportmask_t palReadBus(const IOBus *bus);
  void palWriteBus(const IOBus *bus, ioportmask_t bits);
  void palSetBusMode(const IOBus *bus, iomode_t mode);


This is because it is currently not possible to declare an IOBus structure const (thus avoiding it occupying RAM) without casting away const when passing it to these functions.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: PAL IOBus functions are not const correct

Postby Giovanni » Fri Apr 27, 2018 8:52 am

Hi,

Fixed as bug #940.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 10 guests