repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
SasaKaranovic/USB-Power-supply-Active-Load-Tester | Firmware/ISRFunctions.c | #include "main.h"
extern uint16_t ADC_val_VCC;
extern uint16_t DAC_Target_Voltage;
extern uint8_t CONF_CONTINUOS_SEND;
extern uint8_t CONF_CONTINUOS_DELAY;
extern uint8_t CONF_CONTINUOS_DELAY_TMP;
extern uint8_t ONDEMAND_PENDING;
void ISR_SetDAC(uint8_t *ISR_RX_BUFF)
{
//Convert ASCII numbers to hex integers
... |
SasaKaranovic/USB-Power-supply-Active-Load-Tester | Firmware/i2c.h | <gh_stars>1-10
#ifndef I2C_H
#define I2C_H
#define TRIS_I2C_SCK TRISBbits.TRISB6
#define TRIS_I2C_SDA TRISBbits.TRISB4
enum
{
I2C1_ACK_NOT_RECEIVED,
I2C1_SUCCESS,
I2C1_BUS_COLLISION,
I2C1_BUS_BUSY
}I2C1_STATE;
void I2C1_Setup();
uint8_t I2C1_SendByte(uint8_t data);
uint8_t I2C1_ReadByte();
vo... |
SasaKaranovic/USB-Power-supply-Active-Load-Tester | Firmware/main.c | /*
* Project : Programmable Active Dummy Load
* Code Version: 0.6 (see change log for more information and what's changed)
* Compile with: Microchip XC8 v1.31 or up (free compiler)
* Hardware : - PIC16F1829
* - MCP4726 (12bit DAC)
* - MCP6002 (2x Rail-to-Rail OP-Amp)
... |
SasaKaranovic/USB-Power-supply-Active-Load-Tester | Firmware/deviceconfig.c | #include "main.h"
void Device_SetUp()
{
#ifdef _PIC16F1829_H_
//Configure oscillator for 32MHz (8MHz 4xPLL)
OSCCONbits.SPLLEN = 1; //1 = 4xPLL Is enabled
OSCCONbits.IRCF = 0b1110; //1110 = 8 MHz or 32 MHz HF(see Section 5.2.2.1 ?HFINTOSC?)
OSCCONbits.SCS = 0b00; //00 = Clock det... |
SasaKaranovic/USB-Power-supply-Active-Load-Tester | Firmware/main.h | #ifndef HEADER_H
#define HEADER_H
#define INPUT 1
#define OUTPUT 0
#define DIGITAL 0
#define ANALOG 1
//Device Oscillator Frequency in Hz
#define _XTAL_FREQ 32000000
//Comment the line below to disable debugging mode!
#define _DEBUG_UART_ //Comment this line if you don't want the UART output
//The files we... |
SasaKaranovic/USB-Power-supply-Active-Load-Tester | Firmware/deviceconfig.h | #ifndef DEVICECONFIG_H
#define DEVICECONFIG_H
//Configuration bits for PIC16F1829
#ifdef _16F1829
// CONFIG1
#pragma config FOSC = INTOSC // Oscillator Selection (INTOSC oscillator: I/O function on CLKIN pin)
#pragma config WDTE = OFF // Watchdog Timer Enable (WDT disabled)
#pragma config PWRTE = OFF // ... |
SasaKaranovic/USB-Power-supply-Active-Load-Tester | Firmware/adc.h | <filename>Firmware/adc.h
#ifndef ADC_H
#define ADC_H
#define ADC_VCC_DIVIDER 4 //This is the reciproc value of your voltage divider (ex. Write value of VCC/VOUT)
#define PVREF_2048 0
#define PVREF_4096 1
void ADC_Config();
uint16_t ADC_ReadChannel(uint8_t channel);
uint16_t ADC_AverageChannel(uint8_t channel, u... |
insoonior/mfcc | src/libmfcc.c | /*
* libmfcc.c - Implementation of the standard MFCC algorithm in C using FFTW library for computing FFT
* Author - <NAME>
*
* MIT License
* Copyright (c) 2017 <NAME>
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "fftw3.h"
#include "libmfcc.h"
void mf... |
insoonior/mfcc | src/libmfcc.h | /*
* libmfcc.h - Header file for libmfcc.c
* Author - <NAME>
*
* MIT License
* Copyright (c) 2017 <NAME>
*/
#pragma once
#define DBL_EPSILON 2.2204460492503131e-16
#define PI 3.14159265358979323846264338327
void mfcc(double *mfcc_result, double *data, int samplingRate, int nfilt, int numcep, int ... |
insoonior/mfcc | Example/real_time_mfcc.c | <reponame>insoonior/mfcc
/*
* example.c - Driver code to demonstrate libmfcc working in real time
* Author - <NAME>
*
* Parts of this code has been taken from
* https://github.com/EddieRingle/portaudio/tree/master/examples/paex_record.c for demo puroses only
*/
#include <stdio.h>
#include <string.h>
... |
inexinferis/sXeMu | sxe13.1.pb-c.h | #ifndef PROTOBUF_C_sxe13_2e1_2eproto__INCLUDED
#define PROTOBUF_C_sxe13_2e1_2eproto__INCLUDED
#include "protobuf-c/protobuf-c.h"
PROTOBUF_C_BEGIN_DECLS
typedef struct _SXEUnknown1 SXEUnknown1;
typedef struct _SXEUnknown2 SXEUnknown2;
typedef struct _SXEUnknown3 SXEUnknown3;
typedef struct _SXEUnknown4 SXEUnknown4;
... |
inexinferis/sXeMu | protbufsxe.h | <gh_stars>1-10
#ifndef _SXEPROTBUF_H
#define _SXEPROTBUF_H
#include "protobuf-c/protobuf-c.h"
/**********************************************************************************************************/
/* SXE Unknown1 */
/*****... |
inexinferis/sXeMu | engine.h | <reponame>inexinferis/sXeMu
#ifndef ENGINE_H
#define ENGINE_H
#include "engine/wrect.h"
#include "engine/cl_dll.h"
#include "engine/pmtrace.h"
#include "engine/pm_defs.h"
#include "engine/cdll_int.h"
#include "engine/const.h"
#include "engine/progdefs.h"
#include "engine/eiface.h"
#include "engine/edict.h"
#include "e... |
inexinferis/sXeMu | protoextractor/protoextractor.c | <reponame>inexinferis/sXeMu
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <stdio.h>
#include "protobuf-c/protobuf-c.h"
#define GETVALUE(b,o) ((DWORD)b+(DWORD)o)
FILE *fp=NULL;
DWORD dwFileSize=0;
LPSTR pszFileText=NULL;
LPCSTR prefix="sxe";
BOOL LoadFile(LPSTR pszFileName){
HANDLE hFile;
BOOL bSucces... |
inexinferis/sXeMu | CRC32.h | #ifndef CRC32_H
#define CRC32_H
#include <windows.h>
VOID InitCRC32Table();
ULONG CRC32(LPCTSTR text);
BOOL Check(LPCTSTR text,ULONG crc);
unsigned char *Base64Decode(char const* encoded_string,unsigned char *result,unsigned int *out_len);
char *Base64Encode(unsigned char const* bytes_to_encode,unsigned int in_len,c... |
inexinferis/sXeMu | engine/utils.h | <reponame>inexinferis/sXeMu<gh_stars>1-10
/***
*
* Copyright (c) 1999, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this sou... |
jeremybris/Play- | Source/ui_win32/MemoryViewMIPS.h | <reponame>jeremybris/Play-
#pragma once
#include "../MIPS.h"
#include "../VirtualMachine.h"
#include "VirtualMachineStateView.h"
#include "MemoryView.h"
class CMemoryViewMIPS : public CMemoryView, public CVirtualMachineStateView
{
public:
CMemoryViewMIPS(HWND, const RECT&, CVirtualMachine&, CMIPS*);
virtual ~CMemor... |
jeremybris/Play- | Source/ui_win32/FrameDebugger/Vu1ProgramView.h | <reponame>jeremybris/Play-
#pragma once
#include "win32/Window.h"
#include "win32/Splitter.h"
#include "FrameDebuggerTab.h"
#include "../DisAsmVu.h"
#include "../MemoryViewMIPS.h"
#include "../RegViewVu.h"
#include "Vu1Vm.h"
#include "TabHost.h"
#include "GifPacketView.h"
class CVu1ProgramView : public Framework::Win... |
jeremybris/Play- | Source/ui_win32/MemoryViewMIPSWnd.h | <reponame>jeremybris/Play-<gh_stars>1-10
#pragma once
#include "win32/MDIChild.h"
#include "win32/Edit.h"
#include "MemoryViewMIPS.h"
#include "../VirtualMachine.h"
#include "VirtualMachineStateView.h"
class CMemoryViewMIPSWnd : public Framework::Win32::CMDIChild, public CVirtualMachineStateView
{
public:
CMemoryVie... |
jeremybris/Play- | Source/ui_win32/DebugView.h | <reponame>jeremybris/Play-<filename>Source/ui_win32/DebugView.h
#pragma once
#include <string>
#include <functional>
#include "DisAsmWnd.h"
#include "MemoryViewMIPSWnd.h"
#include "RegViewWnd.h"
#include "CallStackWnd.h"
#include "../VirtualMachine.h"
#include "VirtualMachineStateView.h"
class CDebugView : public boo... |
jeremybris/Play- | tools/PsfPlayer/Source/PsfVm.h | #ifndef _PSFVM_H_
#define _PSFVM_H_
#include "Types.h"
#include "MIPS.h"
#include "SoundHandler.h"
#include "PsfVmSubSystem.h"
#include "VirtualMachine.h"
#include "Debuggable.h"
#include "MailBox.h"
#include <thread>
class CPsfVm : public CVirtualMachine, public boost::signals2::trackable
{
public:
t... |
jeremybris/Play- | Source/ui_win32/Debugger.h | <gh_stars>1-10
#pragma once
#include "win32/MDIFrame.h"
#include "ELFView.h"
#include "FunctionsView.h"
#include "ThreadsViewWnd.h"
#include "DebugView.h"
#include "./Debugger/AddressListViewWnd.h"
#include "../PS2VM.h"
class CDebugger : public Framework::Win32::CMDIFrame, public boost::signals2::trackable
{
public:
... |
jeremybris/Play- | Source/ui_win32/ThreadCallStackViewWnd.h | <reponame>jeremybris/Play-<gh_stars>1-10
#ifndef _THREADCALLSTACKVIEWWND_H_
#define _THREADCALLSTACKVIEWWND_H_
#include "win32/Dialog.h"
#include "win32/Button.h"
#include "win32/ListBox.h"
#include "win32/Layouts.h"
#include "../MIPS.h"
#include "../BiosDebugInfoProvider.h"
class CThreadCallStackViewWnd : public Fra... |
zhengbomo/sqlcipherDemo | SqlcipherDemo/SqlcipherDemo/EncryptFMDB/ColumnPropertyMappingDelegate.h | //
// ColumnPropertyMappingDelegate.h
// FaciShare
//
// Created by ZhengXiankai on 15/7/20.
// Copyright (c) 2015年 facishare. All rights reserved.
//
#import <Foundation/Foundation.h>
//实现数据库列名到model属性名的映射
@protocol ColumnPropertyMappingDelegate <NSObject>
@required
- (NSDictionary *)columnPropertyMapping;
@en... |
zhengbomo/sqlcipherDemo | SqlcipherDemo/SqlcipherTool/SqlcipherTool/ViewController.h | //
// ViewController.h
// SqlcipherTool
//
// Created by ZhengXiankai on 16/4/18.
// Copyright © 2016年 bomo. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface ViewController : NSViewController
@end
|
zhengbomo/sqlcipherDemo | SqlcipherDemo/SqlcipherDemo/EncryptFMDB/FMEncryptDatabase.h | <gh_stars>10-100
//
// FMEncryptDatabase.h
// FmdbDemo
//
// Created by ZhengXiankai on 15/7/31.
// Copyright (c) 2015年 ZhengXiankai. All rights reserved.
//
#import "FMDatabase.h"
@interface FMEncryptDatabase : FMDatabase
+ (instancetype)databaseWithPath:(NSString*)aPath encryptKey:(NSString *)encryptKey;
- (i... |
zhengbomo/sqlcipherDemo | SqlcipherDemo/Pods/Target Support Files/XCTestCaseAsync/XCTestCaseAsync-umbrella.h | <reponame>zhengbomo/sqlcipherDemo
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "XCTestCase+Async.h"
FOUNDATION_EXPORT double XCTestCaseAsyncVersionNumber;
FOUNDA... |
zhengbomo/sqlcipherDemo | SqlcipherDemo/SqlcipherDemo/EncryptFMDB/FMEncryptHelper.h | //
// FMEncryptHelper.h
// FmdbDemo
//
// Created by ZhengXiankai on 15/8/26.
// Copyright (c) 2015年 ZhengXiankai. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface FMEncryptHelper : NSObject
/** encrypt sqlite database (same file) */
+ (BOOL)encryptDatabase:(NSString *)path encryptKey:(NSStri... |
zhengbomo/sqlcipherDemo | SqlcipherDemo/SqlcipherTool/SqlcipherTool/AppDelegate.h | <reponame>zhengbomo/sqlcipherDemo
//
// AppDelegate.h
// SqlcipherTool
//
// Created by ZhengXiankai on 16/4/18.
// Copyright © 2016年 bomo. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@end
|
zhengbomo/sqlcipherDemo | SqlcipherDemo/SqlcipherDemo/Data/DbService.h | //
// DbService.h
// SqlcipherDemo
//
// Created by ZhengXiankai on 16/4/17.
// Copyright © 2016年 bomo. All rights reserved.
//
#import "FMDB.h"
@interface DbService : NSObject
- (instancetype)initWithPath:(NSString *)path encryptKey:(NSString *)encryptKey;
- (BOOL)tableExists:(NSString *)tableName;
/** query... |
zhengbomo/sqlcipherDemo | SqlcipherDemo/SqlcipherDemo/EncryptFMDB/FMEncryptDatabaseQueue.h | <filename>SqlcipherDemo/SqlcipherDemo/EncryptFMDB/FMEncryptDatabaseQueue.h
//
// FMEncryptDatabaseQueue.h
// FmdbDemo
//
// Created by ZhengXiankai on 15/7/31.
// Copyright (c) 2015年 ZhengXiankai. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FMDatabase;
@interface FMEncryptDatabaseQueue : NSOb... |
zhengbomo/sqlcipherDemo | SqlcipherDemo/SqlcipherDemo/Data/DbTest.h | <filename>SqlcipherDemo/SqlcipherDemo/Data/DbTest.h
//
// DbTest.h
// SqlcipherDemo
//
// Created by ZhengXiankai on 16/4/18.
// Copyright © 2016年 bomo. All rights reserved.
//
#import "DbService.h"
@interface DbTest : NSObject
+ (BOOL)createTable:(DbService *)service;
+ (void)insertPeople:(DbService *)service;... |
zhengbomo/sqlcipherDemo | SqlcipherDemo/SqlcipherDemo/Data/PersonModel.h | //
// PersonModel.h
// FmdbDemo
//
// Created by ZhengXiankai on 15/7/21.
// Copyright (c) 2015年 ZhengXiankai. All rights reserved.
//
#import "ColumnPropertyMappingDelegate.h"
@interface PersonModel : NSObject <ColumnPropertyMappingDelegate>
@property (nonatomic, assign) NSInteger peopleId;
@property (nonatomic... |
ryandeng1/SCALE-MAMBA | src/Input_Output/File_Input_Output.h | <reponame>ryandeng1/SCALE-MAMBA
/*
Copyright (c) 2017, The University of Bristol, Senate House, Tyndall Avenue, Bristol, BS8 1TH, United Kingdom.
Copyright (c) 2018, <NAME>, <NAME> 10, bus 2452, B-3001 Leuven-Heverlee, Belgium.
All rights reserved
*/
#ifndef _FileInputOutput
#define _FileInputOutput
/* A simple IO cl... |
mb3h/cmdg | src/cmdg.h | #ifndef CMDG_H_INCLUDED__
#define CMDG_H_INCLUDED__
typedef struct Cmdg__ Cmdg;
void cmdg_dtor (Cmdg *m_);
Cmdg *cmdg_ctor (View *view, uint16_t ws_col, uint32_t n_max);
bool cmdg_connect (Cmdg *m_, const char *hostname, uint16_t port, const char *ppk_path);
uint32_t cmdg_reput (Cmdg *m_, uint32_t itr_base, int offse... |
mb3h/cmdg | src/ssh2.c | <reponame>mb3h/cmdg
#ifdef WIN32
# define uint32_t DWORD
# define uint8_t BYTE
# define uint16_t WORD
// TODO
#else
# define _XOPEN_SOURCE 500 // usleep (>= 500)
# include <features.h>
# include <fcntl.h>
# include <unistd.h>
# include <pthread.h> // pthread_create
# include <netinet/in.h>
# include <arpa/inet.h>
#en... |
mb3h/cmdg | src/conf.c | #define _GNU_SOURCE // strtoul
#include <features.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <fcntl.h>
#include <pwd.h>
#include <unistd.h>
#include <sys/stat.h>
#include "defs.h"
#include "conf.h"
extern FILE *stderr_old;
#include "vt100.h"
typedef ui... |
mb3h/cmdg | src/gtkview.c | <filename>src/gtkview.c
#ifdef WIN32
#else
# define _XOPEN_SOURCE 500 // usleep (>= 500)
# include <features.h>
# include <endian.h>
# include <gtk/gtk.h>
#endif
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include <malloc.h>
#include <memory.h>
#include <alloca.h>
#include "defs.h"
#include "gtkview.h"
... |
mb3h/cmdg | src/base64.c | #include <stdio.h> // FILE
#include "defs.h"
#include "base64.h"
#include "vt100.h"
extern FILE *stderr_old;
typedef uint32_t u32;
typedef uint8_t u8;
size_t base64_decode (const char *src, void *dst_, size_t cb)
{
u8 *dst, *end;
dst = (u8 *)dst_, end = dst + cb;
while (dst < end) {
u32 u;
u = 0;
int n;
for (n... |
mb3h/cmdg | src/sha1.h | <filename>src/sha1.h<gh_stars>1-10
#ifndef SHA1_H_INCLUDED__
#define SHA1_H_INCLUDED__
void sha1 (const void *input, size_t len, uint8_t output[20]);
void sha1_core (uint32_t digest[5], const uint8_t input[64]);
struct sha1 {
uint8_t priv[128];
};
bool sha1_init (struct sha1 *ctx, size_t len);
void sha1_update (struc... |
mb3h/cmdg | src/aes.h | <gh_stars>1-10
#ifndef AES_H_INCLUDED__
#define AES_H_INCLUDED__
struct aes {
uint8_t priv[128];
};
bool aes_init (struct aes *ctx, size_t len);
bool aes_setkey (struct aes *ctx, const void *key, size_t bitlen);
void aes_setiv (struct aes *ctx, const uint8_t iv128[16]);
bool aes_cbc_decrypt (struct aes *ctx, const vo... |
mb3h/cmdg | src/lock.h | #ifndef LOCK_H_INCLUDED__
#define LOCK_H_INCLUDED__
#ifdef WIN32
// TODO implements by CriticalSection.
#else // gnu-linux
struct Lock__ {
void *priv;
};
typedef struct Lock__ Lock;
void lock_dtor (Lock *m_);
bool lock_ctor (Lock *m_);
void lock_lock (Lock *m_);
void lock_unlock (Lock *m_);
#endif
#endif // LOCK_... |
mb3h/cmdg | src/defs.h | <filename>src/defs.h
#ifndef DEFS_H_INCLUDED__
#define DEFS_H_INCLUDED__
#include <stdint.h> // uintNN_t
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#else
# define bool int
# define false 0
# define true 1
#endif
#include <stddef.h> // size_t
#define unixerror strerror
#ifndef min
# define min(a,b) ((a) < (b) ? (a) :... |
mb3h/cmdg | src/intv.h | <reponame>mb3h/cmdg
#ifndef INTV_H_IS_INCLUDED__
#define INTV_H_IS_INCLUDED__
struct intv {
size_t bitused;
uint8_t priv[4];
uint32_t v[1];
};
void intv_security_erase (struct intv *this_);
void intv_dtor (struct intv *this_);
struct intv *intv_ctor (size_t bitmax);
bool intv_load_u8be (struct intv *this_, const vo... |
mb3h/cmdg | src/conf.h | <gh_stars>1-10
#ifndef CONF_H_INCLUDED__
#define CONF_H_INCLUDED__
/* Tuning limitation of memory using.
Oversize image is loaded as clipped without full-size.
(TODO: clipping not implemented now, oversize image cause BREAKING HEAP.)
*/
#define XPIXELS_MAX 1920
#define YPIXELS_MAX 1200
/* Tuning streaming perfor... |
mb3h/cmdg | src/iid.h | #ifndef IID_H_INCLUDED__
#define IID_H_INCLUDED__
typedef uint32_t IID; // TODO (easy impl now)
#define IID_IVt100Action 0x12345678
#define IID_IImage 0x12345679
#endif // IID_H_INCLUDED__
|
mb3h/cmdg | src/sha2.h | #ifndef SHA2_H_IS_INCLUDED__
#define SHA2_H_IS_INCLUDED__
struct sha256 {
uint8_t priv[128];
};
bool sha256_init (struct sha256 *ctx, size_t len);
void sha256_update (struct sha256 *ctx, const void *input, size_t len);
void sha256_finish (struct sha256 *ctx, uint8_t *output);
#endif //ndef SHA2_H_IS_INCLUDED__
|
mb3h/cmdg | src/iface/conn.h | #ifndef IFACE_CONN_H_INCLUDED__
#define IFACE_CONN_H_INCLUDED__
struct conn_i {
// IUnknown
void (*release) (void *this_);
// IFileDescriptor
bool (*connect) (void *this_, uint16_t ws_col, uint16_t ws_row);
ssize_t (*write) (void *this_, const void *buf, size_t cb);
ssize_t (*read) (void *this_, void *buf, size_... |
mb3h/cmdg | src/rand.h | #ifndef RAND_H_IS_INCLUDED__
#define RAND_H_IS_INCLUDED__
void random_init ();
void random_add_noise (const void *src, size_t cb);
void store_random (void *dst, size_t cb);
#endif //def RAND_H_IS_INCLUDED__
|
mb3h/cmdg | src/lock.c | #ifdef WIN32
#else
# include <pthread.h>
#endif
#include <malloc.h>
#include "defs.h"
#include "lock.h"
///////////////////////////////////////////////////////////////////////////////
#ifdef WIN32 // win32
// TODO implements by CriticalSection.
////////////////////////////////////////////////////////////////////////... |
mb3h/cmdg | src/base64.h | #ifndef BASE64_H_IS_INCLUDED__
#define BASE64_H_IS_INCLUDED__
size_t base64_decode (const char *src, void *dst_, size_t cb);
#endif //def BASE64_H_IS_INCLUDED__
|
mb3h/cmdg | src/ssh2.h | #ifndef SSH2CONN_H_INCLUDED__
#define SSH2CONN_H_INCLUDED__
#include "iface/conn.h"
struct ssh2 {
uint8_t priv[2048]; // TODO cannot set suitable value unless original sha2.c aes.c are implemented.
};
struct conn_i *ssh2_ctor (struct ssh2 *this_, size_t cb);
bool ssh2_preconnect (struct ssh2 *this_, uint16_t port, co... |
mb3h/cmdg | 2015-03-private/sample.c | <filename>2015-03-private/sample.c
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <io.h> // _setmode
#include <fcntl.h> // O_BINARY
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
typedef DWORD uint32_t;
typedef BYTE uint8_t;
typedef WORD uint16_t;
#define __BYTE_ORDER 1234
#pragma warn... |
mb3h/cmdg | src/rand.c | // TODO support thread safety
#ifdef WIN32
// TODO
#else
#include <sys/time.h> // timeval
#endif
#include <memory.h> // memcpy
#include "defs.h"
#define arraycountof(x) (sizeof(x)/sizeof((x)[0]))
#include "sha1.h"
typedef uint32_t u32;
typedef uint8_t u8;
// TODO integrate store_be32()/load_be32().
static u32 loa... |
mb3h/cmdg | src/cmdg.c | <reponame>mb3h/cmdg<gh_stars>1-10
#ifdef WIN32
#else
# define _XOPEN_SOURCE 500 // usleep (>= 500)
# include <features.h>
# include <gtk/gtk.h>
# include <fcntl.h> // O_RDWR
# include <termios.h> // termios ICANON ..
# include <sys/ioctl.h> // winsize TIOCSWINSZ
#endif
#if 1 // ndef READ_SHELL_THREAD
# include <sys/tim... |
mb3h/cmdg | src/sample.c | <filename>src/sample.c
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <io.h> // _setmode
# include <fcntl.h> // O_BINARY
# define __LITTLE_ENDIAN 1234
# define __BIG_ENDIAN 4321
typedef DWORD uint32_t;
typedef BYTE uint8_t;
typedef WORD uint16_t;
# define __BYTE_ORDER 1234
# pragma warni... |
mb3h/cmdg | src/escseq.c | <filename>src/escseq.c<gh_stars>1-10
#include <string.h>
#include <malloc.h>
#include <stdint.h>
#include <unistd.h>
#include "defs.h"
#include "vt100.h"
typedef uint32_t u32;
typedef uint8_t u8;
typedef uint16_t u16;
typedef char s8;
typedef short s16;
#define arraycountof(x) (sizeof(x)/sizeof((x)[0]))
sta... |
mb3h/cmdg | src/ptmx.h | <gh_stars>1-10
#ifndef PTMX_H_INCLUDED__
#define PTMX_H_INCLUDED__
#include "iface/conn.h"
struct ptmx {
uint8_t priv[4]; // gcc's value to i386
};
struct conn_i *ptmx_ctor (void *this_, size_t cb);
#endif // PTMX_H_INCLUDED__
|
mb3h/cmdg | src/gtkview.h | <gh_stars>1-10
#ifndef GTK_VIEW_H_INCLUDED__
#define GTK_VIEW_H_INCLUDED__
typedef struct decoder_callback__ decoder_callback;
struct decoder_callback__ {
void *(*malloc) (size_t size);
void *(*realloc) (void *ptr, size_t size);
void (*notify_size) (void *this_, uint32_t width, uint32_t height, void *noset_image);
... |
mb3h/cmdg | src/ptmx.c | #ifdef WIN32
# define uint16_t WORD
// TODO complete others.
#else
# define _XOPEN_SOURCE 600 // posix_openpt (>= 600)
# include <features.h>
# include <stdlib.h> // posix_openpt
# include <unistd.h> // fork
# include <fcntl.h> // O_RDWR
# include <termios.h> // termios ICANON ..
# include <sys/ioctl.h> // winsize TIO... |
mb3h/cmdg | src/fakeconn.h | #ifndef FAKECONN_H_INCLUDED__
#define FAKECONN_H_INCLUDED__
#include "iface/conn.h"
struct conn_i *vt100out_fifo_ctor (void *this_, size_t cb);
#endif // FAKECONN_H_INCLUDED__
|
mb3h/cmdg | src/intv.c | #include <stdlib.h> // exit
#include <memory.h>
#include <malloc.h>
#include "defs.h"
#define RUPDIV(d, src) (((src) +(d) -1) / (d))
#define ALIGN(n, src) (RUPDIV(n, src) * (n))
#include "intv.h"
extern FILE *stderr_old;
#define BITUSED32(msb__, dw) ((dw) ? 1 +( \
(0x00000002 & (dw) >> (msb__ = \
(0x0000000c & (dw... |
mb3h/cmdg | src/vt100.c | <reponame>mb3h/cmdg
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include "defs.h"
typedef uint8_t u8;
#include "conf.h"
#ifndef VT100_PARSE_MAXLEN_INIT
# define VT100_PARSE_MAXLEN_INIT 16
#endif
#define VT100_CALLBACK void
#include "vt100.h"
size_t esc_seq_parse (void *state, const char *buf, size_t len... |
mb3h/cmdg | src/vt100.h | <filename>src/vt100.h<gh_stars>1-10
#ifndef VT100_H_INCLUDED__
#define VT100_H_INCLUDED__
#define VT(x) "\033[3" #x "m"
#define VTO "\033[0m"
#define VTHI "\033[1m"
#define VTRR VTHI VT(1) // red
#define VTGG VTHI VT(2) // green
#define VTYY VTHI VT(3) // yellow
//#define VTBB VTHI VT(4) // blue
#define VTMM VTHI ... |
mb3h/cmdg | src/sample2.c | <reponame>mb3h/cmdg<gh_stars>1-10
#ifdef WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <io.h> // _setmode
# include <fcntl.h> // O_BINARY
# define __LITTLE_ENDIAN 1234
# define __BIG_ENDIAN 4321
typedef DWORD uint32_t;
typedef BYTE uint8_t;
typedef WORD uint16_t;
typedef int int32_t;
typedef... |
mb3h/cmdg | src/fakeconn.c | #define _XOPEN_SOURCE 500 // usleep (>= 500)
#include <features.h>
#include <stdio.h>
#include <memory.h>
#include "defs.h"
#include <unistd.h> // ssize_t
#include <sys/select.h> // fd_set
#include "fakeconn.h"
#define VT100BUF_MAX 40
typedef struct vt100out vt100out_s;
struct vt100out {
char buf[VT100BUF_MAX];
siz... |
jj4jj/gsdoas | include/logc.h | #pragma once
#include <string>
namespace google {
namespace protobuf {
class Message;
}
}
namespace gsdoas {
namespace logs {
using std::string;
struct logc_config_t {
string logd_msgq;
int channel_buffer_size;
string reporter_name;
int max_event_buffer_size;
logc_config_t(const char * msgq... |
jj4jj/gsdoas | logs/logc/logc.h | #pragma once
#include <string>
namespace google {
namespace protobuf {
class Message;
}
}
namespace gsdoas {
namespace logs {
using std::string;
struct logc_config_t {
string logd_msgq;
int channel_buffer_size;
string reporter_name;
int max_event_buffer_size;
logc_config_t(const char * msgq... |
greuze/sequence-game | c/sequencer.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#define MAX_SIZE 20
#define VALUES 4
#define DELAY 3
enum checkValues {
WRONG, OK
};
typedef enum checkValues check;
// Returns a value between 0 and values-1
int constrainedRandom(int values) {
return rand() % values;
}
void clearScree... |
francisengelmann/viz | src/geometry.h | <gh_stars>1-10
#ifndef VIZ_GEOMETRY_H
#define VIZ_GEOMETRY_H
#include <Eigen/Dense>
#include <vector>
namespace viz {
struct Point {
Eigen::Vector3d x;
unsigned char r,g,b;
};
struct Pointcloud {
std::vector<viz::Point> points;
};
struct BoundingBox{
Eigen::Vector3d dimensions;
Eigen::Vector3d translation... |
SullivanPrell/cs-452-lab-01 | lex.c | <gh_stars>0
%{
int _numargs = 10;
char *_args[10];
int _argcount = 0;
%}
WORD [a-zA-Z0-9\/\.-]+
SPECIAL [()><|&;*]
%%
_argcount = 0;
_args[0] = NULL;
{WORD}|{SPECIAL} {
if(_argcount < _numargs-1) {
_args[_argcount++] = (char *)strdup(yytext);
_args[_argcount] = NULL;
}
}
\... |
SullivanPrell/cs-452-lab-01 | test.c | #include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <errno.h>
extern char **getline();
main() {
int i;
char **args;
while(1) {
args = getline();
for(i = 0; args[i] != NULL; i++) {
printf("Argument %d: %s\n", i, args[i]);
}
}
}
|
SullivanPrell/cs-452-lab-01 | myshell.c | <reponame>SullivanPrell/cs-452-lab-01
/*
* This code implements a simple shell program
* It supports the internal shell command "exit",
* backgrounding processes with "&", input redirection
* with "<" and output redirection with ">".
* However, this is not complete.
*/
#include <stdio.h>
#include <stdli... |
jwillia3/BASIC | basic.h | <filename>basic.h
#include <setjmp.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define SYMSZ 16 /* SYMBOL SIZE */
#define PRGSZ 65536 /* PROGRAM SIZE */
#define STKSZ 256 /* STACK SIZE */
#define STRSZ 4096 /* STRING TABLE SIZE */
#define VARS 512 /* VARIABLE COUNT */
#de... |
mattwidmann/option | src/option.h | <reponame>mattwidmann/option<gh_stars>1-10
#ifndef OPTION_H
#define OPTION_H
typedef int (*option_callback_t)(char * argument, void * user_data);
typedef struct option {
option_callback_t on_option; /* callback called when option is parsed */
void * user_data; /* passed to callback */
char * long_name; /*... |
mattwidmann/option | test/option_test.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../src/option.h"
int unknown(char * argument, void * data)
{
printf("unrecognized: %s\n", argument);
return 0;
}
int literal(char * argument, void * data)
{
printf("literal: %s\n", argument);
return 0;
}
int plain(char * argument... |
mattwidmann/option | src/option.c | <filename>src/option.c
#include "option.h"
#include <stdio.h>
#include <string.h>
static int parse_short(option_list_t * options, int argc, char * * argv, int i);
static int parse_long(option_list_t * options, int argc, char * * argv, int i);
int options_process(option_list_t * options, int argc, char * * argv)
{
... |
vaporyproject/mix | src/Web3Server.h | /*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the... |
vaporyproject/mix | src/QVariableDeclaration.h | /*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the... |
vaporyproject/mix | src/QVariableDefinition.h | /*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the... |
vaporyproject/mix | src/DebuggingStateWrapper.h | <reponame>vaporyproject/mix
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-et... |
vaporyproject/mix | src/ContractCallDataEncoder.h | /*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the... |
vaporyproject/mix | src/QBigInt.h | <reponame>vaporyproject/mix<gh_stars>0
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later versio... |
vaporyproject/mix | src/MixClient.h | /*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the... |
vaporyproject/mix | src/ClientModel.h | /*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the... |
vaporyproject/mix | src/QContractDefinition.h | <gh_stars>0
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distri... |
Alucard93/blindctrl | src/WebRequestsHandler.h | <filename>src/WebRequestsHandler.h
#ifndef WEBREQUESTSHANDLER_H
#define WEBREQUESTSHANDLER_H
#include "UpdateHandler.h"
#include "Configuration.h"
#include "WifiSetup.h"
#include "ShutterControl.h"
#include "SetupView.h"
#include "SetupShutter.h"
#include "View.h"
#include "UpdateHandler.h"
#include <ESPAsyncWebServer... |
Alucard93/blindctrl | src/ShutterControl.h | <reponame>Alucard93/blindctrl<gh_stars>0
#ifndef SHUTTERCONTROL_H
#define SHUTTERCONTROL_H
#include <math.h>
#include <ESPUI.h>
#include "PinControl.h"
#include "View.h"
#include "WebRequestsHandler.h"
class ShutterControl: public PinControl, public View{
private:
static int status;
static long int time;
... |
Alucard93/blindctrl | src/PinControl.h | #ifndef PINCONTROL_H
#define PINCONTROL_H
#include <Arduino.h>
class PinControl{
protected:
static constexpr int upPin = 25;
static constexpr int downPin = 26;
static constexpr int buttonUp = 19;
static constexpr int buttonDown = 21;
static constexpr int bootpin = 0;
static constexpr int stdel... |
Alucard93/blindctrl | src/SetupView.h | <reponame>Alucard93/blindctrl<filename>src/SetupView.h
#ifndef SETUPVIEW_H
#define SETUPVIEW_H
#include "View.h"
#include "WifiSetup.h"
class SetupView : public View{
private:
static String* av_ap;
static int size;
static void handler(AsyncWebServerRequest *request);
static void error(AsyncWebServerRequest *r... |
Alucard93/blindctrl | src/WifiSetup.h | #ifndef WIFISETUP_H
#define WIFISETUP_H
#include <WiFi.h>
#include <WiFiClient.h>
#include <painlessMesh.h>
#define MESH_PREFIX "shtctrl"
#define MESH_PASSWORD "<PASSWORD>"
#define MESH_PORT 5555
class WifiSetup {
private:
static WiFiClient wifiClient;
static String av_ap[20];
static in... |
Alucard93/blindctrl | src/Configuration.h | #ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include <Preferences.h>
class Configuration {
private:
static constexpr char *name_mem = "BLNDR_CNF";
static constexpr char *ssid_key = "ssid";
static constexpr char *password_key = "pwd";
static constexpr char *api_key = "api";
static constexpr char *status_k... |
Alucard93/blindctrl | src/UpdateHandler.h | <reponame>Alucard93/blindctrl<filename>src/UpdateHandler.h
#ifndef UPDATEHANDLER_H
#define UPDATEHANDLER_H
#include <ArduinoOTA.h>
#include <ESPAsyncWebServer.h>
#include "PinControl.h"
class UpdateHandler{
public:
UpdateHandler();
void handle();
};
#endif
|
Alucard93/blindctrl | src/SetupShutter.h | #ifndef SETUPSHUTTER_H
#define SETUPSHUTTER_H
#include <ESPUI.h>
#include "PinControl.h"
#include "View.h"
class SetupShutter: public PinControl, public View{
private:
static int configureUp;
static int configureDown;
public:
SetupShutter(Configuration& cnf):View(cnf){}
void setup();
static void ... |
Alucard93/blindctrl | src/View.h | <reponame>Alucard93/blindctrl
#ifndef VIEW_H
#define VIEW_H
#include "Configuration.h"
#include <time.h>
#include <ESPAsyncWebServer.h>
class View{
protected:
static Configuration* _cnf;
static AsyncWebServer* webServer;
public:
View(Configuration& cnf);
static void pageError(AsyncWebServerRequest *request);
... |
Alucard93/blindctrl | src/MQTTHandler.h | #include <AsyncMqttClient.h>
#ifndef MQTTHandler
#define MQTTHandler
class MQTTHandler {
private:
AsyncMqttClient cli;
public:
MQTTHandler(int port=1883);
}
#endif
|
buaa0300/QSOpenGlESLearn | QSOpenGLES001/QSOpenGLES001/ViewController.h | <gh_stars>1-10
//
// ViewController.h
// QSOpenGLES001
//
// Created by zhongpingjiang on 17/2/16.
// Copyright © 2017年 shaoqing. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
buaa0300/QSOpenGlESLearn | QSOpenGLES001/QSOpenGLES001/QSDrawViewController.h | <gh_stars>1-10
//
// QSDrawViewController.h
// QSOpenGLES001
//
// Created by zhongpingjiang on 17/2/27.
// Copyright © 2017年 shaoqing. All rights reserved.
//
#import <GLKit/GLKit.h>
@interface QSDrawViewController : GLKViewController
@end
|
buaa0300/QSOpenGlESLearn | QSOpenGLES002_BlendTexture/QSOpenGLES002_BlendTexture/QSMulViewController.h | //
// QSMulViewController.h
// QSOpenGLES002_BlendTexture
//
// Created by zhongpingjiang on 17/3/1.
// Copyright © 2017年 shaoqing. All rights reserved.
//
#import <GLKit/GLKit.h>
@interface QSMulViewController : GLKViewController
@end
|
buaa0300/QSOpenGlESLearn | QSOpenGLESLearn002/QSOpenGLESLearn002/GLView/QSOpenGLView.h | <filename>QSOpenGLESLearn002/QSOpenGLESLearn002/GLView/QSOpenGLView.h
//
// QSOpenGLView.h
// QSOpenGLES002
//
// Created by zhongpingjiang on 17/2/16.
// Copyright © 2017年 shaoqing. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
@interface QSOpenGLView ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.