blob: c2a86ef81593d014855b3fb529250e4a5f0bd087 [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2000-2018 Ericsson Telecom AB
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
// which accompanies this distribution, and is available at
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
//
// Contributors:
// Lenard Nagy
// version R2A
///////////////////////////////////////////////////////////////////////////////
// Raspberry Pi GPIO port
//
// The recommended use is to extend the GPIO_Base component
// where the whole GPIO is declared as a port array
//
//
// Otherwise when a port of this type is used it MUST be
// named as "gpio[2-27]"
//
// E.g.:
// type component GPIO {
// port GPIO_Pin_Port gpio24;
// port GPIO_Pin_Port gpio[2..27]
// }
//
module GPIOPinPort {
type enumerated GPIO_PIN_DIRECTION {
IN, //"in"
OUT //"out"
}
type enumerated GPIO_PIN_VALUE {
LOW, //"0"
HIGH //"1"
}
type record GPIO_PIN_STATUS {
boolean is_exported,
GPIO_PIN_DIRECTION direction,
GPIO_PIN_VALUE val
}
type port GPIO_Pin_Port message {
out
GPIO_PIN_DIRECTION, GPIO_PIN_VALUE, GPIO_PIN_STATUS
in
GPIO_PIN_VALUE, GPIO_PIN_STATUS;
}
type component GPIO_Base {
port GPIO_Pin_Port gpio[2..27]
}
}