ccNOos  v0.0.0
Build Portable Microcontroller Applications!
Macros | Functions | Variables
Platform_Win32.h File Reference

IMS: ccNOos, Platform Specification, Win32 More...

#include <ctime>
#include <thread>
#include <cstdarg>
#include <cstdio>
#include <iostream>
#include <fstream>
#include "execution_system.h"
#include "console_menu.h"
#include "serial_comms.h"
#include "adafruit_ft232h.h"
Include dependency graph for Platform_Win32.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LIGHT_OFF   (0u)
 
#define uSEC_PER_CLOCK   (1000000/CLOCKS_PER_SEC)
 

Functions

void platformSetup ()
 
void platformStart ()
 
void platformLoopDelay ()
 

Variables

struct portParametersStruct GPSPortParams
 
struct portParametersStruct eCompPortParams
 
struct devicedatastruct LCDKeyPadDevDataStruct
 
struct devicedatastruct ConsoleMenuDevDataStruct
 
std::ifstream configFile
 
std::ofstream LogFile
 

Detailed Description

IMS: ccNOos, Platform Specification, Win32

Copyright 2021 InMechaSol, Inc

Licensed under the Apache License, Version 2.0(the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Notes: (.c includes .h) - for straight C or (.cpp includes .c which includes .h) - for C++ wrapped straight C Always compiled to a single compilation unit, either C or CPP, not both

Definition in file Platform_Win32.h.

Macro Definition Documentation

◆ LIGHT_OFF

#define LIGHT_OFF   (0u)

Definition at line 50 of file Platform_Win32.h.

◆ uSEC_PER_CLOCK

#define uSEC_PER_CLOCK   (1000000/CLOCKS_PER_SEC)

Definition at line 51 of file Platform_Win32.h.

Function Documentation

◆ platformLoopDelay()

void platformLoopDelay ( )

Definition at line 107 of file Platform_Win32.h.

108 {
109  //<platformLoopDelay>
110  std::this_thread::sleep_for(std::chrono::milliseconds(1));
111  //</platformLoopDelay>
112 }

◆ platformSetup()

void platformSetup ( )

Definition at line 71 of file Platform_Win32.h.

72 {
73 
74 #ifdef _WIN32
75  GPSPortParams = buildportParametersStruct("\\\\.\\COM31", 9600);
76  eCompPortParams = buildportParametersStruct("\\\\.\\COM30", 19200);
77 #else
78  GPSPortParams = buildportParametersStruct("/dev/tty1", 9600);
79  eCompPortParams = buildportParametersStruct("/dev/tty2", 19200);
80 #endif
81 
82  openComPort(&GPSPortParams);
83  openComPort(&eCompPortParams);
84 
87 
88  //<platformSetup>
89  //
90  // open config device
91  configFile.open("conFile.json");
92  LogFile.open("logFile.json");
93  // read config string??
94  //
95  // open log device
96  // wrtie log string??
97  //
98  //</platformSetup>
99 }

◆ platformStart()

void platformStart ( )

Definition at line 101 of file Platform_Win32.h.

102 {
103  //<platformStart>
104  //</platformStart>
105 }

Variable Documentation

◆ configFile

std::ifstream configFile

Definition at line 68 of file Platform_Win32.h.

◆ ConsoleMenuDevDataStruct

struct devicedatastruct ConsoleMenuDevDataStruct

Definition at line 62 of file Platform_Win32.h.

◆ eCompPortParams

nbserial_class eComp_NBSerial& eCompPortParams

Definition at line 1 of file Platform_Win32.h.

◆ GPSPortParams

nbserial_class GPS_NBSerial& GPSPortParams

Definition at line 1 of file Platform_Win32.h.

◆ LCDKeyPadDevDataStruct

struct devicedatastruct LCDKeyPadDevDataStruct

Definition at line 62 of file Platform_Win32.h.

◆ LogFile

std::ofstream LogFile

Definition at line 69 of file Platform_Win32.h.

GPSPortParams
struct portParametersStruct GPSPortParams
Definition: Platform_Win32.h:59
LogFile
std::ofstream LogFile
Definition: Platform_Win32.h:69
eCompPortParams
struct portParametersStruct eCompPortParams
Definition: Platform_Win32.h:60
configFile
std::ifstream configFile
Definition: Platform_Win32.h:68
ConsoleMenuDevDataStruct
struct devicedatastruct ConsoleMenuDevDataStruct
Definition: Platform_Win32.h:65
LCDKeyPadDevDataStruct
struct devicedatastruct LCDKeyPadDevDataStruct
Definition: Platform_Win32.h:64
createDeviceStruct
struct devicedatastruct createDeviceStruct()
Definition: io_device.c:31