text
stringlengths
3.08k
10.5k
/* * Copyright 2020 Intel Corporation * SPDX-License-Identifier: Apache 2.0 */ /*! * \file * \brief This file implements CSR generation for EC */ #include <mbedtls/pk.h> #include <mbedtls/x509_csr.h> #include "util.h" #include "sdotypes.h" #include "mbedtls_random.h" #include "sdoCryptoHal.h" #include "safe_li...
/***************************************************************************//** * @file main_s2.c * * @brief This project demonstrates polled use of the USART in synchronous (SPI) * secondary mode. The main loop transmits the specified number of bytes and * receives the byte that is shifted in by the main with ea...
/* Author: <NAME>, 07/17/2020 This program can generate a image in bitmap(.bmp) format with random RGB pixels. This code can be modified to generate noise in others color ranges. Some examples of images created with this file(modified) in Links Links: https://photos.app.goo.gl/jCfkrRA8jMV78cRa6 https://photos.app.goo.g...
/* * Copyright (c) 2011-*, (mt) MediaTemple <mediatemple.net> * 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 * ...
/* MIT License Copyright (c) 2019 <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 restriction, including without limitation the rights to use, copy, modify, merge, publish, distrib...
/* * gen_uuid.c --- generate a DCE-compatible uuid * * Copyright (C) 1999, <NAME> and <NAME> * * %Begin-Header% * This file may be redistributed under the terms of the GNU Public * License. * %End-Header% */ #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include "c.h" #include "closestream.h" #i...
#include <u.h> #include <libc.h> #include <ip.h> #include <bio.h> #include <ndb.h> #include "dns.h" static RR* doextquery(DNSmsg*, Request*, int); static void hint(RR**, RR*); extern char *logfile; /* * answer a dns request */ void dnserver(DNSmsg *reqp, DNSmsg *repp, Request *req) { RR *tp, *neg; char *cp; DN...
/* :vim:ts=4:sw=4: * * splitargs.c - Split string into tokens and handle embedded quoted words. * * Copyright (c) 1999-2015 <NAME> <sw at herle.net> * * Copyright (c) 2016, 2017 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or ...
// SPDX-License-Identifier: BSD-2-Clause /* * Copyright (C) 2020, STMicroelectronics - All Rights Reserved */ #include <assert.h> #include <elf_parser.h> #include <string.h> #include <trace.h> #include <types_ext.h> #include <util.h> static bool va_in_fwm_image_range(void *va, uint8_t *fw, size_t fw_size) { ui...
/* SPDX-License-Identifier: Apache-2.0 */ /* * Copyright (C) 2015-2021 Micron Technology, Inc. All rights reserved. */ #include <hse_util/platform.h> #include <hse_util/logging.h> #include <hse_util/time.h> #include <hse_util/data_tree.h> #include <hse_util/event_counter.h> void ev_get_timestamp(atomic_ulong *time...
/* MIT License Copyright (c) 2017 <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 restriction, including without limitation the rights to use, copy,...
#include "mpu6050.h" #include "bsp_iic.h" #include "delay.h" #include "inv_mpu.h" #include "inv_mpu_dmp_motion_driver.h" void MPU_Write_Byte(uint8_t reg, uint8_t data) { IIC_Write(MPU_ADDR, reg, 1, &data); } uint8_t MPU_Read_Byte(uint8_t reg) { uint8_t data; IIC_Read(MPU_ADDR, reg, 1, &data); return ...
#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <ftw.h> #include <sys/stat.h> #include <string.h> struct filez { uint8_t *buffer; uint64_t size; }; typedef struct filez Filez; //Function prototypes int readfile(const uint8_t *); void writefile(const uint8_t *,...
/* * main.c (original) * * Created on: Dec 19, 2018 * Author: <NAME> (<EMAIL>) */ /* Libraries included */ #include "board.h" #include "pin_mux.h" #include "clock_config.h" #include "MK60D10.h" #include "fsl_clock.h" #include "fsl_uart.h" #include "fsl_device_registers.h" #include "fsl_de...
#ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <sys/types.h> #include <sys/wait.h> #ifdef PIDWATCH_HAS_CAPABILITY_SUPPORT #include <sys/capability.h> #endif /* PIDWATCH_HAS_CAPABILITY_SUPPORT */ #include <unistd.h> #include <fcntl.h> #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <string...
/** * TestMain.c - Test suite and example code. * Created by <NAME> on 13 July 2017 * * CIniFile: C implementation of reading ini configuration files. * An open source project of HYPEWORKS. * * Copyright (C) 2017-2021 HYPEWORKS Ltd Co. */ /* * This software library is open source and licensed under the MIT Li...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include "zookeeper.h" #include "zookeeper_log.h" typedef struct zk_mutex_s { int seq_me; // 序号 int seq_watch; // 监听的序号 char watch[64]; // 监听的节点名 } zk_mutex_t; static zk_mutex_t zmt = {0}; static int quit ...
/* Sliding Block Puzzle * * Set of functions for creating a * couple heuristics to improve the * searching algorithms for the Sliding * Block Puzzle * * Code by: * <NAME> */ #include "mergesort.h" // Helper function to calculate absolute value int absoluteValue(int val) { if (val < 0) { return (val * -1);...
#include "Waveform.h" #include <math.h> #include <stdlib.h> // Generate 1D (undershoot + trace + retrace). // The trace part spans voltage scanStart to scanEnd. void GenerateGalvoWaveform(int32_t effectiveScanLen, int32_t retraceLen, int32_t undershootLen, double scanStart, double scanEnd, double *waveform) { doub...
#include <stdio.h> #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" #include "libswscale/swscale.h" #include "libavformat/avformat.h" #include "libavutil/imgutils.h" //刷新编码器 int flush_encoder(AVFormatContext *fmtCtx, AVCodecContext *codecCtx,int vStreamIndex) { int ret; AVPacket *enc_pk...
/* Copyright (c) 2006 <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, copy, ...
#include <sys/param.h> #include <sys/kernel.h> #include <sys/kthread.h> #include <sys/lock.h> #include <sys/lockmgr.h> #include <sys/module.h> #include <sys/mutex.h> #include <sys/sema.h> #include <sys/systm.h> #include <sys/unistd.h> static struct proc *locking_tests_proc; static struct mtx locking_tests_sync_mtx; /*...
// board.c: Basic function and variables for interacting with the // hardware on the Wixel. Includes LED, power detection, and common // timing/delay functions. // TODO: Allow for getting into bootloader mode when the yellow LED is on // (need to turn it off for a brief time). // TODO: only go into bootloader mode...
/* Exploit Title: Linux/x64 - Reverse Shell Author: <NAME> Date: 2021-01-18 Platform: GNU Linux x64 ===================================== This shellcode connects back to 127.1.1.1 address on port 4444 Listener needs to be opened before execute: nc -lvp 4444 Compile: gcc -fno-stack-protector ...
/* Dump files with each byte interpreted in several formats */ #include <stdio.h> #include <stdlib.h> #include <string.h> #define HELLO "<NAME> - www.laps.ufpa.br - March 10, 2009" #define SWAP_SHORT(Var) Var = *(short*) SwapEndian((void*)&Var, sizeof(short)) #define SWAP_INT(Var) Var = *(int*) SwapEndian...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "vetor.h" #include "lista.h" /* problema 1.1 */ int tira_carta(lista* baralho, lista* ordem) { int gotit=0, c=0; char* a=ordem->inicio->str; elemento* next=ordem->inicio->proximo; while(strcmp(a, baralho->inicio->str )!=0){ a=next->str; next...
/* flowers - application interface * * Copyright (C) 2009 <NAME> * Contact: <EMAIL> */ /* * Conversion from the original AmanithVG's example, by Mazatech * Srl - http://www.amanithvg.com */ #include <stdio.h> #include <time.h> #include <math.h> #include <stdlib.h> #include "picasso.h" #include "interface.h...
/* * (C) 2001 Clemson University and The University of Chicago * * See COPYING in top-level directory. */ #include <unistd.h> #include <stdio.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/time.h> #include <time.h> #include <stdlib.h> #includ...
#include <receptor.h> //constante da funcao piscaLedStatus() //1 TEMPOCICLOLEDS == 200mS na configuracao atual #define TEMPOCICLOLEDS 30 //CASO USE O PLUS ATUAL, COMENTE A LINHA ABAIXO #define PLACA_PLUS_ANTIGO TRUE #if PLACA_PLUS_ANTIGO #include <placa_recep_antigo.h> #else #include <placa_recep.h> #endif #includ...
/* splurt * The Useless Terminal Jpeg Viewer * * Copyright (c) 2012 <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...
/* $NetBSD: ms_ap.c,v 1.2 2002/03/17 19:40:46 atatat Exp $ */ /*- * Copyright (c) 2000 <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: * 1. Redistributions of source code must reta...
// Copyright (c) 2021 <NAME> // This work is licensed under the terms of the MIT license. // For a copy, see https://opensource.org/licenses/MIT. #define QONCHE_IMPLEMENTATION #define QON_DrawChar DrawChar #include "qonche.h" #include <stdio.h> #include "SDL.h" #ifdef __EMSCRIPTEN__ #include <emscripten.h> #endif ...
/************************************************************************** *** *** emacs-server.c - forked by emacs, listen for find-file's *** --------------------------------------------------------- *** *** SCCS ID: 92/04/07 11:51:36 2.2 emacs-server.c *** *** Copyright (C) 1991 <NAME> ***********************...
/*Zipf's Law*/ #include<conio.h> #include<dir.h> #include<dos.h> #include<stdio.h> #include<string.h> #include<ctype.h> #include<graphics.h> typedef struct word { int count; char word[45]; struct word *next; }word; void welcome() { int i; settextstyle(DEFAULT_FONT,HORIZ_DIR,2); se...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "util.h" /*********************************************************/ /****************** general definitions ******************/ /*********************************************************/ void terminateProgram(char *str){ printf("\n%s\n\n",st...
/* * RTK2 : A GUI toolkit for robotics * Copyright (C) 2001 <NAME> <EMAIL> * * 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 License, or * (at your option)...
/* SPDX-License-Identifier: Apache-2.0 */ /* * Copyright (C) 2015-2016 Micron Technology, Inc. All rights reserved. */ /* * wbtsize - wbt size calculator * * This program solves the space use calculations for a wbt * based upon a fixed key len (can be considered average). * * It reports number of leaves needed...
//////////////////////////////////////////////////////////////////////////////// // -------------------------------------------------------------------------- // // // // Version Time Stamping Tool ...
// // asm.c // silm-depack // #include "asm.h" uint8_t d0[4] = {0}; uint8_t d1[4] = {0}; uint8_t d2[4] = {0}; uint8_t d3[4] = {0}; uint8_t d4[4] = {0}; uint8_t d5[4] = {0}; uint8_t d6[4] = {0}; uint8_t d7[4] = {0}; uint8_t * a0; uint8_t * a1; uint8_t * a2; uint8_t * a3; uint8_t * a4; uint8_t * a5; uint8_t * a6; ui...
/* Copyright 1992-2021 Free Software Foundation, Inc. This file is part of GDB. 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 3 of the License, or (at your option) an...
/* * Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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 ...
/****************************************************************************** * Filename: interrupts.c * Description: Interrupt request handlers, aka interrupt service routines * (ISRs). When a processor interrupt is triggered, code execution * immediately jumps to the associated han...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> Word* getMainMemory(); int getNthBit(int input, int desired_bit); void clear_mem(Word *); int btod(char *); int twoCtoD(char *); void dtob(int num, char *str); void dtotwoc(int, char *); void display_mem(); int load_file(char *); void user_c...
/* $NetBSD: obio.c,v 1.1 2002/05/02 15:17:58 nonaka Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by <NAME>. * * Redistribution and use in source and binary forms, with or without * modification...
/* $Id: search.c,v 1.17 2004/09/01 20:16:01 rjoseph Exp $ */ #include "search.h" #include "util.h" #include "socket.h" /* list of valid music file extensions... as different formats are added, this may need to be an array of structs that contain a function ptr to an appropriate decoding function */ static char *...
/* * Copyright (c) 2016, NVIDIA Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, bu...
/* * This file is part of the bayou project. * * Copyright (C) 2008 Advanced Micro Devices, Inc. * * Includes code from util/lar from coreboot-v3 * * Copyright (C) 2006-2007 coresystems GmbH * Copyright (C) 2007 <NAME> <<EMAIL>> * Copyright (C) 2007 Advanced Micro Devices, Inc. * * This program is free softw...
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "nr.h" typedef struct { float left, right; } Observation; struct { Observation* X; Observation* Y; int N; } data; int LoadData(const char* filename) { FILE* fp = fopen(filename, "rt"); if (!fp) ret...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you m...
/* * Hash benchmark module * Part of xxHash project * Copyright (C) 2019-present, <NAME> * * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * ...
/* * Brundle Fly - Good-natured Linux ELF virus supporting kernel 2.2 and 2.4 * Copyright 2001 <NAME> <<EMAIL>>, <NAME> <<EMAIL>> * In memory to Seth Brundle * * This program converts an ELF object to a C file containing the text * segment as an array of charakters. Parts of the code are patched, as * virus_le...
/* Created to Enable SPI Read Write For IV Project */ /* Necessary Include Files #include <avr/io.h> #include <util/delay.h> #include <stdbool.h> */ /* Necessary Variable Definitions unsigned char r1; unsigned char r7; unsigned char r2; */ /* Necessary Function Prototypes unsigned char sendCmd(unsigned char addres...
#include "pwalign.h" #include <numpy/arrayobject.h> // Docstrings static char module_docstring[] = "C module for pairwise alignment"; static char pwalign_docstring[] = "\ Performs global optimal pairwise alignment of two sequences using Gotoh's \ algorithm"; // pwalign python method declaration static PyObject *pw...
/* ------------------------------------------------------------------------ * * Fourier Transform Routines * * * * The following routines are from "Numerical Recipies in C" and have been * * sligh...
/* ** $Id: $ ** ** Title: Heater Control (HC) Application Ground Commands ** ** Purpose: Provides functions for the execution of the HC ground commands ** ** Author: <NAME>, Summer 2015 Intern for Code 582 NASA GSFC ** ** Notes: ** ** $Log: $ */ #include "cfe.h" #include "hc_app.h" #include "hc_cmds.h" #include "hc_cm...
#include <defs.h> #include <x86.h> #include <stdio.h> #include <string.h> #include <swap.h> #include <swap_clock.h> #include <list.h> /* * Prerequisites for Extended clock algorithm: The bits in PTE will be automatically set by CPU. * * (1) The pra_list is the clock list: When there are page faults, we should check...
#define MEM_ALLOC_NO_GUARDS 1 #include "mem_alloc.h" #include <stdio.h> #include <stdlib.h> #ifndef __APPLE__ #include <malloc.h> // this is probably not necessary #endif #ifdef RAXML_USE_LLALLOC // the llalloc library implementation in lockless_alloc/ll_alloc.c exports the alloction functions prefixed...
/* * The MIT License * * Wavefront Alignments Algorithms * Copyright (c) 2017 by <NAME> <<EMAIL>> * * This file is part of Wavefront Alignments Algorithms. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentati...
// How to access GPIO registers from C-code on the Raspberry-Pi // Example program // 15-January-2012 // <NAME> // // Access from ARM Running Linux #define BCM2708_PERI_BASE 0x20000000 #define GPIO_BASE (BCM2708_PERI_BASE + 0x200000) /* GPIO controller */ #include <stdio.h> #include <str...
//<NAME> #include "o3.h" #include "gpio.h" #include "systick.h" //ports for buttons og led #define LED_PORT GPIO_PORT_E #define LED_PIN 2 #define PB0_PORT GPIO_PORT_B #define PB0_PIN 9 #define PB1_PORT GPIO_PORT_B #define PB1_PIN 10 //brukes i case #define STATE_SET_SEC 0 #define STATE_SET_MIN 1 #define STATE_SET_HO...
#include "optbl.h" #include <stdlib.h> #include <stdio.h> #include <string.h> #include <ctype.h> // TODO: expose to library? static op_t parse_reg(const char *str) { op_t op = { .type = OTT_REG, .size = 2 }; // 'r' prefix, either extended register or 64-bit if (*str == 'r') { if (isdigit(*(++str)...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
#include <stdio.h> #include <string.h> #include "ntru.h" #include <sodium.h> /******************************************************************************** * Sample code that shows how to do hybrid encryption using NTRU and libsodium. * *****************************************************************************...
#include <stdio.h> #include <stdlib.h> #include <conio.h> #include <time.h> #define HEIGHT 20 #define WIDTH 50 //ASCII numbers for chosen snake head symbols #define RIGHT 62 #define LEFT 60 #define UP 94 #define DOWN 118 typedef struct coordinates{ int x; int y; int dir; //one of the direction constants }coor...
#include <tertium/cpu.h> #include <tertium/std.h> #include "common.h" #define HDEC(x) ((x <= '9') ? x - '0' : (((uchar)x | 32) - 'a') + 10) struct hash { ctype_hmd *md; int siz; char *name; }; static void sethash(struct hash *p, char *s) { if (!CSTRCMP("MD5", s)) { p->name = "MD5"; p->md = c_hsh_md5; p->s...
/* Copyright (c) 2016 Cromulence LLC Authors: <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, copy, modify, ...
/**************************************************************************** * Copyright (c) 2014, <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 cod...
/* Weimer: bind-based testcase for "Bug: handleFormatString" * Look for: * input.c:222: Bug: handleFormatString * Markptr: instruction error (Errormsg.Error) at bind-formatstring.c:227 * run: ccured.asm.exe --curetype infer --assumePrintf input.c */ typedef enum __anonenum_isc_boolean_t_16 isc_boolean_t; typedef ...
#include <stdlib.h> #include <errno.h> #include <curses.h> #include <unistd.h> #include <ctype.h> #include <sys/ioctl.h> #include <bluetooth/bluetooth.h> #include <bluetooth/hci.h> #include <bluetooth/hci_lib.h> #define cmd_opcode_pack(ogf, ocf) (uint16_t)((ocf & 0x03ff)|(ogf << 10)) #define EIR_FLAGS ...
#include <math.h> #include <stdio.h> #include <string.h> #include <time.h> #include "core.h" #include "platform.h" #include "res.h" #include "imui.h" #include "video.h" static void on_text_input(struct window* window, const char* text, void* udata) { ui_text_input_event(udata, text); } i32 main() { srand((u32)time...
#include "rumi_log.h" #include "rumi_colors.h" #include <stdio.h> #include <time.h> int rumi_log_internal (Rumi rumi, RumiColor c1, RumiColor c2, RumiColor c3, char *prefix, char *message, va_list argptr) { static struct tm *time_ptr = NULL; static int yday = 0; static char date_string[12] = ""; static int tv_s...
#include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/wait.h> #include <errno.h> #include <time.h> #include <stdbool.h> #include <fcntl.h> #define BUF_SIZE 1024 char* buildRRQ(char *file,int RRQ_Size, char *blocks...
/* * nuvoicp, a RPi ICP flasher for the Nuvoton N76E003 * https://github.com/steve-m/N76E003-playground * * Copyright (c) 2021 <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 th...
/* * Copyright (c) 2019 the NodeMCU authors. 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 c...
#pragma config(I2C_Usage, I2C1, i2cSensors) #pragma config(Sensor, in2, BallSensor, sensorReflection) #pragma config(Sensor, dgtl1, LiftSonar, sensorNone) #pragma config(Sensor, dgtl3, WinchRaised, sensorTouch) #pragma config(Sensor, dgtl4, WinchEncoder, sensorQuadEncoder) #pragma config(Sensor, dgt...
/*************************************************************************/ /* * GeekOS master source distribution and/or project solution * Copyright (c) 2001,2003,2004 <NAME> <<EMAIL>> * Copyright (c) 2003 <NAME> <<EMAIL>> * * This file is not distributed under the standard GeekOS license. * Publication or redi...
#include "SerialThread.h" extern ChannelList channel_list; void st_free ( SerialThread *item ) { //puts("stoping serial threads..."); // STOP_THREAD(item->thread) // puts("serial threads done..."); close(item->fd); freeMutex ( &item->mutex ); free ( item ); } void stList_free ( SerialThreadLList *list ) { ...
#include "util.h" #include "cache.h" #include "templating.h" #include "pages/pages.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <signal.h> int vert_respond(sb_Event *e); int vert_init(sb_Server **server, sb_Options options); void vert_destroy(sb_Server *server); int m...
#pragma once /* * Copyright (C) 2005-2008 Team XBMC * http://www.xbmc.org * * 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, or (at your option) * any late...
#include "uart.h" #include "mailbox.h" #include "gpio.h" #include "queue.h" void uart_init(void) { /* 1. Disable UART */ *UART_CR = 0; /* Setup UART clock rate to 3 mhz */ mailbox_set_clock_rate(MAILBOX_UART_ID, 3000000); /* Setup GPIO */ /* Configure GPFSELn register to change alternate function */ /...
#include "logic.h" #include <string.h> #include <stdio.h> like* like_construct(like* self) { string_construct(&self->like_buffer); string_construct(&self->regex_buffer); vec_construct_(&self->ranges, string); self->regex = NULL; return self; } void like_destroy(like* self) { string* it = vec_begin(&self->ranges...
/* * Copyright (C) 2020 Southern Storm Software, Pty Ltd. * * 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, ...
/* Copyright (c) 2010-2018 the corto developers * * 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, mer...
/* * Copyright (C) 2014 BugAssassins * * 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 3 of the License, or * (at your option) any later version. * * This program is distr...
/* * Copyright (C) 2017 Intel Corporation. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
/* * Copyright (C) <NAME> * Copyright (C) NGINX, Inc. */ #include <nxt_main.h> /* The arguments passed to main(). */ char **nxt_process_argv; /* * MacOSX environ(7): * * Shared libraries and bundles don't have direct access to environ, * which is only available to the loader ld(1) when a complete progr...
/* * Copyright (c) 2016 Wind River Systems, Inc. * * SPDX-License-Identifier: Apache-2.0 */ #include <kernel.h> #include <toolchain.h> #include <linker/sections.h> #include <drivers/timer/system_timer.h> #include <wait_q.h> #include <power/power.h> #include <stdbool.h> #include <logging/log.h> #include <ksched.h> ...
/* This file is part of Bohrium and copyright (c) 2012 the Bohrium team <http://www.bh107.org>. Bohrium 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 3 of the License, or (at your option) ...
#include "network.h" #include <ctype.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "blockchain.h" /** * Vérifie que la blockchain du mineur est la plus grande. * * Si non, alors, sa blockchain est remplacée. */ bool _consensus(Network* network, Miner* ourMiner); /** ...
#include "mnu_pretazenie.h" #include "menu.h" #include "main.h" #include "lcd_s65_ls020.h" #include "variables.h" #include "definitions.h" #include "keys.h" #include <avr/pgmspace.h> #include "accelerometer.h" #include "delay.h" #include "language.h" #define STVOREC_X 76 #define STVOREC_Y 55 #define ...
/* * Copyright (c) 1983, 1995-1997 <NAME> * Copyright (c) 1988, 1993 * The Regents of the University of California. 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...
/* * gpdma_oneshot.c * Copyright (C) 2012 xent * Project is distributed under the terms of the MIT License */ #include <halm/platform/lpc/gpdma_defs.h> #include <halm/platform/lpc/gpdma_oneshot.h> #include <halm/platform/platform_defs.h> #include <assert.h> /*-------------------------------------------------------...
#ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #ifdef __MINGW32__ #define __USE_MINGW_ANSI_STDIO 1 #endif #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #ifdef _MSC_VER #define restrict __restrict #endif static void *xmalloc(const size_t len) { void *const p = malloc(len); if (p == NULL...
/* * Copyright (c) 2020 <NAME> * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr.h> #include <canbus/isotp.h> #define RX_THREAD_STACK_SIZE 512 #define RX_THREAD_PRIORITY 2 const struct isotp_fc_opts fc_opts_8_0 = {.bs = 8, .stmin = 0}; const struct isotp_fc_opts fc_opts_0_5 = {.bs = 0, .stmin = 5}; c...
#include "EEPROM.h" #include "Syslog.h" #include "Timing.h" #include "assert.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> /* ======================================= */ const uint16_t INVALID_PAGE_ADDRESS = 0xFFFF; typedef struct { uint16_t page; unsigned dirty:1; uint32_t t...
/**************************************************************************** * * Copyright (C) 2012 PX4 Development Team. 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. Redistri...
/******************************************************************************* Main Source File Company: Microchip Technology Inc. File Name: main_d2x.c Summary: This file contains the "main" function for a project. Description: This file contains the "main" function for a project. The "...
/* Based on Doom Fire as described by <NAME> */ /* http://fabiensanglard.net/doom_fire_psx/ */ #include <stddef.h> #include <stdint.h> #ifdef VMWOS #include "syscalls.h" #include "vlibc.h" #include "vmwos.h" #else #include <stdio.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #endif #include "svmwgra...
#ifdef __APPLE__ #include <TargetConditionals.h> #endif #include <fcntl.h> #include <math.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/errno.h> #include <sys/socket.h> #include <time.h> #include <unistd.h> #include <inttypes.h> #include <gc/gc.h> const char **zion_a...
/* * "[...] Sincerity (comprising truth-to-experience, honesty towards the self, * and the capacity for human empathy and compassion) is a quality which * resides within the laguage of literature. It isn't a fact or an intention * behind the work [...]" * * - An introduction to Literary and Cultural T...