repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
Justewi/CentralTrafficLightManagement
lightControler/src/Controler.h
<reponame>Justewi/CentralTrafficLightManagement<gh_stars>1-10 #ifndef CONTROLER_H #define CONTROLER_H #include <string> #include <chrono> #include "MessageQueue.h" enum Direction { NS, EW }; struct Timers { std::chrono::seconds nsTime; std::chrono::seconds ewTime; }; class Controler { std::string i...
Justewi/CentralTrafficLightManagement
lightControler/src/Logger.h
#ifndef LOGGER_H #define LOGGER_H #include <ostream> #include <chrono> // Neat thing // Thanks to https://stackoverflow.com/questions/17597828/c-prepend-datetime-to-console-output // And http://gabisoft.free.fr/articles/fltrsbf1.html class Logger : public std::streambuf { std::streambuf* myDest; std::ostream...
WinterChen/myframework
protobuf/head.h
#ifndef PROTO_HEAD #define PROTO_HEAD #define DEFAULT_CMD 0 #define PARSE_REQUEST_ERROR -30001 #define PARSE_RESPONSE_ERROR -30002 #define CMD_ERROR -30003 #define HEAD_LEN_ERROR -30004 #define BODY_LEN_ERROR -30005 struct Head{ unsigned short mCmd; //char mVersion; short mErrorNo; unsigned mSeq; ...
WinterChen/myframework
iolib/log.h
//---------------------------------------------------------- -*- Mode: C++ -*- // $Id: log.h 351 2009-05-27 05:40:23Z sriramsrao $ // // Created 2007/10/17 // // Copyright 2008 Quantcast Corp. // Copyright 2007-2008 Kosmix Corp. // // This file is part of Kosmos File System (KFS). // // Licensed under the Apache Licens...
WinterChen/myframework
iolib/commonFuncation.h
<gh_stars>0 //Author:<NAME> //Created:2013-4-25 //funcations I used // #ifndef COMMONFUNCATION_H #define COMMONFUNCATION_H #include <iostream> #include <string> #include <sstream> #include <vector> using namespace std; extern bool gIsBigEndian; class GenerateString{ public: GenerateString(){} ...
WinterChen/myframework
iolib/netConnection.h
<reponame>WinterChen/myframework<filename>iolib/netConnection.h<gh_stars>0 #ifndef _NET_CONNECTION_ #include "tcpSocket.h" #include "callbackObj.h" #include "ioBuffer.h" #include "threadPool.h" #include "bufferPool.h" //#include "classBase.h" class Processor; class NetConnection{ public: NetConnection(TcpSocket *soc...
WinterChen/myframework
iolib/counter.h
#ifndef _COUNTER_H_ #define _COUNTER_H_ #include <sys/time.h> using namespace std; class Counter{ public: Counter():mTotalRequestCount(0),mPrevRequestCount(0),mTotalResponseCount(0),mPrevResponseCount(0), mTotalTimeuse(0),mPrevTimeuse(0){gettimeofday(&mStartTime,0);gettimeofday(&mEndTime,0);} ~Counter(){}...
WinterChen/myframework
iolib/eventManager.h
<reponame>WinterChen/myframework #ifndef _EVENT_MANAGER_ #define _EVENT_MANAGER_ #include "fdEpoll.h" #include "timeout.h" #include "processor.h" class EventBase{ public: EventBase(){} ~EventBase(){} virtual int GetFd() = 0; }; class EventManager: public Timeout, public CallbackObj{ public: EventManager():mCallb...
WinterChen/myframework
iolib/netKicker.h
#ifndef NETKICKER_H #define NETKICKER_H class NetKicker { public: NetKicker(); ~NetKicker(); /// The "write" portion of the pipe writes one byte on the fd. void Kick(); int Drain(); int GetFd() const; private: class Impl; Impl& mImpl; /// This is the callback from the net-manager to...
WinterChen/myframework
iolib/callbackObj.h
#ifndef CALLBACKOBJ_H #define CALLBACKOBJ_H class CallbackObj{ public: virtual int HandleEvent(int code, void *data) = 0; //int HandleRequest(int ,void * data) }; #endif
WinterChen/myframework
iolib/config.h
#ifndef _CONFIG_H_ #define _CONFIG_H_ #include <iostream> #include <string> #include <map> using namespace std; class Config{ public: Config(){} ~Config(){} void InitConfig(string fileName); string GetValue(std::string key, std::string def) ; const char* GetValue(std::string key, const char* def...
WinterChen/myframework
iolib/timeout.h
#ifndef _TIMEOUT_H_ #define _TIMEOUT_H_ #include <sys/time.h> class Timeout{ public: Timeout() : mIntervalMs(0), mDisabled(false), mLastCall(0) { } virtual ~Timeout() {} void Disable() { mDisabled = true; } void SetTimeoutInterval(int intervalMs, bool resetTimer = false) { ...
WinterChen/myframework
iolib/tcpSocket.h
<reponame>WinterChen/myframework #ifndef TCPSOCKET_H #define TCPSOCKET_H #include <string> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <unistd.h> #include <iostream> using namespace std; struct ServerLocation{ ServerLocation() : hostn...
WinterChen/myframework
iolib/queue.h
//Created: 2013.05.02 //Author: <NAME> //This is the doubly-linked-queue data struct for high-performance disk IO, created by Witner. #ifndef QUEUE_H #define QUEUE_H #include<stdio.h> //for NULL template <class T> class QueueNode{ public: QueueNode() : mPrev(NULL), mNext(NULL), mObj(NULL){} ~QueueNode(){ mPrev =...
WinterChen/myframework
iolib/fdEpoll.h
#ifndef FDEPOLL_H #define FDEPOLL_H #include<sys/epoll.h> // // class FDEpoll{ public: FDEpoll(); ~FDEpoll(); /**the next three founctions are encapsulated of int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event); the op has three values:EPOLL_CTL_ADD EPOLL_CTL_MOD EPOLL_CTL_DEL **/ ...
WinterChen/myframework
src/clientSM.h
<reponame>WinterChen/myframework #ifndef CLIENTSM_H #define CLIENTSM_H //#include "request.h" #include "callbackObj.h" #include "netConnection.h" //#include "myframework.pb.h" //#include "myframework.pb.helper.h" //using namespace google::protobuf;//::Message class ClientSM : public CallbackObj { public: ClientS...
WinterChen/myframework
src/myserver.h
<reponame>WinterChen/myframework<gh_stars>0 #ifndef MYSERVER_H #define MYSERVER_H #include <vector> #include <fstream> #if(__cplusplus == 201103L) #include <unordered_map> #else #include <tr1/unordered_map> namespace std { using std::tr1::unordered_map; } #endif #include "clientManager.h" #include "...
WinterChen/myframework
iolib/type.h
<filename>iolib/type.h<gh_stars>0 #ifndef TYPE_H #define TYPE_H enum EventType { EVENT_NEW_CONNECTION, EVENT_NET_READ, EVENT_NET_WROTE, EVENT_NET_ERROR, EVENT_NET_CLOSE, EVENT_DISK_READ, EVENT_DISK_WROTE, EVENT_DISK_ERROR, EVENT_SYNC_DONE, EVENT_CMD_DONE, EVE...
WinterChen/myframework
iolib/processor.h
#include <iostream> #include <string> #include <queue> #include "netKicker.h" #include "threadPool.h" #include "mutex.h" #include "netConnection.h" #include "counter.h" #include "fdEpoll.h" #include "log.h" #include "classBase.h" #include "acceptor.h" using namespace myframework; using namespace std; class Processor...
WinterChen/myframework
iolib/classBase.h
#ifndef CLASS_BASE_H #define CLASS_BASE_H class ProcessorBase{ public: ProcessorBase(){} virtual ~ProcessorBase(){} virtual void MainLoop() = 0; virtual void AddConnectionToEpoll(NetConnection *conn) = 0; virtual int DeleteFromEpoll(NetConnection *conn) = 0; }; #endif
WinterChen/myframework
src/clientManager.h
<filename>src/clientManager.h #ifndef CLIENTMANAGER_H #define CLIENTMANAGER_H #include "acceptor.h" #include "callbackObj.h" #include "clientSM.h" #include "log.h" using namespace myframework; class ClientManager : public IAcceptorOwner { public: ClientManager() { mAcceptor = NULL; }; virtual ~...
WinterChen/myframework
iolib/threadPool.h
<gh_stars>0 //---------------------------------------------------------- -*- Mode: C++ -*- // // // Created 2013/08/30 // Author: <NAME> // // // //---------------------------------------------------------------------------- #ifndef THREADPOOL_H #define THREADPOOL_H #include <pthread.h> #include <string> #include <ios...
WinterChen/myframework
iolib/cpu.h
#ifndef CPU_H #define CPU_H #include <vector> #include <sys/types.h> #include <sys/sysinfo.h> #include <unistd.h> #include <pthread.h> #include <string> #include <iostream> using namespace std; class CPU{ public: CPU(); ~CPU(); void BindToProcessor(string threadName = ""); int GetProcessorCount(); ...
WinterChen/myframework
iolib/mutex.h
<reponame>WinterChen/myframework<gh_stars>0 #ifndef MUTEX_H #define MUTEX_H #include <pthread.h> #include <semaphore.h> #include <errno.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; typedef int64_t Time; //mutex class Mutex{ public: Mutex(); ~Mutex(); bool L...
motoi1484/ofxLINEEYE
src/ofxLINEEYE.h
<filename>src/ofxLINEEYE.h // // ofxLINEEYE.h // ofxLINEEYE_example // // Created by <NAME> on 2018/02/14. // // /* <usage> ofxLINEEYE lineeye; lineeye.setup("192.168.7.180"); //0番portをON, portは0から4の5ポート lineeye.setState(0, true); //0番portをOFF lineeye.setState(0, false); */ #ifndef ofxLINEEYE_h #define ...
mikeooye/BPCrash
CrashReporter/BPCrashManager.h
<reponame>mikeooye/BPCrash<filename>CrashReporter/BPCrashManager.h // // BPCrashManager.h // CrashReporter // // Created by mikeooye on 15-4-15. // Copyright (c) 2015年 mikeooye. All rights reserved. // #import <Foundation/Foundation.h> @interface NSException (bpExtension) @property (readonly, nonatomic) NSStrin...
mikeooye/BPCrash
CrashReporter/BPCrashReporter.h
<filename>CrashReporter/BPCrashReporter.h // // BPCrashReporter.h // CrashReporter // // Created by mikeooye on 15-4-15. // Copyright (c) 2015年 mikeooye. All rights reserved. // #import <Foundation/Foundation.h> @interface BPCrashReporter : NSObject /** * 将闪退日志保存到文件中 * * @param log 异常信息 * @param file...
axoulc/AD7799-STM32
src/AD7799.c
/** ****************************************************************************** * @file AD7799.c * @brief This file provides code to use ADC Analog AD7799 * @author <NAME> ****************************************************************************** */ #include "AD7799.h" #include <math.h> /** ...
axoulc/AD7799-STM32
src/AD7799.h
/** ****************************************************************************** * @file AD7799.h * @brief This file provides functions, enum and struct to use ADC Analog AD7799 * @author <NAME> ****************************************************************************** */ #ifndef __AD7799_H__ ...
mattdano/palisade
src/pke/unittest/UnitTestSer.h
<reponame>mattdano/palisade<gh_stars>1-10 /* * @file UnitTestSer.h - function to test serialization * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are...
mattdano/palisade
src/pke/lib/cryptocontexthelper.h
<gh_stars>1-10 /** * @file ciphertexthelper.h -- Helper for crypto contexts. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided tha...
mattdano/palisade
src/core/lib/utils/serial.h
/** * @file serial.h Serialization utilities. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are ...
mattdano/palisade
src/abe/lib/cpabe.h
<reponame>mattdano/palisade /* * @file cpabe.h - Header file for CPABE scheme related classes. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permi...
mattdano/palisade
src/core/lib/utils/inttypes.h
<filename>src/core/lib/utils/inttypes.h /** * @file inttypes.h This code provides basic integer types for lattice crypto. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or witho...
mattdano/palisade
src/core/lib/math/distributiongenerator.h
<filename>src/core/lib/math/distributiongenerator.h<gh_stars>0 /** * @file distributiongenerator.h This code provides basic structure for distribution generators. This should be inherited by all other distribution generators. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Techno...
mattdano/palisade
src/pke/lib/cryptocontextgen.h
<filename>src/pke/lib/cryptocontextgen.h /** * @file ciphertextgen.h -- Generator for crypto contexts. * @author TPOC: <EMAIL> * * @section LICENSE * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT)) * All rights reserved. * Redistribution and use in source and binary forms, with or w...
mattdano/palisade
src/core/lib/utils/utilities.h
<gh_stars>1-10 /** * @file utilities.h This file contains the utility function functionality. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permi...
mattdano/palisade
src/core/lib/utils/memory.h
<reponame>mattdano/palisade /** * @file memory.h Memory utilities for Palisade. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided ...
mattdano/palisade
src/core/lib/lattice/backend.h
<gh_stars>1-10 /** * @file backend.h This file contains the functionality to switch between lattice backends * * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modifica...
mattdano/palisade
src/core/lib/math/discreteuniformgenerator.h
/** * @file discreteuniformgenerator.h This code provides generation of uniform distibutions of discrete values. * Discrete uniform generator relies on the built-in C++ generator for 32-bit unsigned integers defined in <random>. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of T...
mattdano/palisade
src/core/lib/math/cpu_int/binint.h
<filename>src/core/lib/math/cpu_int/binint.h /** * @file binint.h This file contains the vector manipulation functionality. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or with...
mattdano/palisade
src/pke/lib/cryptocontext-ser.h
/* * @file cryptocontext-ser.h - serialize cryptocontext; include this in any app that needs to serialize them * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modificati...
mattdano/palisade
src/core/lib/encoding/integerencoding.h
/** * @file integerencoding.h Represents and defines integer-encoded plaintext objects in Palisade. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are...
mattdano/palisade
src/core/lib/utils/exception.h
/** * @file exception.h - framework for exceptions in PALISADE * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the followin...
mattdano/palisade
src/pke/lib/pubkeylp-ser.h
<reponame>mattdano/palisade /* * @file pubkeylp-ser.h - serialize keys; include this in any app that needs to serialize these objects * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, wi...
mattdano/palisade
src/abe/lib/abeparamset.h
/** * @file abeparamset.h - Parameter sets for ABE schemes * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following co...
mattdano/palisade
src/core/lib/encoding/plaintextfactory.h
/** * @file plaintextfactory.h Manufactures plaintext objects in Palisade. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that ...
mattdano/palisade
src/pke/lib/nullscheme-ser.h
/* * @file nullscheme-ser.h -- serialize NULL; include this in any app that needs to serialize this scheme * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, ...
mattdano/palisade
src/core/lib/utils/serializable.h
/** * @file serializable.h Legacy Serialization utilities. * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following co...
mattdano/palisade
src/core/lib/utils/serialize-json.h
<filename>src/core/lib/utils/serialize-json.h /** * @file serialize-json.h - include to enable json serialization * @author TPOC: <EMAIL> * * @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modifi...
lucasvictorsp/ArduinoDataLogLibary
DataLog.h
<reponame>lucasvictorsp/ArduinoDataLogLibary<gh_stars>0 #ifndef DATALOG_H #define DATALOG_H #include "Arduino.h" //#include <lm35.h> #include "DHT.h" //#include <OneWire.h> //#include <DallasTemperature.h> #include <SPI.h> #include <SD.h> #define MAX_SENSORES 10 class DataLog { struct DhtObj{ DHT* obj; String id; }...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/uCGUI/MemDev/GUIDEV_UsageBM.c
<gh_stars>10-100 /********************************************************************* * SEGGER MICROCONTROLLER SYSTEME GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * ...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/devicerequest.h
<gh_stars>10-100 /****************************************************************************** * usbd/devicerequest.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * usbd/devicerequest.h contains a definition of the standard device * request structure defined i...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/uCGUI/MemDev/GUIDEV_Banding.c
<gh_stars>10-100 /********************************************************************* * SEGGER MICROCONTROLLER SYSTEME GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * ...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/usrApp/main.c
#include "uart.h" #include "regs.h" #include "timer.h" //#include <stdint.h> #include "ucos/includes.h" //#include "../bsp/framebuffer.h" //#include "string.h" //Csonsole headers #include "../h/interrupts.h" #include "../uCGUI/WM/WM.h" #include "../uCGUI/Widget/DIALOG.h" #include "../uCGUI/Widget/LISTBOX.h" #include "...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/descriptors.h
<gh_stars>10-100 /****************************************************************************** * usbd/descriptors.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * usbd/descriptors.h contains structures defined in the USB standard that * describe various aspects...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/h/regs.h
#ifndef REGS_H_ #define REGS_H_ #define GPFSEL1 0x20200004 #define GPSET0 0x2020001C #define GPCLR0 0x20200028 #define GPPUD 0x20200094 #define GPPUDCLK0 0x20200098 #define AUX_ENABLES 0x20215004 #define AUX_MU_IO_REG 0x20215040 #define AUX_MU_IER_REG 0x20215044 #define AUX_MU_IIR_REG 0x20215048 #d...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/platform.h
<gh_stars>10-100 /****************************************************************************** * platform/platform.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * platform/platform.h contains definitions pertaining to the platform that * the system will run on...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/hub.h
/****************************************************************************** * device/hub.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * device/hub.h contains definitions relating to the USB hub device. *******************************************************...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/types.h
<reponame>meesokim/Raspberry-uCOS-uCGUI /****************************************************************************** * types.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * types.h contains definitions of standardised types used ubiquitously. ****************...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/configuration.c
/****************************************************************************** * configuration.c * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * configuration.c contains code to load all components. In order to * allow the actual source files to be completely ind...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/ucos/OS_SEM.h
<reponame>meesokim/Raspberry-uCOS-uCGUI /* ********************************************************************************************************* * uC/OS-II * The Real-Time Kernel * SEMAPH...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/port/OS_Cpu_c.c
<filename>work-ucos/port/OS_Cpu_c.c /* ; ------------------------------------------------------------------- ; OSTaskStkInit - build up initial stack for a task ; This will be the first register window. Must set %pc, %psr and %sp. ; Values of other registers does not matter. ; Put pointer to task name into the return ...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/uCGUI/MemDev/GUIDEV_CmpWithLCD.c
<filename>work-ucos/uCGUI/MemDev/GUIDEV_CmpWithLCD.c /********************************************************************* * SEGGER MICROCONTROLLER SYSTEME GmbH * * Solutions for real time microcontroller applications * ******************************************************...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/bsp/mailbox.h
<reponame>meesokim/Raspberry-uCOS-uCGUI<filename>work-ucos/bsp/mailbox.h #ifndef _MAILBOX_H_ #define _MAILBOX_H_ #include "../ucGUI/core/LCD.h" void MailboxWrite(u32 message, u32 mailbox); u32 MailboxRead(u32 mailbox); #endif // _MAILBOX_H_
meesokim/Raspberry-uCOS-uCGUI
work-ucos/ucos/OS_TIME.h
<gh_stars>10-100 /* ********************************************************************************************************* * uC/OS-II * The Real-Time Kernel * TIME MANAGEMENT * * ...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/usbd.h
/****************************************************************************** * usbd/usbd.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * usbd/usbd.h contains definitions relating to the generic USB driver. USB * is designed such that this driver's interface w...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/h/timer.h
<reponame>meesokim/Raspberry-uCOS-uCGUI<filename>work-ucos/h/timer.h<gh_stars>10-100 #ifndef TIMER_H_ #define TIMER_H_ void timer_init( void ); #endif /* TIMER_H_ */
meesokim/Raspberry-uCOS-uCGUI
work-ucos/usrApp/userApp.c
//#include <stdint.h> #include "uart.h" #include "ucos/includes.h" //#include "../bsp/framebuffer.h" //#include "string.h" #include "../uCGUI/WM/WM.h" #include "../uCGUI/Widget/DIALOG.h" #include "../uCGUI/Widget/LISTBOX.h" #include "../uCGUI/Widget/EDIT.h" #include "../uCGUI/Widget/SLIDER.h" #include "../uCGUI/Widget/...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/h/ucos/includes.h
#include "os_cpu.h" #include "os_cfg.h" #include "ucos_ii.h" extern void *memcpy(void *destination,const void *source,unsigned int size); extern void *memset(void * m,int c,unsigned int size);
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/device.h
<gh_stars>10-100 /****************************************************************************** * usbd/device.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * usbd/device.h contains a definition of a device structure used for * storing devices and the device tr...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/mouse.c
/****************************************************************************** * device/mouse.c * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * device/mouse.c contains code relating to USB hid mice. The * driver maintains a list of the mice on the system, and a...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/bsp/uart.c
#include "../h/regs.h" extern void PUT32 ( unsigned int, unsigned int ); extern unsigned int GET32 ( unsigned int ); extern void dummy ( unsigned int ); unsigned int uart_lcr ( void ) { return(GET32(AUX_MU_LSR_REG)); } unsigned int uart_recv ( void ) { while(1) { if(GET32(AUX_MU_LSR_REG)&0x01) br...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/configuration.h
/****************************************************************************** * configuration.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * configuration.h contains definitions for all optional components * The makefile defines three main categories of defin...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/ucos/uCOS_II.c
/* ********************************************************************************************************* * uC/OS-II * The Real-Time Kernel * * (c) Copyright 1992-2002, <NAME>, Weston, FL * ...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/bsp/timer.c
<gh_stars>10-100 #include "regs.h" #include "interrupts.h" #include "ucos/includes.h" extern INTERRUPT_VECTOR g_VectorTable[BCM2835_INTC_TOTAL_IRQ]; static void tickISR() { OSTimeTick(); timerRegs->CLI = 0; } void timer_init( void ) { DisableInterrupt(64); g_VectorTable[64].pfnHandler=tickISR; timerRegs->CT...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/bsp/interrupts.c
<gh_stars>10-100 #include "../h/interrupts.h" #include "../h/regs.h" INTERRUPT_VECTOR g_VectorTable[BCM2835_INTC_TOTAL_IRQ]; /** * Enables all IRQ's in the CPU's CPSR register. **/ static void irqEnable() { __asm volatile("mrs r0,cpsr"); // Read in the cpsr register. __asm volatile("bic r0,r0,#0x80"); // Clea...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/bsp/barrier.h
#ifndef _BARRIER_H_ #define _BARRIER_H_ #define data_mem_barrier() __asm__ __volatile__ ("mcr p15, 0, %[reg], c7, c10, 5"::[reg] "r" (0)) #define data_sync_barrier() __asm__ __volatile__ ("mcr p15, 0, %[reg], c7, c10, 4"::[reg] "r" (0)) #endif // _BARRIER_H_
meesokim/Raspberry-uCOS-uCGUI
work-ucos/uCGUI/MemDev/GUIDEV_GetDataPtr.c
/********************************************************************* * SEGGER MICROCONTROLLER SYSTEME GmbH * * Solutions for real time microcontroller applications * ********************************************************************** * ...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/usbd.c
/****************************************************************************** * usbd/usbd.c * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * usbd.c contains code relating to the generic USB driver. USB * is designed such that this driver's interface would be virt...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/keyboard.c
<gh_stars>10-100 /****************************************************************************** * device/hid/keyboard.c * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * device/hid/keyboard.c contains code relating to USB hid keyboards. The * driver maintains a li...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/bsp/mailbox.c
<gh_stars>10-100 #include <stdint.h> #include "mmio.h" #include "mailbox.h" #include "barrier.h" #include "../ucgui/core/LCD.h" enum { MAILBOX_BASE = 0x2000B880, MAILBOX_POLL = 0x2000B890, // Receive without retrieving. R MAILBOX_SENDER = 0x2000B894, // Sender informat...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/csud/byteorder.h
/****************************************************************************** * platform/none/byteorder.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * platform/none/byteorder.h contains generic definitions for changing the * byte order of halfs to match the ...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/h/uart.h
#ifndef UART_H_ #define UART_H_ unsigned int uart_lcr ( void ); unsigned int uart_recv ( void ); void uart_send ( unsigned int ); void uart_flush ( void ); void hexstrings ( unsigned int ); void hexstring ( unsigned int ); void uart_init ( void ); void uart_string(char *); #endif /* UART_H_ */
meesokim/Raspberry-uCOS-uCGUI
work-ucos/h/interrupts.h
#ifndef _INTERRUPTS_H_ #define _INTERRUPTS_H_ #define BCM2835_INTC_TOTAL_IRQ 64 + 8 #define BCM2835_IRQ_ID_AUX 29 #define BCM2835_IRQ_ID_SPI_SLAVE 43 #define BCM2835_IRQ_ID_PWA0 45 #define BCM2835_IRQ_ID_PWA1 46 #define BCM2835_IRQ_ID_SMI 48 #define BCM2835_IRQ_ID_GPIO_0 49 #define BCM2835_IRQ_ID_GPI...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/ucos/OS_TASK.h
<reponame>meesokim/Raspberry-uCOS-uCGUI /* ********************************************************************************************************* * uC/OS-II * The Real-Time Kernel * TASK...
meesokim/Raspberry-uCOS-uCGUI
work-ucos/bsp/string.h
<filename>work-ucos/bsp/string.h #ifndef _STRING_H_ #define _STRING_H_ typedef unsigned int size_t; void *memset(void *ptr, int set, size_t size); void *memcpy(void *dest, const void *src, size_t count); char *itoa(int val); #endif // _STRING_H_
meesokim/Raspberry-uCOS-uCGUI
work-ucos/bsp/string.c
#include <stdint.h> #include <stdarg.h> //#include "uart.h" #include "string.h" void *memset(void *ptr, int set, size_t size) { char *p=ptr; while(size--){ *p++ = (int)set; } return p; } void *memcpy(void *dest, const void *src, size_t count) { char *tmp = dest; const char *s = src...
kotarf/locational-damage-plugin
LocationalDamage.h
#include "skse64/PapyrusNativeFunctions.h" #include <math.h> /* atan */ #define PI 3.14159265 #define M_PI_4 0.785398163397448309616 namespace LocDamageNamespace { const int head = 1; const int neck = 2; const int nape = 3; const int heart = 4; const int rShoulder = 5; const int lShoulder = 6; const i...
Capreyon/Test_harness
test.c
<filename>test.c /* * Test harness for bhyve instruction emulator */ #include <sys/types.h> #include <sys/errno.h> #include <assert.h> #include <stdio.h> #include <string.h> #include "vmm_stubs.h" static uint64_t vm_regs[VM_REG_LAST]; struct mem_cell { uint64_t addr; uint64_t val; }; int vm_get_register(v...
Capreyon/Test_harness
vmm_stubs.h
<filename>vmm_stubs.h /* * Identifiers for architecturally defined registers. */ enum vm_reg_name { VM_REG_GUEST_RAX, VM_REG_GUEST_RBX, VM_REG_GUEST_RCX, VM_REG_GUEST_RDX, VM_REG_GUEST_RSI, VM_REG_GUEST_RDI, VM_REG_GUEST_RBP, VM_REG_GUEST_R8, VM_REG_GUEST_R9, VM_REG_GUEST_R10, VM_REG_GUEST_R11, VM_REG_GUE...
Capreyon/Test_harness
iTest.c
//iTest for Automation of Tests // Just a prototype #include<stdio.h> #include<string.h> #include<assert.h> #define l printf("passed") #define m printf("failed") int statussummary(int r) { if(r==1) return 1; else return 0; } void ROFL() { printf("Hello world! I work with gitHub!"); } int main() { int check; ...
ReMVVM/ReMVVMiOSExtensions
ReMVVMExt/ReMVVMExt.h
// // ReMVVMiOSExt.h // ReMVVMiOSExt // // Created by <NAME> on 07/06/2019. // #import <UIKit/UIKit.h> //! Project version number for ReMVVMiOSExt. FOUNDATION_EXPORT double ReMVVMiOSExtVersionNumber; //! Project version string for ReMVVMiOSExt. FOUNDATION_EXPORT const unsigned char ReMVVMiOSExtVersionString[]; /...
celso-henrique/unipTheater
teatroUnip.c
<filename>teatroUnip.c #include <stdio.h> #include <stdlib.h> #include <time.h> // Definição das funções para referência nas funções void mainMenu(); void sellTicketMenu(); // Definição das sessões struct TheaterSession { char title[50]; int soldPlaces; int totalPlaces; int soldValues[30]; }; struct Theater...
shrutiramesh1988/tensorflow-upstream
tensorflow/compiler/xla/refcounting_hash_map.h
<reponame>shrutiramesh1988/tensorflow-upstream<gh_stars>0 /* Copyright 2019 The TensorFlow Authors. All Rights Reserved. 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/li...
steventfan/CS14
Week4/Node.h
<filename>Week4/Node.h<gh_stars>0 #ifndef NODE_H #define NODE_H #include <string> class Node { friend class BSTree; private: std::string dataString; int count; Node *left; Node *right; Node *parent; public: Node(std::string); Node& operator=(const No...
steventfan/CS14
Week9/Jug.h
#ifndef JUG_H #define JUG_H //using vector, stack libraries (Source: www.cplusplus.com) #include <iostream> #include <sstream> #include <string> #include <vector> #include <stack> #include <climits> class Vertex { friend class Jug; public: Vertex(int, int); private: int amountA; i...
steventfan/CS14
Week4/BSTree.h
#ifndef __BSTREE_H__ #define __BSTREE_H__ #include <string> #include "Node.h" class BSTree { private: Node *root; private: Node * search(const std::string &, Node *) const; void inOrder(Node *) const; void postOrder(Node *) const; void preOrder(Node *) const; void remove(Node *); public: BSTree(); v...
steventfan/CS14
Week5/Node.h
<filename>Week5/Node.h #ifndef __NODE_H #define __NODE_H #include <string> using namespace std; class Node { friend class Tree; private: string small; string large; Node *left; Node *middle; Node *right; Node *parent; // Add additional functions/variables here. Remember, you may not add any // ...
steventfan/CS14
Week8/WordEntry.h
#ifndef WORDENTRY_H #define WORDENTRY_H #include <string> #include <vector> #include <iostream> using namespace std; class WordEntry { private: string word; int numAppearances; int totalScore; public: WordEntry(const string &, int); void addNewAppearance(int); const string & getWord(); double getAverage();...