PX4 Firmware
PX4 Autopilot Software http://px4.io
cdevtest_example.cpp File Reference

Example for Linux. More...

#include "cdevtest_example.h"
#include <px4_platform_common/tasks.h>
#include <px4_platform_common/time.h>
#include <drivers/drv_device.h>
#include <lib/cdev/CDev.hpp>
#include <unistd.h>
#include <stdio.h>
Include dependency graph for cdevtest_example.cpp:

Go to the source code of this file.

Classes

class  PrivData
 
class  CDevNode
 

Macros

#define TESTDEV   "/dev/cdevtest"
 

Functions

static int writer_main (int argc, char *argv[])
 

Variables

static bool g_exit = false
 

Detailed Description

Example for Linux.

Author
Mark Charlebois charl.nosp@m.ebm@.nosp@m.gmail.nosp@m..com

Definition in file cdevtest_example.cpp.

Macro Definition Documentation

◆ TESTDEV

#define TESTDEV   "/dev/cdevtest"

Definition at line 53 of file cdevtest_example.cpp.

Referenced by CDevExample::main(), and writer_main().

Function Documentation

◆ writer_main()

static int writer_main ( int  argc,
char *  argv[] 
)
static

Definition at line 57 of file cdevtest_example.cpp.

References fd, g_exit, px4_close(), px4_open(), px4_write(), and TESTDEV.

Referenced by CDevExample::main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_exit

bool g_exit = false
static

Definition at line 55 of file cdevtest_example.cpp.

Referenced by CDevExample::main(), and writer_main().