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

Swap to central headers

First part of submission from TankStage.
Built, but not tested.

Version 0.52. Tagged as 'GPIO-0_52'
parent fcbfaf8d
#
# Copyright (c) 2011, Tank Stage Lighting
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the copyright holder nor the names of their
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Makefile for GPIO
#
COMPONENT = GPIO
COMPONENT = GPIO
HDRS =
OBJS = GetAll
RES_OBJ =
......
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.51"
Module_Version SETA 51
Module_MajorVersion SETS "0.52"
Module_Version SETA 52
Module_MinorVersion SETS ""
Module_Date SETS "29 Apr 2014"
Module_ApplicationDate SETS "29-Apr-14"
Module_Date SETS "09 Oct 2014"
Module_ApplicationDate SETS "09-Oct-14"
Module_ComponentName SETS "GPIO"
Module_ComponentPath SETS "bsd/RiscOS/Sources/ThirdParty/TankStage/HWSupport/GPIO"
Module_FullVersion SETS "0.51"
Module_HelpVersion SETS "0.51 (29 Apr 2014)"
Module_FullVersion SETS "0.52"
Module_HelpVersion SETS "0.52 (09 Oct 2014)"
END
/* (0.51)
/* (0.52)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.51
#define Module_MajorVersion_CMHG 0.52
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 29 Apr 2014
#define Module_Date_CMHG 09 Oct 2014
#define Module_MajorVersion "0.51"
#define Module_Version 51
#define Module_MajorVersion "0.52"
#define Module_Version 52
#define Module_MinorVersion ""
#define Module_Date "29 Apr 2014"
#define Module_Date "09 Oct 2014"
#define Module_ApplicationDate "29-Apr-14"
#define Module_ApplicationDate "09-Oct-14"
#define Module_ComponentName "GPIO"
#define Module_ComponentPath "bsd/RiscOS/Sources/ThirdParty/TankStage/HWSupport/GPIO"
#define Module_FullVersion "0.51"
#define Module_HelpVersion "0.51 (29 Apr 2014)"
#define Module_LibraryVersionInfo "0:51"
#define Module_FullVersion "0.52"
#define Module_HelpVersion "0.52 (09 Oct 2014)"
#define Module_LibraryVersionInfo "0:52"
......@@ -100,9 +100,6 @@ GPIO_4_int * 32
GPIO_5_int * 33
GPIO_6_int * 34
HALDeviceBus_Interconnect * 5 :SHL: 28
HALDeviceInterconnectBus_L4 * 1 :SHL: 24
;gpio-controlreg map physical Xm use &0 to protect the register
C_gpio_0 * &1E0
C_gpio_1 * &A06
......@@ -849,30 +846,4 @@ mcpgpioa * &12
mcpolata * &14
mcpbase * &40
;SWI's
OS_Claim EQU &00001F
XOS_Claim EQU &02001F
OS_Release EQU &000020
XOS_Release EQU &020020
XOS_WriteC EQU &020000
XOS_WriteS EQU &020001
XOS_Write0 EQU &020002
XOS_NewLine EQU &020003
XOS_IntOn EQU &020013
XOS_IntOff EQU &020014
XOS_Module EQU &02001E
OS_GenerateError EQU &02002B
XOS_ReadMonotonicTime EQU &020042
XOS_ConvertHex2 EQU &0200D1
XOS_ConvertHex8 EQU &0200D4
XOS_Memory EQU &020068
XOS_Hardware EQU &02007A
OS_IICOp EQU &00007B
XOS_IICOp EQU &02007B
;SWI reals
OSModule_Alloc * 6
OSModule_Free * 7
END
......@@ -25,8 +25,15 @@
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
GET @.hdr.reals
GET VersionASM
GET Hdr:ListOpts
GET Hdr:Macros
GET Hdr:System
GET Hdr:ModHand
GET Hdr:GPIODevice
GET hdr.reals
GET VersionASM
GET ModHead.s
GET InitModule.s
GET KillModule.s
......@@ -34,7 +41,7 @@
GET BeagleSWIs.s
GET I2CSWIs.s
GET PiSWIs.s
GET Errors.s
GET Errors.s
GET Tables.s
END
......@@ -48,7 +48,7 @@ RM_Init
[ :LNOT: ROM
BL |__RelocCode| ; initialise absolute code pointers
]
MOV r0,#OSModule_Alloc ;
MOV r0,#ModHandReason_Claim ;
LDR r3,maxRMA ;
SWI XOS_Module ;
BVS initerror ;
......@@ -61,8 +61,8 @@ RM_Init
CMP r2,r0 ;end ?
BLT %BT10
;get board type for maps
MOV r0,#&400 ;comms
ADD r0,r0,#&3 ;gpio
MOV r0,#HALDeviceType_Comms ;comms
ADD r0,r0,#HALDeviceComms_GPIO ;gpio
MOV r1,#0 ;first call
MOV r8,#4 ;OS_Hardware 4
SWI XOS_Hardware ;call it
......@@ -77,12 +77,12 @@ RM_Init
MOVEQ r0,#hal_rev_dummy ;board type default
BEQ %FT100 ;
;find real board type
;omap3 section
LDR r1,[r2,#HALDevice_GPIORevision]
LDR r1,[r2,#68] ;get revision type
STR r1,[r12,#halrevision] ;
LDR r0,[r2,#64] ;get board type
LDR r0,[r2,#HALDevice_GPIOType]
STR r0,[r12,#halboard] ;
LDRH r3,[r2,#2] ;get processor
LDRH r3,[r2,#HALDevice_ID]
STR r3,[r12,#halproc] ;
CMP r3,#hal_omap3 ;
BNE %FT500 ;not omap try something else
......
......@@ -42,7 +42,7 @@ RM_Die
MOV r2,r12 ;
SWI OS_Release ;
MOV r0,#OSModule_Free ;
MOV r0,#ModHandReason_Free ;
MOV r2,r12 ;remove RMA main block
SWI XOS_Module ;
BVS dieerror
......
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