repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
tiagosr/thunk_tank | thunk_tank.h | <gh_stars>1-10
//
// Thunk Tank
// generic thunks for callback functions
// of libraries that don't give user-data
// pointers or contexts as parameters
//
// (c)2016 @tiagosr
//
// released under the MIT license
#pragma once
#include <type_traits>
#include <functional>
#include <array>
#include <memory>
#include <cs... |
nurture-farm/clevertap-ios-sdk | CleverTapSDK/CTPlistInfo.h | <filename>CleverTapSDK/CTPlistInfo.h
#import <Foundation/Foundation.h>
@interface CTPlistInfo : NSObject
@property (nonatomic, strong, readonly, nullable) NSString *accountId;
@property (nonatomic, strong, readonly, nullable) NSString *accountToken;
@property (nonatomic, strong, readonly, nullable) NSString *accountR... |
nurture-farm/clevertap-ios-sdk | CleverTapSDK/CleverTapInstanceConfigPrivate.h | <reponame>nurture-farm/clevertap-ios-sdk
#import <Foundation/Foundation.h>
@interface CleverTapInstanceConfig () <NSCopying> {}
@property (nonatomic, assign, readonly) BOOL isDefaultInstance;
@property (nonatomic, strong, readonly, nonnull) NSString *queueLabel;
@property (nonatomic, assign) BOOL isCreatedPostAppLaun... |
JeremyLikness/wasm-trees | src/trees.c | #include <math.h>
#include <stdlib.h>
#include <stdio.h>
unsigned char *buffer;
unsigned int width;
unsigned int height;
float a[4], b[4], c[4], d[4], e[4], f[4];
int p[4];
float *addresses[6];
int xscale, yscale, xoffset, yoffset;
void tree();
void fern();
void triangle();
void maze();
void koch();
int minx, maxx, m... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/3_Imaging_dct8x8_CUDAkernelQuantizationFloat/common_quantization.h | <gh_stars>1-10
#define BLOCK_SIZE 8
__constant__ short Q[] =
{
32, 33, 51, 81, 66, 39, 34, 17,
33, 36, 48, 47, 28, 23, 12, 12,
51, 48, 47, 28, 23, 12, 12, 12,
81, 47, 28, 23, 12, 12, 12, 12,
66, 28, 23, 12, 12, 12, 12, 12,
39, 23, 12, 12, 12, 12, 12, 12... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/6_Advanced_transpose_transposeFineGrained/common.h | #define TILE_DIM 16
#define BLOCK_ROWS 16
#define NUM_REPS 100
|
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/3_Imaging_imageDenoising_imageDenoising_nlm2_kernel/common.h | <gh_stars>1-10
#define KNN_WINDOW_RADIUS 3
#define NLM_WINDOW_RADIUS 3
#define NLM_BLOCK_RADIUS 3
#define KNN_WINDOW_AREA ( (2 * KNN_WINDOW_RADIUS + 1) * (2 * KNN_WINDOW_RADIUS + 1) )
#define NLM_WINDOW_AREA ( (2 * NLM_WINDOW_RADIUS + 1) * (2 * NLM_WINDOW_RADIUS + 1) )
#define INV_KNN_WINDOW_AREA ( 1.0f ... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/6_Advanced_scan_scanExclusiveShared/common.h | typedef unsigned int uint;
#define THREADBLOCK_SIZE 256
__device__ static __attribute__((always_inline)) uint scan1Inclusive(uint idata, volatile uint *s_Data, uint size)
{
uint pos = 2 * threadIdx.x - (threadIdx.x & (size - 1));
s_Data[pos] = 0;
pos += size;
s_Data[pos] = idata;
for (uint offset ... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/6_Advanced_reduction_reduce5/common.h | template<class T>
struct SharedMemory
{
__device__ __attribute__((always_inline)) operator T *()
{
extern __shared__ int __smem[];
return (T *)__smem;
}
__device__ __attribute__((always_inline)) operator const T *() const
{
extern __shared__ int __smem[];
retur... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/6_Advanced_threadFenceReduction_reduceMultiPass/common.h | <filename>tests/testsuite/CUDASamples/6_Advanced_threadFenceReduction_reduceMultiPass/common.h
template <unsigned int blockSize>
__device__ static __attribute__((always_inline)) void
reduceBlock(volatile float *sdata, float mySum, const unsigned int tid)
{
sdata[tid] = mySum;
__syncthreads();
// do reducti... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/3_Imaging_histogram_mergeHistogram256Kernel/common.h | #define HISTOGRAM64_BIN_COUNT 64
#define HISTOGRAM256_BIN_COUNT 256
#define UINT_BITS 32
typedef unsigned int uint;
typedef unsigned char uchar;
////////////////////////////////////////////////////////////////////////////////
// GPU-specific common definitions
//////////////////////////////////////////////////////////... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/2_Graphics_marchingCubes_classifyVoxel/common.h | <reponame>cs17resch01003/gpurepair<filename>tests/testsuite/CUDASamples/2_Graphics_marchingCubes_classifyVoxel/common.h
typedef unsigned char uchar;
typedef unsigned int uint;
__device__ static __attribute__((always_inline)) float tangle(float x, float y, float z);
__device__ static __attribute__((always_inline)) floa... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/6_Advanced_mergeSort_mergeRanksAndIndicesKernel/common_merge.h | <filename>tests/testsuite/CUDASamples/6_Advanced_mergeSort_mergeRanksAndIndicesKernel/common_merge.h
typedef unsigned int uint;
#define SHARED_SIZE_LIMIT 1024U
#define SAMPLE_STRIDE 128
#define umin(x,y) (x < y ? x : y)
__device__ static __attribute__((always_inline)) uint iDivUp(uint a, uint b)
{
return ((a ... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/7_CUDALibraries_MC_SingleAsianOptionP_computeValue/common.h | template <typename Real>
struct AsianOption
{
enum CallPut {Call, Put};
// Parameters
Real spot;
Real strike;
Real r;
Real sigma;
Real tenor;
Real dt;
// Value
Real golden;
Real value;
// Option type
CallPut type;
};
|
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/3_Imaging_dct8x8_CUDAkernel1DCT/common1.h | #define BLOCK_SIZE 8
#define BLOCK_SIZE2 64
#define BLOCK_SIZE_LOG2 3
#define BLOCK_SIZE2_LOG2 6
#define FMUL(x,y) ((x)*(y))
texture<float, 2, cudaReadModeElementType> TexSrc;
__constant__ float DCTv8matrix[] =
{
0.3535533905932738f, 0.4903926402016152f, 0.4619397662556434f, 0.4157348061... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/5_Simulations_particles_reorderDataAndFindCellStateD/common.h | <filename>tests/testsuite/CUDASamples/5_Simulations_particles_reorderDataAndFindCellStateD/common.h
// particles_kernel.cuh
#define USE_TEX 0
#if USE_TEX
#define FETCH(t, i) tex1Dfetch(t##Tex, i)
#else
#define FETCH(t, i) t[i]
#endif
//#include "vector_types.h"
typedef unsigned int uint;
// simulation parameters
st... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/3_Imaging_recursiveGaussian_d_transpose/common.h | typedef unsigned int uint;
__device__ float __saturatef(float);
__device__ static __attribute__((always_inline)) uint rgbaFloatToInt(float4 rgba);
__device__ static __attribute__((always_inline)) float4 rgbaIntToFloat(uint c);
#define CLAMP_TO_EDGE 1
// convert floating point rgba color to 32-bit integer
__device__ ... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/6_Advanced_eigenvalues_bisect_kernel_large_onei/common.h | #define MAX_THREADS_BLOCK 256
#define MAX_THREADS_BLOCK_SMALL_MATRIX 512
#define MIN_ABS_INTERVAL 5.0e-37
#define min(x,y) (x < y ? x : y)
#define max(x,y) (x < y ? y : x)
__device__ int sign_f(float);
////////////////////////////////////////////////////////////////////////////////
... |
cs17resch01003/gpurepair | tests/testsuite/CUDASamples/6_Advanced_sortingNetworks_oddEvenMergeGlobal/common.h | <reponame>cs17resch01003/gpurepair
typedef unsigned int uint;
#define SHARED_SIZE_LIMIT 1024U
#define UMUL(a, b) __umul24((a), (b))
#define UMAD(a, b, c) ( UMUL((a), (b)) + (c) )
__device__ static __attribute__((always_inline)) void Comparator(
uint &keyA,
uint &valA,
uint &keyB,
uint &valB,
uin... |
waddlesplash/SDL2X11Emulation | src/windowInternal.c | //
// Created by Sebastian on 08.10.2016.
//
#include "windowInternal.h"
#include "drawing.h"
#include "events.h"
#include "display.h"
Window SCREEN_WINDOW = None;
void initWindowStruct(WindowStruct* windowStruct, int x, int y, unsigned int width, unsigned int height,
Visual* visual, Colormap co... |
waddlesplash/SDL2X11Emulation | src/font.c | #include "X11/Xatom.h"
#include <stdio.h>
#include <wchar.h>
#include <sys/stat.h>
#include <errno.h>
#include <dirent.h>
#include <X11/Xlib.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include "errors.h"
#include "colors.h"
#include "resourceTypes.h"
#include "atoms.h"
#include "drawing.h"
#include "display.h"
... |
waddlesplash/SDL2X11Emulation | src/region.c | #include <inttypes.h>
#include <pixman.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xregion.h>
#include "drawing.h"
#include "resourceTypes.h"
typedef struct pixman_region16* pRegion;
#define GET_REGION(pixmanRegion) ((Region) (void*) pixmanRegion)
#define GET_P_REGION(region) ((pRegion) (void*) re... |
waddlesplash/SDL2X11Emulation | src/windowDebug.h | <gh_stars>0
//
// Created by Sebastian on 08.10.2016.
//
#ifndef WINDOWDEBUG_H
#define WINDOWDEBUG_H
#define DEBUG_WINDOWS 1
#ifdef DEBUG_WINDOWS
void printWindowsHierarchy(void);
void drawWindowDebugView();
void drawDebugWindowSurfacePlanes();
#endif /* DEBUG_WINDOWS */
#endif /* WINDOWDEBUG_H */
|
waddlesplash/SDL2X11Emulation | src/events.h | #ifndef _EVENTS_H_
#define _EVENTS_H_
#include <X11/Xlib.h>
#include <SDL2/SDL.h>
#define SEND_EVENT_CODE 1
#define INTERNAL_EVENT_CODE 2
#define HAS_EVENT_MASK(window, mask) ((GET_WINDOW_STRUCT(window)->eventMask & mask) == mask)
int initEventPipe(Display* display);
unsigned int convertModifierState(Uint16 mod);
B... |
waddlesplash/SDL2X11Emulation | src/display.c | <gh_stars>0
#include <math.h>
#define XLIB_ILLEGAL_ACCESS
#include <X11/Xlib.h>
#include "X11/Xutil.h"
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include "window.h"
#include "errors.h"
#include "events.h"
#include "colors.h"
#include "drawing.h"
#include "display.h"
#include "atoms.h"
#include "visual.h"
#includ... |
waddlesplash/SDL2X11Emulation | src/drawing.c | #include <X11/Xlib.h>
#include "drawing.h"
#include "errors.h"
#include "window.h"
#include "display.h"
#include "util.h"
#include "gc.h"
/*
* Flip all screen children and cause them to draw their content to the screen.
*/
void flipScreen() {
Window* children = GET_CHILDREN(SCREEN_WINDOW);
int i;
for (i = 0; i < ... |
waddlesplash/SDL2X11Emulation | src/pixmap.c | #include "X11/Xlib.h"
#include "drawing.h"
#include "errors.h"
#include "resourceTypes.h"
#include "display.h"
Pixmap XCreatePixmap(Display* display, Drawable drawable, unsigned int width, unsigned int height,
unsigned int depth) {
// https://tronche.com/gui/x/xlib/pixmap-and-cursor/XCreatePixmap... |
waddlesplash/SDL2X11Emulation | src/visual.c | <filename>src/visual.c
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "visual.h"
#include "util.h"
#include <SDL2/SDL.h>
#include "errors.h"
Visual* VISUAL_LIST = NULL;
size_t NUM_VISUALS = 0;
Bool initVisuals() {
// TODO: Check with sdl for real screen values
// https://wiki.libsdl.org/SDL_PixelForma... |
waddlesplash/SDL2X11Emulation | src/drawing.h | <reponame>waddlesplash/SDL2X11Emulation
#ifndef _DRAWING_H_
#define _DRAWING_H_
#include <SDL2/SDL.h>
#include "colors.h"
#include "resourceTypes.h"
#include "window.h"
#if SDL_BYTEORDER == SDL_BIG_ENDIAN || 1
# define DEFAULT_RED_MASK 0xFF000000
# define DEFAULT_GREEN_MASK 0x00FF0000
# define DEFAULT_BLUE_MASK... |
waddlesplash/SDL2X11Emulation | src/window.h | <filename>src/window.h<gh_stars>0
#ifndef _WINDOW_H_
#define _WINDOW_H_
#include <SDL2/SDL.h>
#include "windowDebug.h"
#include "resourceTypes.h"
#include "util.h"
typedef struct {
Atom property;
int dataFormat;
unsigned int dataLength;
Atom type;
unsigned char* data;
} WindowProperty;
typedef e... |
waddlesplash/SDL2X11Emulation | src/window.c | <reponame>waddlesplash/SDL2X11Emulation<gh_stars>0
#include <X11/Xlib.h>
#include "window.h"
#include "errors.h"
#include "drawing.h"
#include "atoms.h"
#include "events.h"
#include "display.h"
// TODO: Cover cases where top-level window is re-parented and window is converted to top-level window
int XDestroyWindow(Di... |
waddlesplash/SDL2X11Emulation | src/screensaver.c | #include <X11/Xlib.h>
#include <SDL2/SDL.h>
#include "errors.h"
#include "display.h"
int XResetScreenSaver(Display *display) {
// https://tronche.com/gui/x/xlib/window-and-session-manager/XResetScreenSaver.html
SDL_DisableScreenSaver();
SDL_EnableScreenSaver();
return 1;
}
int XForceScreenSaver(Disp... |
RadicalRoy/react-native-sound | RNSound/RNSound.h | <filename>RNSound/RNSound.h<gh_stars>1000+
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif
#import <AVFoundation/AVFoundation.h>
#if __has_include(<React/RCTEventEmitter.h>)
#import <React/RCTEventEmitter.h>
#else
#import "RCTEventEmitter.h"
#end... |
lukegarland/Brass2Go | Brass2Go.X/CRC.h | #ifndef B2G_CRC_H
#define B2G_CRC_H
/* ---------------------------- Global Variables ---------------------------- */
const char CRCTable[256] = {
0x00, 0x09, 0x12, 0x1B, 0x24, 0x2D, 0x36, 0x3F, 0x48, 0x41,
0x5A, 0x53, 0x6C, 0x65, 0x7E, 0x77, 0x19, 0x10, 0x0B, 0x02,
0x3D, 0x34, 0x2F, 0x26, 0x51, 0x58, 0x43... |
lukegarland/Brass2Go | LCD-Driver-Dev/LCD.X/Lab3_SD.h | <gh_stars>0
#ifndef LAB3_SD_H
#define LAB3_SD_H
#include <pic.h>
#include <stdbool.h>
#include "Lab3_CRC.h"
#include "Lab3_SPI.h"
/* ---------------------------- Global Variables ---------------------------- */
char GLBL_Resp8 = 0xFF;
char GLBL_Resp40[5] = {0xFF,0xFF,0xFF,0xFF,0xFF};
char GLBL_WriteBuffer[512];
char... |
lukegarland/Brass2Go | Brass2Go.X/wave.c | #include "config.h"
#include "wave.h"
#include "SD.h"
#include "SPI.h"
#include "main.h"
bool fourCCeq(FourCC a, FourCC b) {
for (char i=0; i<4; i++) {
if (a[i] != b[i]) return false;
}
return true;
}
void readBytes(char* dest, int len) {
for (int i=0; i<len; i++) {
SPI_READ(dest[i]);... |
lukegarland/Brass2Go | LCD-Driver-Dev/LCD.X/Lab3_SPI.h | #ifndef LAB3_SPI_H
#define LAB3_SPI_H
#include <pic.h>
/* ---------------------------- Global Variables ---------------------------- */
/* -------------------------- Function Prototypes --------------------------- */
// REQUIRES: Nothing.
// PROMISES: Configure SPI peripheral with RC2 = SCLK, RC3 = MISO, RC4 = MOS... |
lukegarland/Brass2Go | Brass2Go.X/timer.c | <filename>Brass2Go.X/timer.c
#include "config.h"
#include "timer.h"
// REQUIRES: Nothing
// PROMISES: Set the system clock speed to 32MHz.
// Configure Timer2 to trigger with the given period in microseconds.
// Start Timer2. It will automatically restart when it finishes.
int timer_Init(long rate)... |
lukegarland/Brass2Go | Brass2Go.X/config.h | <reponame>lukegarland/Brass2Go
#ifndef B2G_CONFIG_H
#define B2G_CONFIG_H
#define _XTAL_FREQ 32000000
#pragma config FOSC = INTOSC // Oscillator Selection Bits->INTOSC oscillator: I/O function on CLKIN pin
#pragma config WDTE = OFF // Watchdog Timer Enable->WDT disabled
#pragma config PLLEN = ON // Phase Lock ... |
lukegarland/Brass2Go | Brass2Go.X/error.h | #ifndef B2G_ERROR_H
#define B2G_ERROR_H
#endif |
lukegarland/Brass2Go | Brass2Go.X/SPI.c | <gh_stars>0
#include "SPI.h"
// REQUIRES: Nothing.
// PROMISES: Configure SPI peripheral with RC2 = SCLK, RC3 = MISO, RC4 = MOSI
// Configure pin RC7 as digital output (CS for SD Card)
// Configure SPI Baud Rate to Fosc / 4
void SPI_Init(void) {
//Configure Pin C2 as Serial Clock
TRISC2 = 0... |
lukegarland/Brass2Go | LCD-Driver-Dev/LCD.X/LCD_Drivers.c | <reponame>lukegarland/Brass2Go
#include <pic16f1778.h>
#include "LCD_Drivers.h"
#include "Lab3_Config.h"
#include "Lab3_SPI.h"
#include <xc.h>
#include <pic.h>
void LCD_Init(void) {
LCD_Select();
TRISC5 = 0; //Set RC5 to digital output
__delay_ms(50);
LCD_CMD_MODE();
LCD_Write(0b00111000)... |
lukegarland/Brass2Go | Brass2Go.X/buttons.c | /*
* File: buttons.c
* Author: <NAME>
*
* Created on March 28, 2019, 4:03 PM
*/
#include <xc.h>
#include "buttons.h"
void BrassButtons_Init(void)
/* REQUIRES: Nothing
*
* PROMISES: Sets Pins RB1, RB2, RB3 as digital output
*/
{
ANSELB = 0;
TRISB1 = 1;
TRISB2 = 1;
TRISB3 = 1;
r... |
lukegarland/Brass2Go | Brass2Go.X/SD.h | #ifndef B2G_SD_H
#define B2G_SD_H
#include <pic.h>
#include <stdbool.h>
#include "CRC.h"
#include "SPI.h"
#define SD_CS_PIN LATC7
#define SD_CD_PIN PORTAbits.RA7
/* ------------------ #define based Function Declarations ------------------- */
#define READ_BYTE() { \
SSP1BUF = 0xFF; \
... |
lukegarland/Brass2Go | Brass2Go.X/SPI.h | #ifndef LAB3_SPI_H
#define LAB3_SPI_H
#include <pic.h>
/* ---------------------------- Global Variables ---------------------------- */
/* -------------------------- Function Prototypes --------------------------- */
// REQUIRES: Nothing.
// PROMISES: Configure SPI peripheral with RC2 = SCLK, RC3 = MISO, RC4 = MOS... |
lukegarland/Brass2Go | Brass2Go.X/DAC.h | <filename>Brass2Go.X/DAC.h
#ifndef B2G_DAC_H
#define B2G_DAC_H
#include "wave.h"
typedef struct {
char b[4];
}Str;
//void DAC_Write_16(SampleFrame sample, unsigned short chans);
void DAC_Write_16(SampleFrame *sample, unsigned short chans);
void DAC_Write_8(unsigned char level);
void DAC_Init(void);
#endif |
lukegarland/Brass2Go | Brass2Go.X/SD.c | <filename>Brass2Go.X/SD.c
#include "config.h"
#include "SD.h"
//REQUIRES: SPI interface initialized using SPI_Init.
// SD card is present
//PROMISES: Performs the SD Card initialization process over SPI:
// 1. Sets CS high and writes 0xFF for 80 cycles.
// 2. Send CMD0 with argument 0x000000... |
lukegarland/Brass2Go | Brass2Go.X/main.c | #include <pic.h>
#include <xc.h>
#include <stdio.h>
#include "LCD.h"
#include "main.h"
#include "config.h"
#include "timer.h"
#include "SPI.h"
#include "SD.h"
#include "DAC.h"
#include "wave.h"
#include "error.h"
#include "buttons.h"
unsigned char sdata_lo;
unsigned char sdata_hi;
bool check_button... |
lukegarland/Brass2Go | Brass2Go.X/DAC.c | <filename>Brass2Go.X/DAC.c
/*
* File: DAC.c
* Author: Toshi
*
* Created on March 26, 2019, 12:32 AM
*/
#include <xc.h>
#include <pic.h>
#include "config.h"
#include "DAC.h"
/*
* Unused functions
*
* These were initially used, but are now copied directly into the
* write DAC interrupt in order to improve ... |
lukegarland/Brass2Go | Brass2Go.X/timer.h | #ifndef B2G_TIMER_H
#define B2G_TIMER_H
int timer_Init(long rate);
#endif |
lukegarland/Brass2Go | LCD-Driver-Dev/LCD.X/Lab3_Main.c | #include <pic.h>
#include "Lab3_Config.h"
#include "Lab3_SPI.h"
#include "Lab3_SD.h"
#include "LCD_Drivers.h"
void main(void) {
TRISCbits.TRISC6 = 0;
TRISCbits.TRISC7 = 0;
// Set the system clock speed to 32MHz and wait for the ready flag.
OSCCON = 0xF4;
while(OSCSTATbits.HFIOFR == 0);
//... |
lukegarland/Brass2Go | LCD-Driver-Dev/LCD.X/Lab3_Config.h | <gh_stars>0
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#define _XTAL_FREQ 32000000
#pragma config FOSC = INTOSC // Oscillator Selection Bits->INTOSC oscillator: I/O function on CLKIN pin
#pragma config WDTE = OFF // Watchdog Timer Enable->WDT disabled
#pragma config PLLEN = ON // Phase Lock Loop enable->... |
lukegarland/Brass2Go | Brass2Go.X/wave.h | <filename>Brass2Go.X/wave.h<gh_stars>0
#ifndef WAVE_FILE
#define WAVE_FILE
//#include <stdint.h>
#include <xc.h>
#define WAVE_FORMAT_PCM 0x0001
#define SOFTWARE_TAG "Group 11"
#define RIFF_CC "RIFF"
#define WAVE_CC "WAVE"
#define FMT_CC "fmt "
#define DATA_CC "data"
#define LIST_CC "LIST"
#define INFO_CC "INFO"
#d... |
lukegarland/Brass2Go | Brass2Go.X/LCD.c | <reponame>lukegarland/Brass2Go
#include <xc.h>
#include <pic.h>
#include "LCD.h"
#include "config.h"
void LCD_Init(void) {
LCD_SELECT();
TRISC5 = 0; //Set RC5 to digital output
delay(50);
LCD_CMD_MODE();
LCD_Write(0b00111000);//Function set
LCD_Write(0b00001111);//Display ON
... |
lukegarland/Brass2Go | LCD-Driver-Dev/LCD.X/LCD_Drivers.h | <reponame>lukegarland/Brass2Go
/*
* File: LCD_Drivers.h
* Author: lukeg
*
* Created on April 4, 2019, 10:22 AM
*/
#ifndef LCD_DRIVERS_H
#define LCD_DRIVERS_H
#define RS_PIN PORTCbits.RC5
#define LCD_CMD_MODE() RS_PIN = 0
#define LCD_DATA_MODE() RS_PIN = 1
#define LCD_CLS 0x01
#define LCD_HOME 0x02
#define LC... |
lukegarland/Brass2Go | Brass2Go.X/buttons.h | /*
* File: buttons.h
* Author: <NAME>
*
* Created on March 28, 2019, 4:02 PM
*/
#ifndef BUTTONS_H
#define BUTTONS_H
void BrassButtons_Init(void);
unsigned char BrassButtons_Pressed(void);
unsigned char Check_Buttons(unsigned char encoded_byte);
#define ONRED LATBbits.LATB5 = 1;
#define OFFRED LATBbits.LAT... |
lukegarland/Brass2Go | Brass2Go.X/main.h | <gh_stars>0
/*
* File: main.h
* Author: luke
*
* Created on April 13, 2019, 4:33 PM
*/
#ifndef MAIN_H
#define MAIN_H
#define DAC_INT(a) PIE1bits.TMR2IE = a // DAC interrupt enable / disable
// Super loop task function prototypes
void task_playing(void);
void task_analysis(void);
void task_startScreen(void... |
lukegarland/Brass2Go | Brass2Go.X/LCD.h | <reponame>lukegarland/Brass2Go
#ifndef B2G_LCD_H
#define B2G_LCD_H
#define LCD_RS_PIN LATC5
#define LCD_CS_PIN LATC6
#define LCD_CMD_MODE() LCD_RS_PIN = 0
#define LCD_DATA_MODE() LCD_RS_PIN = 1
#define LCD_CLS 0x01
#define LCD_NEWLINE 0xC0
#define LCD_HOME 0x02
#define LCD_SHL 0x10
#define LCD_SHR 0x1... |
latex2ai/LaTeX2AI | l2a/src/tests/test_file_system.cpp | // -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without r... |
latex2ai/LaTeX2AI | l2a/src/tests/test_base64.cpp | // -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without r... |
latex2ai/LaTeX2AI | l2a/src/l2a_forms/l2a_forms.cpp | <reponame>latex2ai/LaTeX2AI
// -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
... |
latex2ai/LaTeX2AI | l2a/src/tests/test_utility.cpp | <filename>l2a/src/tests/test_utility.cpp
// -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Softwar... |
latex2ai/LaTeX2AI | l2a/src/l2a_global/l2a_version.cpp | // -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without r... |
latex2ai/LaTeX2AI | l2a/src/l2a_plugin.cpp | // -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without r... |
latex2ai/LaTeX2AI | l2a/src/l2a_latex/l2a_latex.cpp | <gh_stars>10-100
// -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the S... |
latex2ai/LaTeX2AI | l2a/src/tests/test_string_functions.cpp | // -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without r... |
latex2ai/LaTeX2AI | l2a/src/tests/testing.cpp | // -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without r... |
latex2ai/LaTeX2AI | l2a/src/utility/string_functions.cpp | <gh_stars>10-100
// -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the S... |
latex2ai/LaTeX2AI | l2a/src/tests/testing_utility.cpp | // -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without r... |
latex2ai/LaTeX2AI | l2a/src/l2a_property/l2a_property.cpp | <reponame>latex2ai/LaTeX2AI<gh_stars>10-100
// -----------------------------------------------------------------------------
// MIT License
//
// Copyright (c) 2020 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Soft... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/tests.cpp | #define CATCH_CONFIG_RUNNER
#include <catch.hpp>
#include "vec2.hpp"
#include "mat2.hpp"
#include "color.hpp"
#include "classes/circle.hpp"
#include "classes/rectangle.hpp"
#define _USE_MATH_DEFINES //have to do this to get access to pi constant
#include <math.h>
TEST_CASE("Vec2ConstructorTests")
{
Vec2 a;
Vec2 b{... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/classes/rectangle.hpp | <gh_stars>0
#ifndef RECTANGLE_HPP
#define RECTANGLE_HPP
#include "../vec2.hpp"
#include "../color.hpp" //is there any difference between using / and \ ?
#include "../window.hpp"
namespace myShapes{ //prevents naming conflict with stdcall library in tests.cpp
class Rectangle //parallel to axis, no rotation
{
Vec2... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/example.cpp | <filename>source/example.cpp<gh_stars>0
#include "window.hpp"
#include <GLFW/glfw3.h>
#include <utility>
#include <cmath>
#include "classes/circle.hpp"
#include "classes/rectangle.hpp"
int main(int argc, char* argv[])
{
Window win{std::make_pair(800,800)};
//My inits
myShapes::Circle c1{ {300, 300}, {100}, {2... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/color.hpp | <filename>source/color.hpp
#ifndef COLOR_HPP
#define COLOR_HPP
//A data transfer object is an object with the primary purpose of storing and transferring values directly, and often has minimal if any functionality
//A struct is being used as the Color object doesn't serve any purpose other than storing and transferri... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/mat2.hpp | <gh_stars>0
#ifndef MAT2_HPP
#define MAT2_HPP
#include "vec2.hpp"
struct Mat2
{
//e00 e10
//e01 e11
float e_00 = 1.0f;
float e_10 = 0.0f;
float e_01 = 0.0f;
float e_11 = 1.0f;
float det() const;
Mat2& operator*=(Mat2 const& m);
};
Mat2 operator*(Mat2 const& m1, Mat2 const& m2);
bool operator==(Mat2 const&... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/vec2.hpp | //Without these "include guards" the project wouldn't build due to an attempted redefenition of the struct Vec2
#ifndef VEC2_HPP
#define VEC2_HPP
struct Vec2 {
//Order is important for aggregate init
float x = 0.0f;
float y = 0.0f;
Vec2& operator+=(Vec2 const& v);
Vec2& operator-=(Vec2 const& v);
Vec2& operator... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/classes/rectangle.cpp | #include "rectangle.hpp"
myShapes::Rectangle::Rectangle() :
min_{0, 0},
max_{0, 0} {}
myShapes::Rectangle::Rectangle(Vec2 const& min, Vec2 const& max, Color const& color) :
min_{min},
max_{max},
color_{ color } {}
float myShapes::Rectangle::perimeter() const
{
return 2 * (max_.x - min_.x + max_.y - min_.y);
}
... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/vec2.cpp | #include <catch.hpp>
#include "vec2.hpp"
#include "vec2.hpp" //done a second time for the sake of testing include guards, not to serve any functionality
#include <iostream>
Vec2& Vec2::operator+=(Vec2 const& v)
{
x += v.x;
y += v.y;
return *this;
}
Vec2& Vec2::operator-=(Vec2 const& v)
{
x -= v.x;
y -= v.y;
... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/mat2.cpp | #include "mat2.hpp"
#include <catch.hpp>
#define _USE_MATH_DEFINES //have to do this to get access to pi constant
#include <math.h>
#include <iostream>
Mat2& Mat2::operator*=(Mat2 const& m)
{
Mat2 temp = *this;
e_00 = temp.e_00 * m.e_00 + temp.e_10 * m.e_01;
e_10 = temp.e_00 * m.e_10 + temp.e_10 * m.e_11;
e_01 =... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/classes/circle.hpp | #ifndef CIRCLE_HPP
#define CIRCLE_HPP
#include "../vec2.hpp"
#include "../color.hpp"
#include "../window.hpp"
//The difference between const-correctness in a Method and a Free Function, is that a const Method promises not to alter the object you are acting upon,
//while a Free Function isn't part of any object in th... |
PeteTheN00b/programmiersprachen-aufgabenblatt-2 | source/classes/circle.cpp | <filename>source/classes/circle.cpp
#include "circle.hpp"
#include "../mat2.hpp"
#define _USE_MATH_DEFINES //have to do this to get access to pi constant
#include <math.h>
myShapes::Circle::Circle() :
centre_{ 0, 0 },
radius_{ 1.0f } {}
myShapes::Circle::Circle(Vec2 const& centre, float radius, Color const& color... |
TeknoVenus/rtRemote | src/rtRemote.cpp | /*
pxCore Copyright 2005-2018 <NAME>
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... |
MADV360/ISOBMFF | ISOBMFF-Dump/main.cpp | <filename>ISOBMFF-Dump/main.cpp
/*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2017 DigiDNA - www.digidna.net
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentati... |
SourabhKul/magma | lte/gateway/c/core/oai/test/amf/util_nas5g_registration_pkt.cpp | <reponame>SourabhKul/magma
/**
* Copyright 2020 The Magma Authors.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distrib... |
foolnotion/pratt-parser-calculator | example/sexpr.hpp | <reponame>foolnotion/pratt-parser-calculator
#ifndef PRATT_SEXPR_HPP
#define PRATT_SEXPR_HPP
#include "pratt-parser/parser.hpp"
#include <sstream>
namespace pratt::sexpr {
enum operations { add,
sub,
mul,
div,
pow,
exp,
log,
sin,
cos,
tan,
sqrt,
square,
noop };
struc... |
foolnotion/pratt-parser-calculator | include/pratt-parser/parser.hpp | #ifndef PRATT_PARSER_HPP
#define PRATT_PARSER_HPP
#include <cassert>
#include <cmath>
#include <unordered_map>
#include <optional>
#include "lexer.hpp"
namespace pratt {
template <typename NUD, typename LED, typename CONV,
typename TokenMap = std::unordered_map<std::string_view, typename NUD::token_t>,
... |
foolnotion/pratt-parser-calculator | include/pratt-parser/lexer.hpp | #ifndef PRATT_LEXER_HPP
#define PRATT_LEXER_HPP
#include <algorithm>
#include <cmath>
#include <ostream>
#include <string_view>
#include <unordered_map>
#include <utility>
#include <vector>
#include "fast_float/fast_float.h"
#include "robin_hood.h"
#include "token.hpp"
namespace pratt {
template<typename TOKEN, ty... |
foolnotion/pratt-parser-calculator | test/source/pratt-parser_test.cpp | <filename>test/source/pratt-parser_test.cpp
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest/doctest.h"
#include <string>
#include <functional>
#include "../example/calculator.hpp"
namespace pratt::test {
using token = pratt::token<double>;
using nud = pratt::calculator::nud;
using led = pratt::calculato... |
foolnotion/pratt-parser-calculator | example/sexpr.cpp | #include <iostream>
#include <string>
#include "sexpr.hpp"
auto main(int /*unused*/, char** /*unused*/) -> int {
using nud = pratt::sexpr::nud;
using led = pratt::sexpr::led;
using conv = pratt::sexpr::conv;
using token = nud::token_t;
using pratt::sexpr::operations;
using pratt::associativ... |
foolnotion/pratt-parser-calculator | include/pratt-parser/token.hpp | #ifndef PRATT_TOKEN_HPP
#define PRATT_TOKEN_HPP
#include <cstdint>
#include <string>
#include <numeric>
#include <sstream>
namespace pratt {
enum class associativity : uint8_t {
none,
left,
right
};
enum class token_kind : uint8_t {
lparen,
rparen,
dynamic,
variable,
constant,
eo... |
foolnotion/pratt-parser-calculator | example/calculator.hpp | <reponame>foolnotion/pratt-parser-calculator
#ifndef PRATT_CALCULATOR_HPP
#define PRATT_CALCULATOR_HPP
#include "pratt-parser/parser.hpp"
namespace pratt::calculator {
enum operations { add, sub, mul, div, pow, exp, log, sin, cos, tan, sqrt, noop, square };
struct identity {
template <typename U>
constexpr ... |
kwierman/cookiecutter-cppproject | {{ cookiecutter.project_name }}/include/{{ cookiecutter.project_name }}.hh | <gh_stars>0
#ifndef {{ cookiecutter.project_name }}_hh_
#define {{ cookiecutter.project_name }}_hh_
namespace {{ cookiecutter.project_name }}
{
}
#endif |
kwierman/cookiecutter-cppproject | {{ cookiecutter.project_name }}/test/{{ cookiecutter.project_name }}test.cc | <reponame>kwierman/cookiecutter-cppproject
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include "{{ cookiecutter.project_name }}.hh"
using namespace ::testing; |
kwierman/cookiecutter-cppproject | {{ cookiecutter.project_name }}/src/{{ cookiecutter.project_name }}.cc | #include "{{ cookiecutter.project_name }}.hh" |
udevbe/skia | gm/asyncrescaleandread.cpp | /*
* Copyright 2019 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRect.h"
#include "include/cor... |
udevbe/skia | src/core/SkGpuBlurUtils.cpp | <filename>src/core/SkGpuBlurUtils.cpp<gh_stars>0
/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/core/SkGpuBlurUtils.h"
#include "include/core/SkRect.h"
#if SK_SUPPORT_GPU
#include "include/gpu/GrRecordingCo... |
udevbe/skia | src/core/SkYUVAInfo.cpp | /*
* Copyright 2020 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/core/SkYUVAInfo.h"
#include "src/core/SkSafeMath.h"
int SkYUVAInfo::PlaneDimensions(SkISize imageDimensions,
PlanarConfig pla... |
udevbe/skia | tests/BulkRectTest.cpp | <filename>tests/BulkRectTest.cpp
/*
* Copyright 2019 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/gpu/GrDirectContext.h"
#include "src/core/SkBlendModePriv.h"
#include "src/gpu/GrDirectContextPriv.h"
#include "src/gpu/GrPro... |
udevbe/skia | modules/svg/src/SkSVGText.cpp | <gh_stars>0
/*
* Copyright 2019 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "modules/svg/include/SkSVGText.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkFontMgr.h"
#include "include/core/SkFontStyle.h"
#include "... |
udevbe/skia | src/gpu/GrResourceProvider.cpp | <filename>src/gpu/GrResourceProvider.cpp<gh_stars>0
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/gpu/GrResourceProvider.h"
#include "include/gpu/GrBackendSemaphore.h"
#include "include/private/GrResourceKe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.