F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LinuxGpioDriverStub.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title LinuxGpioDriverImpl.cpp
3 // \author tcanham
4 // \brief cpp file for LinuxGpioDriver component implementation class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
14 #include <FpConfig.hpp>
15 #include <Fw/Time/Time.hpp>
16 
17 namespace Drv {
18 
20 
21 // ----------------------------------------------------------------------
22 // Handler implementations for user-defined typed input ports
23 // ----------------------------------------------------------------------
24 
25 Os::File::Status LinuxGpioDriver ::setupLineHandle(const PlatformIntType chip_descriptor,
26  const U32 gpio,
27  const GpioConfiguration& configuration,
28  const Fw::Logic& default_state,
29  PlatformIntType& fd) {
30  return Os::File::Status::NOT_SUPPORTED;
31 }
32 
33 Os::File::Status LinuxGpioDriver ::setupLineEvent(const PlatformIntType chip_descriptor,
34  const U32 gpio,
35  const GpioConfiguration& configuration,
36  PlatformIntType& fd) {
37  return Os::File::Status::NOT_SUPPORTED;
38 }
39 
40 Os::File::Status LinuxGpioDriver ::open(const char* device,
41  const U32 gpio,
42  const GpioConfiguration& configuration,
43  const Fw::Logic& default_state) {
44  return Os::File::Status::NOT_SUPPORTED;
45 }
46 
47 Drv::GpioStatus LinuxGpioDriver ::gpioRead_handler(const NATIVE_INT_TYPE portNum, Fw::Logic& state) {
49 }
50 
51 Drv::GpioStatus LinuxGpioDriver ::gpioWrite_handler(const NATIVE_INT_TYPE portNum, const Fw::Logic& state) {
53 }
54 
55 void LinuxGpioDriver ::pollLoop() {
56  // Loop forever
57  while (this->getRunning()) {
59  }
60 }
61 
62 } // end namespace Drv
PlatformIntType NATIVE_INT_TYPE
Definition: BasicTypes.h:55
int PlatformIntType
DefaultTypes.hpp provides fallback defaults for the platform types.
C++-compatible configuration header for fprime configuration.
@ UNKNOWN_ERROR
An unknown error occurred.
static constexpr FwSizeType GPIO_POLL_TIMEOUT
Os::File::Status open(const char *device, const U32 gpio, const GpioConfiguration &configuration, const Fw::Logic &default_state=Fw::Logic::LOW)
open a GPIO pin for use in the system
Logic states.
Definition: LogicEnumAc.hpp:19
static Status delay(Fw::TimeInterval interval)
delay the current task
Definition: Task.cpp:191