Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/Tools/AP_Periph/networking.h
Views: 1798
#pragma once12#include <AP_HAL/AP_HAL_Boards.h>34#ifdef HAL_PERIPH_ENABLE_NETWORKING56#include <AP_Networking/AP_Networking.h>78#ifndef HAL_PERIPH_NETWORK_NUM_PASSTHRU9#define HAL_PERIPH_NETWORK_NUM_PASSTHRU 210#endif1112#ifndef AP_PERIPH_NET_PPP_PORT_DEFAULT13#define AP_PERIPH_NET_PPP_PORT_DEFAULT -114#endif1516#ifndef AP_PERIPH_NET_PPP_BAUD_DEFAULT17#define AP_PERIPH_NET_PPP_BAUD_DEFAULT 1250000018#endif1920class Networking_Periph {21public:22Networking_Periph() {23AP_Param::setup_object_defaults(this, var_info);24}2526static const struct AP_Param::GroupInfo var_info[];2728void init();29void update();3031private:3233#if HAL_PERIPH_NETWORK_NUM_PASSTHRU > 034class Passthru {35public:36friend class Networking_Periph;3738CLASS_NO_COPY(Passthru);3940Passthru() {41AP_Param::setup_object_defaults(this, var_info);42}4344void init();45void update();4647static const struct AP_Param::GroupInfo var_info[];4849private:50AP_Int8 enabled;51AP_Int8 ep1;52AP_Int8 ep2;53AP_Int32 baud1;54AP_Int32 baud2;55AP_Int32 options1;56AP_Int32 options2;5758AP_HAL::UARTDriver *port1;59AP_HAL::UARTDriver *port2;60} passthru[HAL_PERIPH_NETWORK_NUM_PASSTHRU];61#endif // HAL_PERIPH_NETWORK_NUM_PASSTHRU6263AP_Networking networking_lib;64bool got_addresses;6566#if AP_NETWORKING_BACKEND_PPP67AP_Int8 ppp_port;68AP_Int32 ppp_baud;69#endif70};7172#endif // HAL_PERIPH_ENABLE_NETWORKING737475