Commit d5669ff5 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Change struct layouts for C module compatibility

The HAL device APIs are modelled around the C APCS, and furthermore can be implemented either in a HAL (with SB) or RISC OS module (with R12). Therefore, exporting SB or requiring its use as a function argument precludes implementing the device in a normal module.
For examples of how to keep track of SB for the HAL case, see AudC or BMU or CPUClk or DMA or GPIO or IDE or Mixer or RTC or SDHCI or CacheC devices, which typically keep it in their HAL workspace referenced relative to the device pointer passed in a1/R0.
parent 4ad692f9
......@@ -19,7 +19,6 @@
GET Hdr:HALDevice
^ 0
HALDevice_AHCI # HALDeviceSize
HALDevice_AHCIWorkSpace # 4
HALDevice_AHCIClock # 4
HALDevice_AHCI_Size * :INDEX: @
......
......@@ -20,7 +20,6 @@
^ 0
HALDevice_ENET # HALDeviceSize
; Additional device fields
HALDevice_sb # 4 ; HAL sb/r9 to use in r2 for following calls
HALDevice_ENET_Phy_Device # 4 ; Phy IRQ number
HALDevice_ENET_Phy_IRQ_En # 4 ; IRQ enable/disable
HALDevice_ENET_Phy_IRQ_Test # 4 ; phy irqbit test
......
......@@ -24,7 +24,6 @@
^ 0
HALDevice_SPI # HALDeviceSize
; Additional device fields
HALDevice_SPI_sb # 4 ; (internal use) HAL sb/r9
HALDevice_Capabilities # 4 ; query interface capabilities
HALDevice_Configure # 4 ; configure interface
HALDevice_1 # 4 ; placeholder
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment