Added Wifi files
This commit is contained in:
+3692
File diff suppressed because it is too large
Load Diff
+27
-10
@@ -16,16 +16,6 @@
|
||||
#ifndef MAIN_INC_GPIO_H_
|
||||
#define MAIN_INC_GPIO_H_
|
||||
|
||||
/**
|
||||
* gpio implementation
|
||||
* \defgroup gpio
|
||||
* \brief {group_description}
|
||||
* \addtogroup {Layer}
|
||||
*
|
||||
* Detailed description
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
@@ -50,13 +40,40 @@
|
||||
// Type definitions.
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GPIO_DIRECTION_INPUT = 0,
|
||||
GPIO_DIRECTION_OUTPUT = 1
|
||||
} GPIO_Direction_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GPIO_VALUE_LOW = 0,
|
||||
GPIO_VALUE_HIGH = 1
|
||||
} GPIO_Value_t;
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
class GPIO
|
||||
{
|
||||
public:
|
||||
|
||||
bool GPIO(int number, GPIO_Direction_t direction);
|
||||
|
||||
bool GPIO_setOutput(GPIO_Value_t value);
|
||||
|
||||
GPIO_Value_t GPIO_getInput(void);
|
||||
|
||||
private:
|
||||
|
||||
int number;
|
||||
|
||||
GPIO_Direction_t direction;
|
||||
|
||||
GPIO_Value_t value;
|
||||
};
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// \file wifi.h
|
||||
/// \brief File description
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// vbchaos software design
|
||||
//
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2023 vbchaos
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef MAIN_INC_WIFI_H_
|
||||
#define MAIN_INC_WIFI_H_
|
||||
|
||||
/**
|
||||
* wifi implementation
|
||||
* \defgroup wifi
|
||||
* \brief {group_description}
|
||||
* \addtogroup {Layer}
|
||||
*
|
||||
* Detailed description
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Include files
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// CompilerIncludes
|
||||
// All include files that are provided by the compiler directly
|
||||
|
||||
|
||||
|
||||
// ProjectIncludes
|
||||
// All include files that are provided by the project
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Type definitions.
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* MAIN_INC_WIFI_H_ */
|
||||
@@ -2,6 +2,10 @@
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
while (true) {
|
||||
|
||||
+10
-1
@@ -17,8 +17,11 @@
|
||||
// Include files
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#include "driver/gpio.h"
|
||||
|
||||
#include "gpio.h"
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
@@ -47,7 +50,13 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
bool GPIO::GPIO(int number, GPIO_Direction_t direction)
|
||||
{
|
||||
this->number = number;
|
||||
this->direction = direction;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// \file wifi.cpp
|
||||
/// \brief Description
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
//
|
||||
// vbchaos software design
|
||||
//
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
/// $Revision: $
|
||||
/// $Author: $
|
||||
/// $Date: $
|
||||
// (c) 2023 vbchaos
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Include files
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#include "wifi.h"
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Constant and macro definitions
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Type definitions
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// File-scope variables
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Function declarations
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1622
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user