text stringlengths 3.08k 10.5k |
|---|
/*
Author: <NAME> <<EMAIL>>
Copyright (c) 2016 Cromulence LLC
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 restriction, including without limitation the rights
to use, copy, modify, m... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define BACKLOG 10
#define BUFSIZE 1024
#define HEADER200 "HTTP/1.1 ... |
/*******************************************************************************
* Copyright (c) 1991, 2017 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
* distribution and is available at https://w... |
#include <stdlib.h>
#include <string.h>
#include <libretro.h>
#include "joystick.h"
#include "lutro.h"
static int16_t joystick_cache[6][14];
const struct joystick_int_const_map joystick_key_enum[17] = {
{RETRO_DEVICE_ID_JOYPAD_B, "b"},
{RETRO_DEVICE_ID_JOYPAD_Y, "y"},
{RETRO_DEVICE_ID_JOYPAD_SELECT, "selec... |
// 2022/05/23 17:34:03 (c) <NAME> e-mail : <EMAIL>
#pragma once
#include "Computer/RAM.h"
#include "CPU/utils.h"
#include "Emulator/Emulator.h"
enum REG_8
{
RB_ = 0,
RC_ = 1,
RD_ = 2,
RE_ = 3,
RH_ = 4,
RL_ = 5,
pHL_ = 6,
RA_ = 7
};
enum REG_QQ
{
RQQ_BC_ = 0,
RQQ_DE_ = 1,
... |
#include "user_run.h"
#include "spi_protocol.h"
#include <stdbool.h>
#include <string.h>
#include "stm32h7xx_hal.h"
#include "core_cm7.h"
#include <cmsis_os2.h>
#define BUFFER_SIZE (16*1024)
//#define BUFFER_SIZE (64)
extern SPI_HandleTypeDef hspi1;
extern SPI_HandleTypeDef hspi3;
extern SPI_HandleTypeDef hspi4;
e... |
#include "midi.h"
#include <CoreMIDI/MIDIServices.h>
#include <CoreFoundation/CFRunLoop.h>
#include <CoreMIDI/MIDIServices.h>
#include <CoreFoundation/CFRunLoop.h>
MIDIPortRef gOutPort = NULL;
MIDIEndpointRef gDest = NULL;
int gChannel = 0;
extern int verbose;
void hexdump(unsigned char *buf, int len);
#define... |
/******************************************************************************
Copyright (c) 2017-2019 Analog Devices, Inc. All Rights Reserved.
This software is proprietary to Analog Devices, Inc. and its licensors.
By using this software you agree to the terms of the associated
Analog Devices Software License Agree... |
/*
* Copyright (c) 2013-2015, University of Lugano
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, thi... |
/*
* gpio_hal.h
*
* Created on: 30 jan 2020
* Author: VasiliSk
*/
#pragma once
enum {
GPIO_MODE_AN = 0x00,
GPIO_MODE_IN = 0x04,
GPIO_MODE_IN_PULL_UP_DOWN = 0x08,
GPIO_MODE_OUT2_PP = 0x02,
GPIO_MODE_OUT2_OD = 0x06,
GPIO_MODE_OUT2_ALT_PP = 0x0A,
GPIO_MODE_OUT2_ALT_OD = 0x0E,
GPIO_MOD... |
/*
Copyright (c) 2012 <NAME>, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following d... |
/* $XFree86: xc/extras/Mesa/src/mesa/drivers/dri/gamma/gamma_texstate.c,v 1.1.1.2 2004/06/10 14:22:46 alanh Exp $ */
#include <stdlib.h>
#include <stdio.h>
#include "glheader.h"
#include "macros.h"
#include "mtypes.h"
#include "simple_list.h"
#include "enums.h"
#include "mm.h"
#include "gamma_context.h"
static void... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include "common.h"
char block0[BLOCK0_SIZE];
char block1[BLOCK1_SIZE];
char block2[BLOCK2_SIZE];
char block3[BLOCK3_SIZE];
char block4[BLOCK4_SIZE];
char *block5;
/*
* Decompresses groups of {0, N... |
/*
* verify.c -- the connection matching engine
* Part of the tcpick project
*
* Author: <NAME> <duskdruid @ desp<EMAIL>>
*
* Copyright (C) 2003, 2004 <NAME>
* Licensed under the GPL
*
*/
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public ... |
/*
* ESP BLE Mesh Example
*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include <stdio.h>
#include <string.h>
#include "esp_log.h"
#include "esp_console.h"
#include "argtable3/argtable3.h"
#include "esp_bt.h"
#include "esp_bt_main.h"
#... |
//// @file blas_matrix.c
/// @brief The standard implementations for blas_matrix.h
///
#include "blas_comm.h"
#include "blas_matrix.h"
#include "blas.h"
// choosing the implementations depends on the macros _BLAS_AVX2_ and _BLAS_SSE_
#if defined( _BLAS_AVX2_ )
#include "blas_matrix_avx2.h"
#define gf16mat_prod_i... |
// MotionBlur.c
// OpenGL SuperBible
// Demonstrates Motion Blur with the Accumulation buffer
// Program by <NAME>.
#include "../../common/openglsb.h" // System and OpenGL Stuff
#include "../../common/gltools.h" // OpenGL toolkit
#include <math.h>
// Light and material Data
GLfloat fLightPos[4] = { -100.0f, 100.0f,... |
int x11_init(XRESOURCES* res, CONFIG* config){
Window root;
XSetWindowAttributes window_attributes;
Atom wm_state_fullscreen;
XTextProperty window_name;
pid_t pid = getpid();
unsigned u;
char* gobo_path = NULL;
//allocate some structures
XSizeHints* size_hints = XAllocSizeHints();
XWMHints* wm_hints = XAlloc... |
/**
* Filtering demo showing how to grab traffic that matches an arbitrary rule
* into a buffer.
*/
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <exanic/fifo_rx.h>
#include <exanic/fifo_tx.h>
#include <exanic/filter.h>
#include <exanic/exanic.h>
#include <unistd.h>
#include "filter-common.... |
/*!
\file
\brief Parsing of command-line arguments
\date Started 3/10/2015
\author <NAME> with contributions by <NAME>, <NAME>, <NAME> and <NAME>.
\author Copyright 2019, Regents of the University of Minnesota
*/
#include "slimbin.h"
/*------------------------------------------------------------------------*/
/*! ... |
/*! \file
* \brief This page includes the communications functions to talk to other poles via RS/EIA-485.
*
* See [baudrate](baudrate.html "Baud Rate Calculation") note.
* Author: <NAME>
*/
//! \todo TODO: Finish skeleton For communications
//! \todo TODO[Review]: Communications (BEN)
//
#include <shared.h>
#in... |
// SPDX-License-Identifier: GPL-2.0
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <sched.h>
#include <stdio.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <string.h>
#include "log.h"
#include "timens.h"
... |
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (C) 1999 - 2006 Microsoft Corporation. All rights reserved.
Module Name:
... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* o... |
/*
* Copyright (C) 2004, 2007, 2013 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1998-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this ... |
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
/* cast.c - cast optimizations ncc, the new c compiler
Copyright (c) 2021 <NAME> (<EMAIL>). All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code mus... |
/******************************************************************************
*
* FILENAME:
* server.c
*
* DESCRIPTION:
* A server to transmit file via datagram socket(UDP).
*
* REVISION(MM/DD/YYYY):
* 05/06/2015 <NAME> (<EMAIL>)
* - Initial version
*
************************************************... |
/*
* This file is part of the OpenMV project.
* Copyright (c) 2013/2014 <NAME> <<EMAIL>>
* This work is licensed under the MIT license, see the file LICENSE for details.
*
* USB debug support.
*
*/
#include <stdint.h>
#include <stdbool.h>
#include "py/runtime.h"
#include "py/compile.h"
#include "py/gc.h"
#includ... |
/*
Copyright 2016 <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
distributed ... |
/* The MIT License (MIT)
* Copyright (c) 2016 <NAME> <<EMAIL>>
*
* 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 restriction, including without limitation the rights
* to use, ... |
/* skape <<EMAIL> */
/*
* dumps all the mapped memory segments in a running process
*/
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#define PAGE_SIZE 4096
typedef struct _MemoryRange
{
char *base;
unsigned long length;
char *file;
struct _Mem... |
/*
* Copyright (C) 2010 <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This program is di... |
/*
* Copyright (c) 2012, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the fol... |
/*
* Software Development Kit for Fisilink
* @file: cli.c
* @description:
* @note: Copyright (C) 2020
*
* You should have received a copy of the Fisilink License
* along with this program; if not, write to Fisilink
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h> ... |
#include <reboot.h>
#include <mini_uart.h>
#include <mailbox.h>
#include <cpio.h>
#include <allocator.h>
#include <string.h>
#include <allocator.h>
#include <fdt.h>
#include <timer.h>
#include <printf.h>
#include <sched.h>
#include <exec.h>
static char buf[0x200];
void cmd_help(void)
{
uart_send_string("help ... |
/*******************************************************************************
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
******************************************************************************/
/**
* @file own_deflate_job.c
* @brief contains implementation of @link own_defl... |
#include <stdint.h>
#include <string.h>
#include <stm32f4xx_hal.h>
#include "misc.h"
#include "systick.h"
#include "mpconfig.h"
#include "qstr.h"
#include "obj.h"
#include "led.h"
#include "flash.h"
#include "storage.h"
#define CACHE_MEM_START_ADDR (0x10000000) // CCM data RAM, 64k
#define FLASH_PART1_START_BLOCK (0x... |
/*
Copyright 2015, Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... |
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <libsec.h>
#include "iso9660.h"
void
mkdirec(Direc *direc, XDir *d)
{
memset(direc, 0, sizeof(Direc));
direc->name = atom(d->name);
direc->uid = atom(d->uid);
direc->gid = atom(d->gid);
direc->uidno = d->uidno;
direc->gidno = d->gidno;
direc->mode = d-... |
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all
copi... |
#include <getopt.h>
#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
#include "termux-auth.h"
#define _TA_HOME "/data/data/com.termux/files/home"
#define _TA_PREFIX "/data/data/com.termux/files/usr"
static bool show_motd = true;
// Detect a s... |
#include "mdcc.h"
static Map *keywords;
char *buf;
typedef struct {
char *src; // source
char ch; // current character
int offset; // character offset
int line; // line number
int pos; // reading position
} Scanner;
static void token_error(Scanner *s, char *msg) {
fprintf(stderr, "Error at line:... |
/*
* ---------------------------------------------------------------------
* Author: <NAME>
<NAME>
* Dept. of Radio Electronics, Brno Univ. of Technology
* Created: 2019-11-27
* Last update: 2019-12-11
* Platform: ATmega328P, 16 MHz, AVR 8-bit Toolchain 3.6.2
* ----------... |
/*
* player.c
*
* Copyright 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 ... |
// Test data generator for SMVM.
// Be careful to compile it with the correct machine specifier (ie -m32)
// or you'll get errors when you try and run the Haskell version on it.
//
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <ctype.h>
#include <sys/ty... |
#include <assert.h>
#include <numa.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <rte_bus_pci.h>
#include <rte_kni.h>
#include "mempool.h"
/* Total octets in ethernet header */
#define KNI_ENET_HEADER_SIZE 14
/* Total octets in the FCS */
#define KNI_ENET_FCS_SIZE ... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ecp.h"
#include "mpi.h"
#include "mplogic.h"
#include "mpi-priv.h"
#include <stdlib.h>
#define ECP521_D... |
/* $Source: /home/CVSROOT/c2ada/package.c,v $ */
/* $Revision: 1.2 $ $Date: 1999/02/03 19:45:04 $ */
#include <assert.h>
#include "il.h"
#include "types.h"
#include "anonymous.h"
#include "allocate.h"
#include "stab.h"
#include "ada_name.h"
#include "package.h"
#include "format.h"
#include "errors.h"
#include "gen.h... |
/*
Copyright (C) 2018 <NAME>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2... |
/* Copyright (c) Codethink Ltd. All rights reserved.
Licensed under the MIT License. */
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include <limits.h>
#include "lib/CPUFreq.h"
#include "lib/VectorTable.h"
#include "lib/NVIC.h"
#include "lib/GPIO.h"
#include "lib/GPT.h"
#include "lib/UART.h"
#incl... |
#define _GNU_SOURCE
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <dirent.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include "simgrep.h"
int main(int argc, char *argv[], char* envp[])
{
options_t options = setupOptions(argv);
#ifdef DEBUG
printf("## simgrep init #... |
/*
* YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
*
* Copyright (C) 2002-2010 Aleph One Ltd.
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU... |
#include "httpd_server.h"
#include "httpd_common.h"
#include "httpd_connection.h"
#include <string.h>
#include <sys/types.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <glib.h>
#define CONNECTION_BACKLOG 10
#define TIMEOUT_SEC 0
#defin... |
/* Microsoft Reference Implementation for TPM 2.0
*
* The copyright in this software is being made available under the BSD License,
* included below. This software may be subject to other third party and
* contributor rights, including patent rights, and no such rights are granted
* under this license.
*
* ... |
/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
*/
#define import_spp
#define import_libc
#define import_stdio
#include <iraf.h>
#include "config.h"
#include "clmodes.h"
#include "operand.h"
#include "mem.h"
#include "grammar.h"
#include "opcodes.h"
#include "param.h"
#include "task.h... |
// BANNERSTART
// Copyright: 2003 - <NAME> - Intel Research Cambridge
// Copyright: 2011 - Galois, Inc.
// License-file: miniOS-LICENSE
// Author: <NAME> (<EMAIL>)
// Author: <NAME> (<EMAIL>)
// BANNEREND
#include <string.h>
int memcmp(const void * cs,const void * ct,size_t count)
{
size_t i;
/*@... |
#include "gpio.h"
#include "mbox.h"
/* Auxiliary mini UART registers. */
//#define AUX_ENABLE ((volatile unsigned int*)(MMIO_BASE+0x00215004))
//#define AUX_MU_IO ((volatile unsigned int*)(MMIO_BASE+0x00215040))
//#define AUX_MU_IER ((volatile unsigned int*)(MMIO_BASE+0x00215044))
//#define AUX_MU_IIR ... |
#include "mex.h"
#include <stdint.h>
#include <string.h>
#include <splatt.h>
#include "splatt_shared.h"
/**
* @brief Keys for structure entries.
*/
static char const * csf_keys[] = {
"nnz",
"nmodes",
"dims",
"dim_perm",
"which_tile",
"ntiles",
"tile_dims",
"pt"
};
static char const * sparsity_keys... |
//
// Created by kkyse on 10/4/2017.
//
#include "string_tests.h"
#include <stdio.h>
#include <string.h>
#include "string_funcs.h"
size_t strnlen(const char *s, size_t n); // for some reason gcc can't find strnlen header
void test_strlen() {
printf("\n\nTesting strlen\n\n");
printf("\"Hello\" has %zu... |
/*
* Copyright (C) 2018 <NAME> <<EMAIL>>
*
* This file may be redistributed under the terms of the
* GNU Lesser General Public License.
*/
#include <ctype.h>
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "superblocks.h"
#define BDE_... |
/*
* @Author: HanwGeek
* @Github: https://github.com/HanwGeek
* @Description: Memory temp var module.
* @Date: 2019-10-31 19:37:48
* @Last Modified: 2020-02-24 11:16:36
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"
#include "symbol.h"
#include "temp.h"
#include "table.h"
//* tem... |
/*
ELF Loader - chargeur/implanteur d'exécutables au format ELF à but pédagogique
Copyright (C) 2012 <NAME>
Ce programme est libre, vous pouvez le redistribuer et/ou le modifier selon les
termes de la Licence Publique Générale GNU publiée par la Free Software
Foundation (version 2 ou bien toute autre version ultérieure... |
/*
* lux OS kernel
* copyright (c) 2018 by <NAME>
*/
#pragma once
#include <types.h>
#include <time.h>
#include <lock.h>
#define MAX_FILES 512
#define MAX_MOUNTPOINTS 32
// error codes
#define EACCES -1
#define EIO -2
#define ELOOP -3
#define ENAMETOOLONG -4
#define ENOENT -5
#define ENOTDIR ... |
#include "pr_lib.h"
/* Local Variables */
// store the table for the pagerank
double *PR;
double *prevPR;
// record the size of graph
int size;
// store the graph to pass
graph this_graph;
double weight_in(int src, int dest){
double denominator = 0;
for (int i = 0; i < size; i++) {
... |
/* ebt_nflog
*
* Authors:
* <NAME> <<EMAIL>>
*
* February, 2008
*
* Based on:
* ebt_ulog.c, (C) 2004, <NAME> <<EMAIL>>
* libxt_NFLOG.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include "../include/ebtables_u.h"
#include <linux/netfilter_bridge/ebt_nflog.h>
enum {
... |
/* Copyright (C) StrawberryHacker */
#include "dram.h"
#include "gpio.h"
#include "clock.h"
#include "matrix.h"
enum dram_mode {
DRAM_MODE_NORMAL,
DRAM_MODE_NOP,
DRAM_MODE_PRECHARGE,
DRAM_MODE_LOAD_MR,
DRAM_MODE_REFRESH,
DRAM_MODE_LOAD_EXT_MR,
DRAM_MODE_POWERDOWN
};
static inline void dram_set_mode(enum dram_... |
/*
* Copyright (C) 2013, The CyanogenMod Project
*
* 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... |
#include "SupaSyC/Common.h"
typedef struct
{
const char *p;
const File *file;
Token *tok;
TokenTrivia triv;
uint32_t ln;
uint32_t col;
uint32_t disLn;
} Lexer;
static const char *Next(Lexer *);
static void ParseNumber(Lexer *);
static void ParseIdentifier(Lexer *);
static void ParsePunctuation(Lexer *);
stati... |
/*
* Copyright (C) - 2012 <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation; version 2.1 of the License.
*
* This library is distributed in the hope that it will be... |
#include <hal.h>
#include <CMSDK_CM4.h>
#define BAUD 38400
/* Default clock on the MPS2 boards seems to be 25MHz */
#ifndef SYSTEM_CLOCK
#define SYSTEM_CLOCK 25000000UL
#endif
/* The startup file calls a SystemInit function. */
void SystemInit(void)
{
/* Enable the FPU */
SCB->CPACR |= ((3UL << 10 * 2) | ... |
/* Copyright (C) 2011 The Regents of the University of California
* See README in this or parent directory for licensing information. */
/* agpSangerUnfinished - Fixes chrom.agp or scaffold.agp
* <NAME> 2009-06-22
* Produces an agp file that matches the unfinished contig names
* that are found in contigs.fa.... |
/*
* Copyright 2016, Data61
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
* ABN 41 687 119 230.
*
* This software may be distributed and modified according to the term of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(D61_B... |
/*
* Raspberry Pi Server
*/
#include "pi_server.h"
//Constants
static const int LISTEN_PORT_NUM = 55000;
static const int QUEUE_LENGTH = 1024;
static const int MAX_LENGTH = 8192;
static const int MAX_BUF = 8192;
//Variables
static Queue q;
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static bool is_init ... |
/* 4bit DAC - Github.com/glennlopez */
// Produces a triangle wave by incrementing through the datapins
/************************
* PREPROCESSOR DIRECTIVES
************************/
// System Control Legacy base address: 0x400F.E000 (Datasheet pg. 234)
#define SYSCTL_RCGC2_R (*((volatile unsigned long *)0x... |
/**********************************************************************
// Copyright (c) 2016 <NAME> & <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... |
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
/**
*
* \file
*
* \brief This module contains WINC3400 Host MCU Provisioning implementation.
*
* Copyright (c) 2019 Microchip Technology Inc. and its subsidiaries.
*
* \asf_license_start
*
* \page License
*
* Subject to your compliance with these terms, you may use Microchip
* software and any derivatives ... |
#pragma once
#include <stdint.h>
#include <xc.h>
/** uint32 representation of id_a, id_b, the IDE and the RTR bits for in-memory manipulation.
let IDE be the identifier extension flag, when set to 1 meaning the extended id field is present
let RTR be the remote transmission request flag, when set to 1 meaning no pa... |
#pragma once
#include "platform.h"
#include <stdint.h>
#include "configuration.h"
#include "configuration.h"
// Public interface to the lowlevel hardware and/or simulated hardware
// ------------------------------------------------------------------------------------------------
//! OS simulation
typedef enum { I... |
#define _GNU_SOURCE
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <stdbool.h>
#include <wiringPi.h>
#include "consts.h"
// Bigger number : slower
#define START_SLEEP 19000000 // => minimum speed
#defi... |
/* Copyright 2020, AGV ITBA - 2020
*
* Placeholder
*/
/* Date: 2020-09-12 */
/*The SCT (State Configurable Timer) is a feature included in some of LPC's microcontrollers
* that provides a high resolution PWM (or just another timer).
* It's like a normal timer but with multiple Compare Match values (16),
* and ... |
#ifdef MAME_DEBUG
#define LOGLEVEL 5
#else
#define LOGLEVEL 0
#endif
#define LOG(n,x) do { if (LOGLEVEL >= n) logerror x; } while (0)
#define DECOCASS_TAPE DEVICE_GET_INFO_NAME(decocass_tape)
DEVICE_GET_INFO( decocass_tape );
#define MDRV_DECOCASS_TAPE_ADD(_tag) \
MDRV_DEVICE_ADD(_tag, DECOCASS_TAPE,... |
/* Copyright 2015 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Based on <NAME>ner's version of Dec 27 2011, published on
* https://github.com/devttys0/libmpsse
*
* Internal functions used by libmpsse.
*/
... |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*-
* vim: ts=8 sts=4 sw=4 noexpandtab
*
* Copyright (C) 1997 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*/
#include "adio.h"
#include "adio_extern.h"
#include "ad_pvfs2.h"
#include "ad_pvfs2_io.h"
#include "ad_pvfs2_c... |
/*
Author: <NAME> <<EMAIL>>
Copyright (c) 2015 Cromulence LLC
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 restriction, including without limitation the rights
to use, copy, modify, m... |
#include "hash_table.h"
#include "sha512.h"
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#define snprintf _snprintf
#define BITS(x) ((uint64_t)1 << (x))
#define BUCKETS BITS(27)
#define MAX_SIZE BITS(29)
#define DATA_SIZE 6
#define HASH_SIZE 64
char printbuf[1024];
FILE *logfile;
vo... |
/***************************************************************
** MIDI input handling.
***************************************************************/
/*
** this could be a NRPN, too, but the penalty for screwing it up
** could be pretty fierce. it could also be split into different
** channels for receive and send... |
/*
* Copyright (c) 2012, JANET(UK)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of condit... |
#include "signal.h"
#include "types.h"
#include "system_call.h"
#include "keyboard_handler.h"
#include "scheduling.h"
#include "lib.h"
#include "handler_interface.h"
#define NUM_SIGS 5
#define ADDR_TO_ESP 15*4;
#define INTx80 0xb8090000
#define MOVEAX9 0xCD800000
// void init_signals(void){
// signals_ready =... |
#define PY_SSIZE_T_CLEAN
#include <Python.h>
int pyfastbti_get_color_distance_fast(int r1, int g1, int b1, int r2, int g2, int b2) {
int dist = 0;
dist += abs(r1 - r2);
dist += abs(g1 - g2);
dist += abs(b1 - b2);
return dist;
}
static PyObject* pyfastbti_get_best_cmpr_key_colors(PyObject* self, PyObject* ar... |
/* $OpenBSD: acss_skey.c,v 1.3 2009/08/07 00:05:04 martynas Exp $ */
/*
* Copyright (c) 2004 The OpenBSD project
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in... |
/*
* Exercise 6-3.
*
* Write a cross-referencer that prints a list of all words in a document, and,
* for each word, a list of the line numbers on which it occurs. Remove noise
* words like "the," "and," and so on.
*/
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "getwor... |
#include "config.h"
#include <stdio.h>
#include <atl.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "mpi.h"
#include "evpath.h"
#define MAXPROC 8 /* Max number of procsses */
#define NAMELEN 80 /* Max length of machine name */
#define CONTACTL... |
// winsock errors used by StSock::_SockErrorDescription()
char *__WinsockErrorDesc[]=
{
/* 000 */ "?",
/* 001 */ "?",
/* 002 */ "?",
/* 003 */ "?",
/* 004 */ "Interrupted System Call",
/* 005 */ "?",
/* 006 */ "?",
/* 007 */ "?",
/* 008 */ "?",
/* 009 */ "Bad File Number",
/* 010 */ "?",
/* 011 */ "?",
... |
/**
@file
@license $License$
@copyright $Copyright$
@version $Revision$
@purpose SCPI ETSI TEST demo application
@brief Demo application showing how to use SCPI parser and SCPI ETSI TEST components
*/
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include "scpi_etsi_test.h"
#includ... |
/**
* @file example_testcases.c
* @author <EMAIL>
*
*/
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <Basic.h>
#include <Console.h>
#include <CUnit.h>
#include <TestDB.h>
#include <Automated.h>
#... |
/*
* This is the file where all of your implementation goes. You will be
* submitting (only) this file to MarkUs.
*
* TestMST.c provides some test cases to test both your implementation for
* disjoint sets as well as Kruskal's algorithm. You can compile it using
* the Makefile and running the executable produced.... |
/* Definitions for data structures callers pass the regex library.
Copyright (C) 1985, 1989 Free Software Foundation, Inc.
This program 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 2 of the L... |
// code for a huffman coder
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include "huff.h"
// create a new huffcoder structure
struct huffcoder * huffcoder_new()
{
struct huffcoder *result=malloc(sizeof(struct huffcoder));
result->tree=NULL;
for(int i=0;i<256... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.