text stringlengths 3.08k 10.5k |
|---|
/*
* This config file is for the RockBox as application on the Samsung YP-R0 player.
* The target name for ifdefs is: SAMSUNG_YPR0; or CONFIG_PLATFORM & PLAFTORM_YPR0
*/
/* We don't run on hardware directly */
/* YP-R0 need it too of course */
#ifndef SIMULATOR
#define CONFIG_PLATFORM (PLATFORM_HOSTED)
#endif
/* F... |
/**
* \file
*
* \brief USART Example application for AVR UC3 USART driver.
*
* Copyright (c) 2014-2018 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 exclusively wi... |
#include "framework/memory.h"
#include "framework/logger.h"
#include "internal.h"
//
#include "hash_set_u32.h"
void hash_set_u32_init(struct Hash_Set_U32 * hash_set) {
*hash_set = (struct Hash_Set_U32){0};
}
void hash_set_u32_free(struct Hash_Set_U32 * hash_set) {
MEMORY_FREE(hash_set, hash_set->key_hashes);
MEMO... |
#include "App.h"
#include "VHelp.h"
#define CTRL_BTN_EXIT 0
#define LINE_PER_PAGE 6
const char *mw_version = "Ver 1.0.1";
const char *mw_author = "Mine War Project";
const char *mw_release_time = "2016-9-29";
const char *mw_help_description[] = {
"#MineWar:",
"MineWar is a mini defence game.",
"#Rule:"... |
#include "AVR_TTC_scheduler.h"
#include <avr/io.h>
#include <avr/interrupt.h>
// The array of tasks
sTask SCH_tasks_G[SCH_MAX_TASKS];
/*------------------------------------------------------------------*-
SCH_Dispatch_Tasks()
This is the 'dispatcher' function. When a task (function)
is due to run, SCH_Dispa... |
void apiTX(String apiBIN, int apipulsewidth, int apidatainterval, int wait) {
wg.pause();
digitalWrite(DATA0, HIGH);
pinMode(DATA0,OUTPUT);
digitalWrite(DATA1, HIGH);
pinMode(DATA1,OUTPUT);
for (int i=0; i<=apiBIN.length(); i++) {
if (apiBIN.charAt(i) == '0') {
digitalWrite(DATA0, LOW);
dela... |
/*
* Copyright (C) 2018, Verizon, Inc. All rights reserved.
*/
/* Includes ------------------------------------------------------------------*/
#include "bg96_modem.h"
#include "board_buttons.h"
#include "cmsis_os.h"
#include "gpio.h"
#include "plf_config.h"
#include "rtc.h"
#include "usart.h"
#include "dc_common.h"... |
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
inline const char * bool_to_str (const bool);
inline const char * charptr_to_str (const char * const);
enum Verbosity {
Quiet,
Verbose,
Debug
};
struct pet_opts_t {
char * input_fn; /* input filen... |
/* Copyright (c) 20XX 9front
*
* 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, distri... |
/*
* tcp.c
*
* Created on: Jun 15, 2011
* Author: chenxm
*/
#include <assert.h>
#include "order.h"
/*
* Search for a continuous segment in order
*/
static seq_t *tcp_cont_seq(seq_t *lst)
{
while (lst->next != NULL && lst->nxt_seq == lst->next->seq)
lst = lst->next;
return lst;
}
/*
* r... |
/* Microcontroller graphic demo by <NAME>
* <EMAIL> http://www.serveurperso.com
* https://www.youtube.com/watch?v=wyuJ-dqS2to
* Ported to stm32/ChibiOS/glx by <NAME>.
* It's spinnin' bubbles, man.
* --
* Licencing? Ask Pascal. Let's assume it is freely-distributable and
* modifiable, provided his name is kept in... |
#pragma ident "$Id: data.c,v 1.11 2016/09/01 17:26:45 dechavez Exp $"
/*======================================================================
*
* Handle data port connection
*
*====================================================================*/
#include "qcal.h"
#define MY_MOD_ID QCAL_MOD_DATA
static ISI_RAW_... |
/*
* Copyright (C) 2020 Nalys
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief Test application for the candev abstraction
*
* ... |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <qthread/qthread.h>
#include "argparsing.h"
typedef struct {
aligned_t n;
aligned_t result;
} f_arg_t;
typedef struct {
f_arg_t fargs[2];
aligned_t *target;
} fr_arg_t;
static aligned_t validation[] = {
0,... |
#include "l_type_ca_channel.h"
// L_type_Ca_channel Initialisation function
void LTypeCaChannelInit(LTypeCaChannel* me) {
// Initialise State
me->state = L_TYPE_CA_CHANNEL_Q0;
// Initialise Outputs
me->i_ca_l = 0.0;
me->i_caca = 0.0;
me->i_cak = 0.0;
me->i_cana = 0.0;
me->gamma_nai = 0... |
/*
** $Id$
**
** captionbar.c: Captionbar window for Feynman PMP solution.
**
** Copyright (C) 2007 Feynman Software, all rights reserved.
**
** Use of this source package is subject to specific license terms
** from Beijing Feynman Software Technology Co., Ltd.
**
** URL: http://www.minigui.com
**
** Current maintaine... |
/* allnet_radio.c: show all incoming broadcast messages to which we subscribe */
/* special handling shows how early or late time messages are */
/* if run as root and message is from an authenticated sender whose
* name is allnet_time, sets the system time to the received time */
#include <stdio.h>
#include... |
/* Copyright (C) 2001-2021 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license ... |
#include <stdio.h> /* for printf() and fprintf() */
#include <sys/socket.h> /* for socket(), bind(), and connect() */
#include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */
#include <stdlib.h> /* for atoi() and exit() */
#include <string.h> /* for memset() */
#include <unistd.h> /* for close() */
#define MAXPEND... |
#include <sys/logging.h>
#include <sys/memory.h>
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <sys/profiler.h>
///Bitmap of every page in the system, and whether its free (0) or used (1).
uintptr_t * bitmap;
///bitmap size.
size_t bitmap_sz = 0x0;
#define PAGE_SIZE 0x1000
static uint32_t first_... |
#include <AOS-unix/vga_graph.h>
//the vga identifiers
unsigned int VGA_width;
unsigned int VGA_height;
unsigned int VGA_bpp;
unsigned char *VGA_address;
/**
* CREATE THE REGISTER ARRAY TAKEN FROM http://wiki.osdev.org/VGA_Hardware
*/
unsigned char mode_320_200_256[]={
/* MISC
*
* 0x63 => 01100011
* 7 6... |
#include "Prim.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
void create_path( MAZE *maze,int block_id) {
if(maze->map[block_id]){// 如果现在已经是路了 1
return;
}
if (!block_id) {
block_id = randomselect(maze->block_count); //随机选择一个格子 :第一次调用
}
maze->map[block_id] = 1; // 所处的位置... |
/*
* Copyright (c) 1999-2003 <NAME> <<EMAIL>>
* Copyright (c) 2004 <NAME> <<EMAIL>>
* Copyright (c) 2003-2005 <NAME> <<EMAIL>>
* Copyright (c) 2007 <NAME> <<EMAIL>>
* Copyright (c) 2009 <NAME> <<EMAIL>>
* Copyright (c) 2009-2010 <NAME> <<EMAIL>>
* Copyright (c) 2012 <NAME> <<EMAIL>>
* Copyright (c) 2005-2015 <N... |
/* Copy-and-pasted from CPython */
/* This code implemented by <EMAIL> */
/* Fast NonRecursiveMutex support by <NAME>, <EMAIL> */
/* Eliminated some memory leaks, <EMAIL> */
#include <windows.h>
#include <stdio.h>
#include <limits.h>
#include <process.h>
/*
* Thread support.
*/
/* In rpython, this file is pulled ... |
/**
* @file Timer_public_tm4c.c
* @author <NAME> (<EMAIL>/<EMAIL>)
* @brief Implements the timer driver for the software on the TM4C platform.
*
* Task ref: [UT_2.8.1]
*
* @version 0.1
* @date 2021-02-01
*
* @copyright Copyright (c) 2021
*
*/
/* ---------------------------------------------------------... |
#include "user.h"
#include "stat.h"
#include "fcntl.h"
#include "../p9.h"
#include "net/byteorder.h"
uint8_t* parse_tstat(struct p9_fcall *f, uint8_t* buf, int len) {
f->fid = GBIT32(buf);
buf += BIT32SZ;
return buf;
}
uint8_t* parse_twstat(struct p9_fcall *f, uint8_t* buf, int len) {
// TODO
return buf;
}
int ... |
#include <stdlib.h>
#include <assert.h>
#include "tir_driver.h"
#include "tir_img.h"
#include "tir_hw.h"
#include "list.h"
#include "cal.h"
#include <stdio.h>
#include <string.h>
#include "pref_global.h"
#include "runloop.h"
#include "image_process.h"
#include "usb_ifc.h"
#include "dyn_load.h"
#include "utils.h"
#inclu... |
//Day2b.c
//
//Question 2: The keypad is this weird diamond-shaped thing. What is the
//bathroom code?
//
// +---+
// | 1 |
// +---+---+---+
// | 2 | 3 | 4 |
// +---+---+---+---+---+
// | 5 | 6 | 7 | 8 | 9 |
// +---+---+---+---+---+
// | A | B | C |
// +---+---+---+... |
#include <stdio.h>
#include <stdlib.h>
int h[10] = {3, 1, 5, 4, 2, 7, 9, 5, 6, 0};
void insertionsortiscute(int **a, int n){
int i, j, boo[2];
for(i = 1; i < n; i++){
boo[0] = a[i][0];
boo[1] = a[i][1];
j = i - 1;
while(j >= 0 && a[j][0] > boo[0]){
a[j + 1][0] = a[j][0];
a[j + 1][1] = a[j][1];
j = ... |
#include "blackbox.h"
#include "cx/container/hashtable.h"
#include "cx/utils/lazyinit.h"
#include "cx/thread/mutex.h"
// do not make this static; the symbol should be visible for debugging purposes!
char dbgBlackBox[BLACKBOX_SIZE];
#define dbgBlackBoxHead (((uint16*)dbgBlackBox)[0])
#define dbgBlackBoxTail (((uint16*... |
#include "fakecsmaradio.h"
// Emulate this bitrate on the radios
// (emulate some (but not all) collission modes for
// simultaneous transmission).
int emulated_bitrate = 128000;
int rfd900_setbitrate(char *b)
{
int bits= atoi(b);
if (bits>0) {
emulated_bitrate=bits;
fprintf(stderr,"RFD900 bitrate set to ... |
#include <kernel.h>
#include <logging/log.h>
#include <string.h>
#include <zephyr.h>
#include "core.h"
#define MAX_RING_SIZE 11
LOG_MODULE_REGISTER(core, 4);
extern struct k_msgq net_request_msgq; // from Net
extern struct k_msgq sensor_a_data_stream; // from Sensor
extern struct k_msgq sensor_b_data_stream; ... |
/*
* @brief This example shows how to opertate on external flash operations.
*
* @note
* Copyright(C) NXP Semiconductors, 2014
* All rights reserved.
*
* @par
* Software that is described herein is for illustrative purposes only
* which provides customers with programming information regarding the
* LPC produ... |
// Copyright 2019 Shift Cryptosecurity AG
//
// 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 ... |
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/statvfs.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/mount.h>
#ifdef HAVE_ZFS
#include "zfs_hack.h"
#endif
static const char *suppress_fstype[] = {
"devfs", "autofs", "ctfs", "dev", "fd... |
#include "crisp.h"
// This file contains code for the foreign function interface.
//
// Try to resolve a symbol from a string of the form libname.symname
// libname must be defined in env
cell find_ffi_sym(char* sym_name, cell env) {
char* dot = sym_name;
char* cur = sym_name;
// split sym_name at the la... |
int Z_Bar2d_Maxi(int x, int y, int nMode, int nSymbol, int nTotal,
int nClass, int nCountry, char* cZipCode1, char* cZipCode2,
char* data, int increase);
int Z_Bar2d_PDF417(int x, int y, int o, int h, int s, int c, int r, int t,
int narrow, char* data, int increase);
int Z_Bar2d_DataMatrix(int x, i... |
/* vim: set et : */
/************************************************************************
* Id: log.c *
* *
* TR069 Project: A TR069 library in C *
* C... |
#include "common.h"
#define TARGET_PSX
#define F3M_FREQ 44100
#define F3M_BUFLEN 882
#define F3M_CHNS 2
#include "f3m.c"
player_s s3mplayer;
//extern mod_s fsys_s3m_test[];
int main(void);
void yield(void);
extern volatile uint8_t _BSS_START[];
extern volatile uint8_t _BSS_END[];
extern volatile uint32_t int_handle... |
/*
* util_opt_command_example - Example program for util_opt with commands
*
* Copyright 2017 IBM Corp.
*
* s390-tools is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
//! [code]
#include <errno.h>
#include <stdio.h>
#include <stdlib.h... |
#include "robot_odometry.h"
float angleIntegral = 0;
float angularSpeedControl = 0;
float angleIntgController = 0;
float v_x = 0;
float v_y = 0;
float wheel_speed_A = 0;
float wheel_speed_B = 0;
float wheel_speed_C = 0;
bool odom_permeation_flag = false;
/**
* @brief ... |
#include "Fw_global_config.h"
#include "stdio.h"
#include "ql_riff.h"
#include "riff_internal.h"
#include "string.h"
#include "dbg_uart.h"
static struct riff_block_pool da_common_block_pool;
/* validate a block pool pointer with its magic number */
void riff_valid_block_pool( struct riff_block_pool *pPool )
{
if(... |
/*
* Copyright (c) 2022, NVIDIA CORPORATION.
*
* 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 ... |
/*
* Copyright (C) 2021 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, ... |
/*-------------------------------------------------------------------------
*
* discardworker.c
* The undo discard worker for asynchronous undo management.
*
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENT... |
/*
* os9_conv.c
*
* Apple ][ "The Mill" OS9 DSK image to OS9 RBF format (and back) converter
*
* Created on: 07 gen 2017
* Author: <NAME>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define TRACKS 35 /* There are 35 tracks in an Apple ][ standa... |
/*
* Copyright (C) 1989-2015, <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 retain the above copyright notice,
* this list of cond... |
#include "Type.h"
#include "GL.h"
#include "R.h"
#define ARRAY_SIZE(a) sizeof(a)/sizeof(a[0])
static const char *resTable[]={
"btn_aim_cursor",
"btn_back_n",
"btn_back",
"btn_cancel",
"btn_cursor",
"btn_down",
"btn_help",
"btn_honor",
"btn_menu",
"btn_next",
"btn_off",
... |
/*
* Copyright (c) 2008,2009 <NAME> <<EMAIL>>
*
* 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 all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR ... |
// oled.c Display useful information on the 0.96" OLED display.
// Uses this library: https://github.com/bitbank2/oled_96
// Written by <EMAIL>, 2019-11-15
#include <stdint.h>
#include <string.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <linux/kernel... |
#include <obs-module.h>
#include <graphics/image-file.h>
#include <util/dstr.h>
#define SETTING_IMAGE_PATH "image_path"
#define SETTING_CLUT_AMOUNT "clut_amount"
#define TEXT_IMAGE_PATH obs_module_text("Path")
#define TEXT_AMOUNT obs_module_text("Amount")
stru... |
#include "imagetoasm.h"
#include <stdlib.h>
#include <getopt.h>
#include <string.h>
#define BITS 8
#define LABEL "label"
#define OFFSET 0
#define SKIP 1
#define SIZE 16
#define RAW 0
#define ASM 1
#define PGM 2
#define VERSION "1.01.01"
#define DATE "20190215"
void help(char *);
void version(void);
/*
* imagetoasm:... |
/*-------------------------------------------------------------------------
*
* update.c
*
* Copyright (c) 2018, PipelineDB, Inc.
*
*-------------------------------------------------------------------------
*/
#include <unistd.h>
#include <sys/utsname.h>
#include "postgres.h"
#include "pgstat.h"
#include "funca... |
/*
* Copyright (c) 2017, Fuzhou Rockchip Electronics Co., Ltd
* Author: <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <clk.h>
#include <display.h>
#include <dm.h>
#include <fdtdec.h>
#include <panel.h>
#include <regmap.h>
#include "rk_mipi.h"
#include <syscon.h>
#include <... |
/*
* RELIC is an Efficient LIbrary for Cryptography
* Copyright (C) 2007, 2008, 2009 RELIC Authors
*
* This file is part of RELIC. RELIC is legal property of its developers,
* whose names are not listed here. Please refer to the COPYRIGHT file
* for contact information.
*
* RELIC is free software; you can redis... |
/*
* SubRip subtitle demuxer
* Copyright (c) 2010 <NAME> <<EMAIL>>
*
* This file is part of FFmpeg.
*
* FFmpeg 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 Licen... |
#include <sbmf/sbmf.h>
#include <stdio.h>
#define USE_TF_GUESS 0
#define USE_GAUSSIAN_GUESS 0
#define USE_RANDOM_GUESS 0
/* Logging function for sbmf to use */
void log_callback(enum sbmf_log_level log_level, const char* msg) {
printf("%s\n", msg);
}
void gaussian0(f64* out, f64* in, u32 len, void* data) {
for (u3... |
#include <math.h>
#include <SDL2/SDL.h>
SDL_Window *window;
SDL_Renderer *renderer;
#define TAU 2 * 3.141592654
#define RADIUS 50
#define GAP 40
typedef struct {
int x, y;
int a, b;
float r;
int prev_x, prev_y;
}Driver;
typedef struct {
int x, y;
float a, b;
int prev_x, prev_y;
}Curve;
... |
/* SPDX-License-Identifier: GPL-2.0-only */
/* Generic device ID of a discovery table device */
#define UNCORE_DISCOVERY_TABLE_DEVICE 0x09a7
/* Capability ID for a discovery table device */
#define UNCORE_EXT_CAP_ID_DISCOVERY 0x23
/* First DVSEC offset */
#define UNCORE_DISCOVERY_DVSEC_OFFSET 0x8
/* Mask of the sup... |
/* This file contains subroutine used by the C front-end to construct GENERIC.
Copyright (C) 2000-2018 Free Software Foundation, Inc.
Written by <NAME> (<EMAIL>).
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as publish... |
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
*
* 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
* righ... |
#include "schedule.h"
#include "idt/system_call_handler.h"
#include "idt/terminal.h"
#include "lib.h"
#include "paging.h"
#include "paging_asm.h"
#include "x86_desc.h"
#include "i8259.h"
#include "drivers/pit.h"
uint32_t counter_for_terminal = 0;
/* void schedule(void);
* Inputs: none
* Return Value: void
* Func... |
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// Copyright(C) 2006 <NAME>
//
// 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... |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#ifndef CS
#define CS 4098
#endif
#define CacheSZ CS*1024/sizeof(double)
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.h>
double GetWallTime(void)
{
struct timeval tp;
static long start=0, startu;
if (!start)
{
... |
/**********************************************************************
Each of the companies; Qualcomm, and Lucent (hereinafter
referred to individually as "Source" or collectively as "Sources") do
hereby state:
To the extent to which the Source(s) may legally and freely do so, the
Source(s), upon submission of a ... |
/**************************************************************************//**
* @file
* @brief Si114x UV Index measurement
* @version 4.1.0
******************************************************************************
* @section License
* <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b>
*********... |
/*
* Copyright (c) 1982, 1986, 1990, 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 source code must retain the... |
/*******************************************************************************************************
Programs for Arduino - Copyright of the author <NAME> - 29/12/20
This program is supplied as is, it is up to the user of the program to decide if the program is
suitable for the i... |
/*
* Copyright (c) 2017 Intel Corporation. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source ... |
/*
Copyright (C) 2020 <NAME>
This file is part of "vetr - Trust, but Verify"
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) any later version.
... |
#include <stdio.h>
#include "osd_cpu.h"
#include "memory.h"
#include "scamp.h"
static UINT8 OP(unsigned pc)
{
return cpu_readop(pc);
}
static UINT8 ARG(unsigned pc)
{
return cpu_readop_arg(pc);
}
unsigned DasmScamp(char *buff, unsigned pc)
{
UINT8 op, arg = 0;
unsigned PC = pc;
char s[7];
op = OP(pc);
if (op... |
/*
* Copyright 2018 Advanced Micro Devices, Inc.
*
* 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 "matrix.h"
/*
* Desenha matriz na tela.
*
* @param a Matriz em formato de vetor.
* @param h Altura da matriz.
* @param w Largura da matriz.
*
*/
void matrix_print(uint8_t *a, int16_t h, int16_t w){
printf("[print] matrix is a %dx%d\n", h, w);
int16_t i = 0;
while (i < h){
int16_t j = 0;
while... |
#include "io.h"
uint8_t base16m_encode(uint8_t x) {
return x + 'A';
}
uint8_t base16m_decode(uint8_t x) {
return x - 'A';
}
void recv_byte(int fd, uint8_t *buf) {
uint8_t bl, br;
read(fd, &bl, sizeof(uint8_t));
read(fd, &br, sizeof(uint8_t));
bl = base16m_decode(bl);
br = base16m_decode(br);
*buf = (bl << 4)... |
#include <u.h>
#include <libc.h>
#include <draw.h>
#include <event.h>
#include <panel.h>
#include "pldefs.h"
typedef struct Button Button;
struct Button{
int btype; /* button type */
Icon *icon; /* what to write on the button */
int check; /* for check/radio buttons */
void (*hit)(Panel *, int, int); /* call ... |
/* i8259.c - Functions to interact with the 8259 interrupt controller
* vim:ts=4 noexpandtab
*/
#include "i8259.h"
#include "lib.h"
/* Interrupt masks to determine which interrupts are enabled and disabled
* master_mask and slave_mask are updated by enable_irq and disable_irq */
uint8_t master_mask = 0xFB; /* IRQs... |
/*
* lws-crypto-x509
*
* Written in 2010-2019 by <NAME> <<EMAIL>>
*
* This file is made available under the Creative Commons CC0 1.0
* Universal Public Domain Dedication.
*/
#include <libwebsockets.h>
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
static int
read_pem(const char *filename, char *p... |
/*
* fontconfig/src/fcdefault.c
*
* Copyright © 2001 <NAME>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and thi... |
/*
* Copyright 2020-2021 NXP
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#include <common/debug.h>
#include "dcfg.h"
#include <lib/mmio.h>
#ifdef NXP_SFP_ENABLED
#include <sfp.h>
#endif
static soc_info_t soc_info = {0};
static devdisr5_info_t devdisr5_info = {0};
static dcfg_init_info_t *dcfg_init_info;
/* R... |
/* readtokens.c -- Functions for reading tokens from an input stream.
Copyright (C) 1990-1991 <NAME>.
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... |
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
/*
* This file is part of The Croco Library
*
* Copyright (C) 2002-2003 <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2.1 of the GNU Lesser General Public
* License as publ... |
//
// Desktop.c
// KAOS
//
// Created by <NAME> on 16.05.2019.
// Copyright (c) 2019 <NAME>. All rights reserved.
//
// This code is based on http://www.trackze.ro
//
#include "Desktop.h"
#include "../Heap/Heap.h"
#include "../drivers/common.h"
// This array represents the definition of the Mouse Pointer Image
u... |
/*
* disp_1100.c
*
* Copyright (c) 2012, 2013, 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 code must retain the above copyright notice,
* ... |
/*
* iplink_bridge_slave.c Bridge slave device support
*
* 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 Licen... |
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 700
#endif
#include "progress.h"
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
struct Progress {
pthread_mutex_t lock[1];
pthread_cond_t condition[1];
pthread_t thread;
int64_t value;
int64_t total;
int done;
... |
/* dma-alloc.c: consistent DMA memory allocation
*
* Derived from arch/ppc/mm/cachemap.c
*
* PowerPC version derived from arch/arm/mm/consistent.c
* Copyright (C) 2001 <NAME> (<EMAIL>)
*
* linux/arch/arm/mm/consistent.c
*
* Copyright (C) 2000 <NAME>
*
* Consistent memory allocators. Used for DMA devic... |
#include "lib.h"
#include <mmu.h>
#include <env.h>
#define debug 0
static int pipeclose(struct Fd*);
static int piperead(struct Fd *fd, void *buf, u_int n, u_int offset);
static int pipestat(struct Fd*, struct Stat*);
static int pipewrite(struct Fd *fd, const void *buf, u_int n, u_int offset);
struct Dev devpipe =
{
... |
/**
* \file main.c
* \brief Monitor input and output
* \author <NAME>
* \version 1.0
* \date 2015 Jul 29
* \copyright 2015 <NAME>
* \section License The MIT License (MIT)
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation fil... |
/*
* Copyright (C) 2004-2006 Atmel Corporation
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <command.h>
#include <image.h>
#include <u-boot/zlib.h>
#include <asm/byteorder.h>
#include <asm/arch/addrspace.h>
#include <asm/io.h>
#include <asm/setup.h>
#include <asm/arch/clk.h>
DECLARE_GLOBAL... |
/*
* Copyright (c) 2020-2020, illusionyear
*
* License: MIT
*
* Change Logs:
* Date Author Notes
* 2020-05-24 illusionyear the first version
*/
#include "lightcube.h"
rt_sem_t sem_lcd = RT_NULL;
rt_sem_t sem_led = RT_NULL;
rt_sem_t sem_shake = RT_NULL;
rt_sem_t sem_clzled = RT_NULL;
/* 定... |
/*
*
* Project: IoT Energy Meter with C/C++, Java/Spring, TypeScript/Angular and Dart/Flutter;
* About: End-to-end implementation of a LoRaWAN network for monitoring electrical quantities;
* Version: 1.0;
* Backend Mote: ATmega328P/ESP32/ESP8266/ESP8285/STM32;
* Radios: ... |
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - <NAME>
* Copyright (C) 2011-2017 - <NAME>
* Copyright (C) 2012-2015 - <NAME>
*
* RetroArch 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 Fou... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2000 AG Electronics Ltd.
* Copyright (C) 2003-2004 Linux Networx
* Copyright (C) 2004 Tyan
* Copyright (C) 2010 Win Enterprises (<EMAIL>)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Ge... |
/**
* AES XTS routines supporting VMX In-core instructions on Power 8
*
* Copyright (C) 2015 International Business Machines 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 Foundations; versio... |
/*
* Copyright Supranational LLC
* Licensed under the Apache License, Version 2.0, see LICENSE for details.
* SPDX-License-Identifier: Apache-2.0
*/
#include "consts.h"
#include "sha256.h"
static const vec384 BLS12_381_RRRR = { /* RR^2 */
TO_LIMB_T(0xed48ac6bd94ca1e0), TO_LIMB_T(0x315f831e03a7adf8),
TO_L... |
/*
* QEMU Guest Agent helpers for win32 service management
*
* Copyright IBM Corp. 2012
*
* Authors:
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#include <stdlib.h>
#inc... |
/**
* Test the creation of a cubed-sphere structured grid.
*
* "$Id: tst_cubesphere_mosaic.c 767 2011-06-06 23:20:19Z pletzer $"
*/
#include "nccf_mosaic.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <netcdf.h>
#include "libcf_src.h"
#include "nccf_coord.h"
#include "ncc... |
/*
* util.h
*
* Utility definitions.
*
* Written & released by <NAME> <<EMAIL>>
*
* This is free and unencumbered software released into the public domain.
* See the file COPYING for more details, or visit <http://unlicense.org>.
*/
#define ASSERT(p) if (!(p)) illegal();
typedef char bool_t;
#define TRUE ... |
/*
CS205 project: Density equalizing map projections
Date: April 6th 2019
Compiler: gcc diff_map2.c -o exec -lm -lpng
project members: <NAME>, <NAME>, <NAME>
project goal: density equalizing map projections
Input files: -colchart.txt
-density.txt
-usa... |
/* Target support for C++ classes on Windows.
Contributed by <NAME> (<EMAIL>)
Copyright (C) 2005-2017 Free Software Foundation, Inc.
This file is part of GCC.
GCC 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 Founda... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.