Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Drv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Module subdirectories

# Ports
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Interfaces/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Ports/")

# Components
Expand Down
18 changes: 18 additions & 0 deletions Drv/Interfaces/ByteStreamDriver.fpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module Drv {
interface ByteStreamDriver {
@ Port invoked when the driver is ready to send/receive data
output port ready: Drv.ByteStreamReady

@ Port invoked by the driver when it receives data
output port $recv: Drv.ByteStreamData

@ Invoke this port to send data out the driver
guarded input port $send: Fw.BufferSend

@ Port returning ownership of data received on $send port
output port sendReturnOut: Drv.ByteStreamData

@ Port receiving back ownership of data sent out on $recv port
guarded input port recvReturnIn: Fw.BufferSend
}
}
14 changes: 0 additions & 14 deletions Drv/Interfaces/ByteStreamDriverInterface.fppi

This file was deleted.

17 changes: 17 additions & 0 deletions Drv/Interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
####
# F prime CMakeLists.txt:
#
# SOURCE_FILES: combined list of source and autocoding files
# MOD_DEPS: (optional) module dependencies
#
####
register_fprime_module(
Drv_Interfaces
AUTOCODER_INPUTS
"${CMAKE_CURRENT_LIST_DIR}/ByteStreamDriver.fpp"
"${CMAKE_CURRENT_LIST_DIR}/Gpio.fpp"
"${CMAKE_CURRENT_LIST_DIR}/I2c.fpp"
"${CMAKE_CURRENT_LIST_DIR}/Spi.fpp"
"${CMAKE_CURRENT_LIST_DIR}/Tick.fpp"
INTERFACE
)
12 changes: 12 additions & 0 deletions Drv/Interfaces/Gpio.fpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module Drv {
interface Gpio {
@ Port used to write to a GPIO pin
sync input port gpioWrite: Drv.GpioWrite

@ Port used to read from a GPIO pin
sync input port gpioRead: Drv.GpioRead

@ Port used to indicate transition on the GPIO pin
output port gpioInterrupt: Svc.Cycle
}
}
9 changes: 0 additions & 9 deletions Drv/Interfaces/GpioInterface.fppi

This file was deleted.

12 changes: 12 additions & 0 deletions Drv/Interfaces/I2c.fpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module Drv {
interface I2c {
@ Port for guarded synchronous writing to I2C
guarded input port write: Drv.I2c

@ Port for guarded synchronous reading from I2C
guarded input port read: Drv.I2c

@ Port for synchronous writing and reading from I2C
guarded input port writeRead: Drv.I2cWriteRead
}
}
9 changes: 0 additions & 9 deletions Drv/Interfaces/I2cInterface.fppi

This file was deleted.

6 changes: 6 additions & 0 deletions Drv/Interfaces/Spi.fpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Drv {
interface Spi {
@ Port to perform a synchronous read/write operation over the SPI bus
sync input port SpiReadWrite: Drv.SpiReadWrite
}
}
2 changes: 0 additions & 2 deletions Drv/Interfaces/SpiInterface.fppi

This file was deleted.

6 changes: 6 additions & 0 deletions Drv/Interfaces/Tick.fpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Drv {
interface Tick {
@ The cycle outputs. Meant to be connected to rate group driver
output port CycleOut: Svc.Cycle
}
}
2 changes: 0 additions & 2 deletions Drv/Interfaces/TickInterface.fppi

This file was deleted.

2 changes: 1 addition & 1 deletion Drv/LinuxGpioDriver/LinuxGpioDriver.fpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Drv {

passive component LinuxGpioDriver {
include "../Interfaces/GpioInterface.fppi"
import Gpio


# ----------------------------------------------------------------------
Expand Down
4 changes: 1 addition & 3 deletions Drv/LinuxI2cDriver/LinuxI2cDriver.fpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
module Drv {

passive component LinuxI2cDriver {
include "../Interfaces/I2cInterface.fppi"


import I2c
}

}
2 changes: 1 addition & 1 deletion Drv/LinuxSpiDriver/LinuxSpiDriver.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Drv {
# Interfaces
# ----------------------------------------------------------------------

include "../../Drv/Interfaces/SpiInterface.fppi"
import Drv.Spi

# ----------------------------------------------------------------------
# Special ports
Expand Down
2 changes: 1 addition & 1 deletion Drv/LinuxUartDriver/LinuxUartDriver.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Drv {
# General ports
# ----------------------------------------------------------------------

include "../Interfaces/ByteStreamDriverInterface.fppi"
import ByteStreamDriver

@ Allocation port used for allocating memory in the receive task
output port allocate: Fw.BufferGet
Expand Down
2 changes: 1 addition & 1 deletion Drv/TcpClient/TcpClient.fpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Drv {
passive component TcpClient {

include "../Interfaces/ByteStreamDriverInterface.fppi"
import ByteStreamDriver

@ Allocation for received data
output port allocate: Fw.BufferGet
Expand Down
2 changes: 1 addition & 1 deletion Drv/TcpServer/TcpServer.fpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Drv {
passive component TcpServer {

include "../Interfaces/ByteStreamDriverInterface.fppi"
import ByteStreamDriver

@ Allocation for received data
output port allocate: Fw.BufferGet
Expand Down
2 changes: 1 addition & 1 deletion Drv/Udp/Udp.fpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Drv {
passive component Udp {

include "../Interfaces/ByteStreamDriverInterface.fppi"
import ByteStreamDriver

output port allocate: Fw.BufferGet

Expand Down
2 changes: 2 additions & 0 deletions FppTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/component/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/dp/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/state_machine/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/enum/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/interfaces/")
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/struct/")

set(SOURCE_FILES "source.cpp")
Expand All @@ -52,6 +53,7 @@ set(MOD_DEPS
${PROJECT_NAME}/component/queued
${PROJECT_NAME}/dp
${PROJECT_NAME}/enum
${PROJECT_NAME}/interfaces
${PROJECT_NAME}/state_machine/external_instance
${PROJECT_NAME}/state_machine/internal/initial
${PROJECT_NAME}/state_machine/internal/state
Expand Down
13 changes: 6 additions & 7 deletions FppTest/component/active/active.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
active component ActiveTest {

include "../include/internal_ports.fppi"
include "../include/serial_ports.fppi"
include "../include/serial_ports_async.fppi"
include "../include/special_ports.fppi"
include "../include/typed_ports.fppi"
include "../include/typed_ports_async.fppi"

include "../include/output_ports.fppi"
import FppTest.SerialPorts
import FppTest.SerialPortsAsync
import FppTest.SpecialPorts
import FppTest.TypedPorts
import FppTest.TypedPortsAsync
import FppTest.OutputPorts

include "../include/commands.fppi"
include "../include/commands_async.fppi"
Expand Down
1 change: 0 additions & 1 deletion FppTest/component/include/output_ports.fppi

This file was deleted.

8 changes: 0 additions & 8 deletions FppTest/component/include/serial_ports.fppi

This file was deleted.

11 changes: 0 additions & 11 deletions FppTest/component/include/serial_ports_async.fppi

This file was deleted.

26 changes: 0 additions & 26 deletions FppTest/component/include/special_ports.fppi

This file was deleted.

107 changes: 0 additions & 107 deletions FppTest/component/include/typed_ports.fppi

This file was deleted.

Loading
Loading