repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
tinyos-io/tinyos-3.x-contrib
berkeley/quanto/tools/quanto/labjack/ue9.h
//Author: LabJack //Aug. 8, 2008 //Header for UE9 example helper functions. // //History //-(10/11/2005) added structure for storing calibration info //-(10/11/2005) added the following functions: // binaryToCalibratedAnalogVoltage // binaryToCalibratedAn...
tinyos-io/tinyos-3.x-contrib
nxtmote/misc/src/libusb-win32/libusb-win32-src-0.1.12.1/src/windows.c
/* LIBUSB-WIN32, Generic Windows USB Library * Copyright (c) 2002-2005 <NAME> <<EMAIL>> * Copyright (c) 2000-2005 <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; ...
tinyos-io/tinyos-3.x-contrib
eon/eon/src/runtime/linuxsim/rt_main.c
<gh_stars>1-10 #include "../mImpl.h" #include <sys/types.h> #include <unistd.h> #include <signal.h> extern uint8_t minPathState[NUMPATHS]; //int curstate = STATE_BASE; //float curgrade = 0.0; int main(int argc, char **argv) { int fd; int err; init(argc,argv); printf("starting sources...\n"); err = st...
tinyos-io/tinyos-3.x-contrib
eon/eon/src/runtime/stargate/rt_main.c
#include "../mImpl.h" #include "rt_intercomm.h" #include "sfaccess/telossource.h" #include <sys/types.h> #include <unistd.h> #include <signal.h> extern const uint8_t minPathState[NUMPATHS]; int curstate = STATE_BASE; float curgrade = 0.0; //#define LOCALDBG enum { AM_STATUS_MSG = 0xd1, AM_SLEEP_MSG = 0xd3, }; #...
tinyos-io/tinyos-3.x-contrib
wustl/upma/system/SenderDispatcher.h
<filename>wustl/upma/system/SenderDispatcher.h #ifndef SENDER_DISPATHCHER_H #define SENDER_DISPATHCHER_H enum { TDMA_SLOT = 0, CSMA_SLOT = 1, BEACON_SLOT = 2, NO_SLOT = 0xff, }; #endif
tinyos-io/tinyos-3.x-contrib
eon/tos/lib/tossim/sim_energy.c
<reponame>tinyos-io/tinyos-3.x-contrib #include <stdio.h> #include <tos.h> #include <sim_energy.h> int g_init = 0; sim_battery_t node_battery[TOSSIM_MAX_NODES]; void sim_energy_init_all() { int i; //printf("Initializing node_power variables to zero\n"); for (i=0; i< TOSSIM_MAX_NODES; i++) { sim_energy_...
tinyos-io/tinyos-3.x-contrib
gems/ttsp/tinyos/tos/lib/ttsp/TimeSyncMsg.h
#ifndef TIMESYNC_MSG_H #define TIMESYNC_MSG_H typedef nx_struct TtspMsg { nx_uint16_t rootID; // rootId nx_uint16_t nodeID; // nodeId nx_uint8_t seqNum; // sequence number for the root nx_uint32_t globalTime; nx_uint32_t localTime; nx_uint32_t syncPeriod; } TtspMsg; enum { TIMESYNCMSG_LEN = si...
tinyos-io/tinyos-3.x-contrib
eon/eon/src/runtime/linuxsim/simworld/simworld.c
<filename>eon/eon/src/runtime/linuxsim/simworld/simworld.c<gh_stars>1-10 #include <pthread.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <values.h> #include <stdarg.h> #include <string.h> #include "simworld.h" //#define __USE_GNU //#include "/usr/include/dlfcn.h" //#include <dlfcn.h> void __...
tinyos-io/tinyos-3.x-contrib
stanford-sing/libs/fwp/sim/TossimRadioMsg.h
#ifndef TOSSIM_RADIO_MSG_H #define TOSSIM_RADIO_MSG_H #include "AM.h" typedef nx_struct tossim_header { nx_am_addr_t dest; nx_am_addr_t src; nx_uint8_t length; nx_am_id_t type; nx_uint8_t quiet; // added for FWP } tossim_header_t; typedef nx_struct tossim_footer { nxle_uint16_t crc; } tossim_footer_t; ...
tinyos-io/tinyos-3.x-contrib
berkeley/apps/AIIT_tutorials/8_RadioToCount/Counter.h
#ifndef PRINT_SERIAL_H #define PRINT_SERIAL_H #include "message.h" typedef nx_struct counter_msg { nx_uint16_t nodeid; nx_uint16_t counter; } counter_msg_t; enum { AM_COUNTER_MSG = 0x10, }; #endif
tinyos-io/tinyos-3.x-contrib
nxtmote/tos/platforms/nxtmote/interrupt_timer.h
<gh_stars>1-10 /** * Adapted for nxtmote. * @author <NAME> */ #ifndef INTERRUPT_TIMER_H #define INTERRUPT_TIMER_H void timer_init ( void ); extern volatile int count_timer0_interrupt; extern volatile int count_timer1_interrupt; #endif
tinyos-io/tinyos-3.x-contrib
eon/tos/lib/tossim/sim_energy.h
#ifndef _SIM_ENERGY_H_ #define _SIM_ENERGY_H_ #ifdef __cplusplus extern "C" { #endif typedef struct sim_battery_t { double in_mJ; double out_mJ; double size; double energy; double waste; } sim_battery_t; void sim_energy_init_all(); void sim_energy_init(int nodeId); double sim_node_energy(int nodeId); ...
tinyos-io/tinyos-3.x-contrib
intelmote2/tools/platforms/intelmote2/jflashmm/src/Compile_switches.h
<reponame>tinyos-io/tinyos-3.x-contrib<gh_stars>1-10 /****************************************************************************** ** ** COPYRIGHT (C) 2000, 2001, 2002 Intel Corporation. ** ** The information in this file is furnished for informational use ** only, is subject to change without notice, and sh...
tinyos-io/tinyos-3.x-contrib
diku/mcs51/tos/chips/mcs51/byteorder.h
/** * Keil byte order * uint16_t big endian (MSB first) * sfr16 little endian (LSB first) * * Keil stores multi-byte-values as big endian (MSB first, at the * lowest address). This means for uint16_t values the high order byte * (MSB) must be selected as the address for uint16_t values. * * sfr16 values t...
johann8384/udpbalancer
misc.h
<reponame>johann8384/udpbalancer /* * misc.h, 2005.07.18, SJ */ void drop_root(); long tvdiff(struct timeval a, struct timeval b); char *_extract(char *row, int ch, char *s, int size); unsigned long resolve_host(char *h); int readudppacket(int sd, char *buf, int size, int timeout, struct sockaddr *client_addr);
johann8384/udpbalancer
config.h
/* * config.h, 2005.07.18, SJ */ #define PROGNAME "udpbalancer" #define VERSION "0.1" #define LISTEN_ADDR "0.0.0.0" #define GGID 98 #define UUID 99 #define LOG_OPTION LOG_DEBUG #define LOG_FACILITY LOG_LOCAL4 #define TIMEOUT 1 #define MAX_LOST_PACKET 5 #define PACKETLEN 4096 #define TMPLEN 64 #define MAXHOST...
johann8384/udpbalancer
misc.c
<gh_stars>1-10 /* * misc.c, 2005.07.18, SJ */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <netdb.h> #include "config.h" void drop_root(){ setgid(GGID); ...
johann8384/udpbalancer
udpbalancer.c
<gh_stars>1-10 /* * udpbalancer.c, 2005.07.18, SJ */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> #include <netinet/in.h> #include <arpa/inet.h> #include <time.h> #include <unistd.h> #include <syslog.h> #include <signal.h> #include <s...
amrayn/residue-java
samples/jni/src/residue-jni.h
<gh_stars>0 // // Part of residue native binding for java // // Copyright (C) 2017-present Amrayn Web Services // // https://muflihun.com // https://amrayn.com // https://github.com/amrayn/residue-java // // Author: @abumusamq // #include <jni.h> #ifndef Residue_JNI_H #define Residue_JNI_H #ifdef __cplusplus extern "C...
ksk-/yqueue
src/YQueue/Queue.h
<reponame>ksk-/yqueue #pragma once #include <condition_variable> #include <functional> #include <optional> #include <boost/fiber/all.hpp> #include <boost/noncopyable.hpp> #include <YQueue/Defines.h> #include <YQueue/TypeTraits.h> namespace YQueue { /** * @class Queue * @brief Simple concurrent queue c...
ksk-/yqueue
src/YQueue/HashMap.h
<reponame>ksk-/yqueue #pragma once #include <algorithm> #include <forward_list> #include <optional> #include <shared_mutex> #include <thread> #include <vector> #include <boost/noncopyable.hpp> #include <YQueue/TypeTraits.h> namespace YQueue { /** * @class HashMap * @brief Simple thread-safe hashmap cl...
ksk-/yqueue
src/YQueue/Defines.h
<gh_stars>0 #pragma once namespace YQueue { /** * @enum Concurrency * @brief Defines concurrency models. */ enum class Concurrency : uint8_t { Threads = 0, /*!< thread-based concurrency */ Fibers = 1, /*!< fiber-based concurrency (see the Boost.Fiber library) */ }; }
ksk-/yqueue
src/YQueue/TypeTraits.h
#pragma once #include <type_traits> #define REQUIRES(...) typename = std::enable_if_t<__VA_ARGS__> #define EXISTS(type, expression) std::enable_if_t<std::is_same_v<type, decltype(expression)>> namespace YQueue::type_traits { /** * @brief Determines if the Callable is a stateless functional object that can ...
ksk-/yqueue
src/YQueue/FConsumer.h
#pragma once #include <functional> #include <YQueue/IConsumer.h> #include <YQueue/TypeTraits.h> namespace YQueue { /** * @class FConsumer * @brief Functional implementation of IConsumer. */ template<typename Key, typename Value> class FConsumer final : public IConsumer<Key, Value> { ...
ksk-/yqueue
tests/Testing.h
#pragma once #include <thread> #include <boost/noncopyable.hpp> #include <boost/test/included/unit_test.hpp> // NOTE: This is a requirement of Boost.Test. namespace std { template<typename Key, typename Value> inline std::ostream& operator<<(std::ostream& out, const std::pair<Key, Value>& pair) { ...
ksk-/yqueue
src/YQueue/Processor.h
<reponame>ksk-/yqueue<gh_stars>0 #pragma once #include <boost/asio/post.hpp> #include <boost/asio/thread_pool.hpp> #include <boost/circular_buffer.hpp> #include <boost/fiber/all.hpp> #include <boost/noncopyable.hpp> #include <boost/signals2.hpp> #include <YQueue/HashMap.h> #include <YQueue/IConsumer.h> #include <YQue...
ksk-/yqueue
src/YQueue/Utils.h
<filename>src/YQueue/Utils.h #pragma once #include <algorithm> #include <vector> #include <YQueue/TypeTraits.h> namespace YQueue::Utils { /** * @brief Checks if the map contains an element with the given key. * @tparam Map the map type * @tparam Key the key type */ template<typename Map, ...
ksk-/yqueue
src/YQueue/IConsumer.h
#pragma once namespace YQueue { /** * @interface IConsumer * @brief The interface of queue consumers. * @tparam Key queue identifier type (key) * @tparam Value consumed values type */ template<typename Key, typename Value> struct IConsumer { virtual ~IConsumer() = defau...
SYY-Robot/kubot_ros
tools/libfreenect2/tools/streamer_recorder/include/streamer.h
/* * This file is part of the OpenKinect Project. http://www.openkinect.org * * Copyright (c) 2017 individual OpenKinect contributors. See the CONTRIB file * for details. * * This code is licensed to you under the terms of the Apache License, version * 2.0, or, at your option, the terms of the GNU General Public...
SYY-Robot/kubot_ros
tools/libfreenect2/platform/android/libfreenect2/config.h
#ifndef LIBFREENECT2_CONFIG_H #define LIBFREENECT2_CONFIG_H #define LIBFREENECT2_VERSION "0.2.0" #define LIBFREENECT2_API_VERSION ((0 << 16) | 2) #define LIBFREENECT2_PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__)) #define LIBFREENECT2_API __attribute__((visibility("default"))) #define LIBFREENE...
SYY-Robot/kubot_ros
tools/libfreenect2/include/libfreenect2/led_settings.h
/* * This file is part of the OpenKinect Project. http://www.openkinect.org * * Copyright (c) 2011 individual OpenKinect contributors. See the CONTRIB file * for details. * * This code is licensed to you under the terms of the Apache License, version * 2.0, or, at your option, the terms of the GNU General Public...
SYY-Robot/kubot_ros
tools/libfreenect2/include/libfreenect2/color_settings.h
<gh_stars>1-10 /* * This file is part of the OpenKinect Project. http://www.openkinect.org * * Copyright (c) 2011 individual OpenKinect contributors. See the CONTRIB file * for details. * * This code is licensed to you under the terms of the Apache License, version * 2.0, or, at your option, the terms of the GNU...
SYY-Robot/kubot_ros
tools/libfreenect2/tools/streamer_recorder/include/recorder.h
/* * This file is part of the OpenKinect Project. http://www.openkinect.org * * Copyright (c) 2017 individual OpenKinect contributors. See the CONTRIB file * for details. * * This code is licensed to you under the terms of the Apache License, version * 2.0, or, at your option, the terms of the GNU General Public...
SYY-Robot/kubot_ros
tools/libfreenect2/include/internal/libfreenect2/protocol/command.h
/* * This file is part of the OpenKinect Project. http://www.openkinect.org * * Copyright (c) 2011 individual OpenKinect contributors. See the CONTRIB file * for details. * * This code is licensed to you under the terms of the Apache License, version * 2.0, or, at your option, the terms of the GNU General Public...
rixo/tree-sitter-svelte-atom
src/parser.c
#include <tree_sitter/parser.h> #if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif #define LANGUAGE_VERSION 12 #define STATE_COUNT 276 #define LARGE_STATE_COUNT 2 #define SYMBOL_COUNT 86 #define ALIAS_COUNT 1 #define TOKEN_COUNT...
wixa/IFC_Driver_lib
src/IFC_Driver.h
#include "fw/src/mgos_init.h" #include <stdbool.h> #include <stdio.h> #include "fw/src/mgos_gpio.h" #include "freertos/FreeRTOS.h" #include "freertos/timers.h" bool mgos_IFC_Driver_init(void); // Required - initialisation function void test_on (int led); void led_start (void *pvParameters);
wixa/IFC_Driver_lib
src/IFC_Driver.c
<reponame>wixa/IFC_Driver_lib #include "IFC_Driver.h" // NOTE: library init function must be called mgos_LIBNAME_init() bool mgos_IFC_Driver_init(void) { return true; } void led_start (void *pvParameters){ for( ;; ){ printf("led_start started!!!!!!!!!! \n"); int led_on; led_on = (intptr_t) pvParameter...
compileSuccess/ttcc-sim
lib/rang.h
// Rang library, copied from https://github.com/agauniyal/rang // You can ignore this file, it is used for printing to the console in color. #ifndef RANG_DOT_HPP #define RANG_DOT_HPP #if defined(__unix__) || defined(__unix) || defined(__linux__) #define OS_LINUX #elif defined(WIN32) || defined(_WIN32) || defined(_WIN...
compileSuccess/ttcc-sim
lib/cog.h
#ifndef COG_H #define COG_H #include <iostream> #include <string> class Cog { public: Cog() : level(0), hp(0), maxHP(0), trapped(0), luredKnockback(0), luredRounds(0), presLured(false), currLureMax(0), soaked(0), toUnsoak(false), executive(false), defense(0), version(0) {} Cog(int lvl) : Cog(lvl, false, 0) {}...
compileSuccess/ttcc-sim
lib/battle.h
#ifndef BATTLE_H #define BATTLE_H #include "cogset.h" #include "gag_collection.h" #include <iostream> #include <map> #include <queue> #include <stdexcept> #include <vector> #define EXE_CHANCE 30 struct GagComparator { bool operator()(const Gag& first, const Gag& second) const { return first.damage > second.damag...
compileSuccess/ttcc-sim
lib/cogset.h
<reponame>compileSuccess/ttcc-sim #ifndef COGSET_H #define COGSET_H #include "cog.h" #include "gag_collection.h" #include <queue> #include <stdexcept> #include <stdlib.h> class Cogset { public: Cogset() {} Cogset(std::vector<Cog> set) : cogs(set) {} Cogset& operator=(const Cogset& other); void load();...
compileSuccess/ttcc-sim
lib/gag_collection.h
#ifndef GAG_COLLECTION_H #define GAG_COLLECTION_H #include <map> #include <stdexcept> #include <stdlib.h> #include <string> enum class GagKind { PASS = -1, TOONUP = 0, TRAP = 1, LURE = 2, SOUND = 3, SQUIRT = 4, ZAP = 5, THROW = 6, DROP = 7, FIRE = 8, }; enum class SosKind { ...
compileSuccess/ttcc-sim
lib/colors.h
#ifndef COLORS_H #define COLORS_H #define TRAPPED rang::fgB::red << rang::style::bold #define LURED rang::bgB::green << rang::style::bold #define SOAKED rang::fgB::blue << rang::style::bold #define ZAPPED rang::fgB::yellow << rang::style::bold #define THROWN rang::fgB::gray << rang::style::bold #define DROPPED rang::f...
compileSuccess/ttcc-sim
lib/game_config.h
#ifndef GAME_CONFIG #define GAME_CONFIG #include <cstdint> #include <string> class GameConfig { public: bool autoPres = true; bool autoHit = true; bool roundUpdate = false; bool lineInput = true; std::string gagFilePath = "gags.txt"; static GameConfig read(std::string file); static bool ...
rebeccaserramari/Kyoshi
hapcolor.h
<reponame>rebeccaserramari/Kyoshi<filename>hapcolor.h #ifndef HAPCOLOR_H #define HAPCOLOR_H #include <iostream> #include <list> #include <vector> #include <string> #include <set> #include <unordered_set> #include <climits> #include <iostream> #include <memory> #include <iterator> #include <algorithm> #include <sstream...
wwoods/job_stream
job_stream/debug_internals.h
#ifndef JOB_STREAM_DEBUG_INTERNALS_H_ #define JOB_STREAM_DEBUG_INTERNALS_H_ #include <stdexcept> #include <sstream> #if defined(__linux__) || defined(unix) || defined(__unix__) #define OS_LINUX 1 #elif defined(__APPLE__) #define OS_APPLE 1 #elif defined(_WIN32) || defined(_WIN64) #define OS_WINDOWS 1 #els...
wwoods/job_stream
job_stream/job_stream.h
<filename>job_stream/job_stream.h<gh_stars>10-100 #ifndef JOB_STREAM_H_ #define JOB_STREAM_H_ #include "invoke.h" #include "message.h" #include "job.h" #include "processor.h" #include "serialization.h" #include "types.h" #include "yaml.h" #include <boost/mpi.hpp> #include <functional> #include <string> namespace job...
wwoods/job_stream
job_stream/workerThread.h
<gh_stars>10-100 #pragma once #include <thread> namespace job_stream { namespace processor { class Processor; class WorkerThread { public: /** Starts a new WorkerThread that processes work from p. */ WorkerThread(Processor* p, int workerIndex); /** Joins the thread. */ void join(); /** The mai...
wwoods/job_stream
test/common.h
#pragma once #include <string> std::tuple<std::string, std::string> run(std::string prog, std::string args, std::string input); std::tuple<int, std::string, std::string> runRetval(std::string prog, std::string args, std::string input); void runWithExpectedOut(std::string prog, std::string args, std::...
wwoods/job_stream
job_stream/types.h
#pragma once #include <mutex> #include <sstream> namespace job_stream { typedef std::recursive_mutex Mutex; typedef std::lock_guard<Mutex> Lock; namespace processor { class Processor; } /** Helper class for debug code (see JOB_STREAM_DEBUG). Outputs the message encoded to it (at...
wwoods/job_stream
job_stream/module.h
<reponame>wwoods/job_stream #ifndef JOB_STREAM_MODULE_H_ #define JOB_STREAM_MODULE_H_ #include "job.h" #include "message.h" #include "types.h" #include "yaml.h" #include <map> #include <memory> #include <mutex> namespace job_stream { namespace module { /** A collection of jobs with an optional reducing component. *...
wwoods/job_stream
job_stream/invoke.h
#ifndef JOB_STREAM_INVOKE_H_ #define JOB_STREAM_INVOKE_H_ #include <string> #include <tuple> #include <vector> namespace job_stream { namespace invoke { /** Runs an application to completion, returning up to two strings for stdout and stderr. Retries up to 20 times for "No child processes" issue. Raises an...
wwoods/job_stream
job_stream/job.h
#ifndef JOB_STREAM_JOB_H_ #define JOB_STREAM_JOB_H_ #include "message.h" #include "types.h" #include "yaml.h" #include <memory> #include <mutex> #include <string> namespace job_stream { namespace module { class Module; } namespace job { class JobBase; class ReducerBase; typedef std::map<ReducerBase*,...
wwoods/job_stream
job_stream/yaml.h
#ifndef YAML_PROTO_H_ #define YAML_PROTO_H_ #include "types.h" #include <yaml-cpp/yaml.h> namespace YAML { class GuardedNode; //Allows Node.as<NodeList>(); typedef std::vector<Node> NodeList; template<> struct convert<NodeList> { static Node encode(const NodeList& rhs) { Node...
wwoods/job_stream
job_stream/message.h
#ifndef JOB_STREAM_MESSAGE_H_ #define JOB_STREAM_MESSAGE_H_ #include "serialization.h" #include <string> #include <vector> namespace job_stream { namespace message { /** Meta data passed with any message. */ struct Header { /** For boost */ Header() {} Header(Header&& other) : tag(oth...
wwoods/job_stream
job_stream/pythonType.h
/** Header for the SerializedPython type so that it is integrated into decoding objects. */ #pragma once #include <boost/serialization/serialization.hpp> #include <iostream> namespace job_stream { namespace python { /** Python data stored as a pickle string */ struct SerializedPython { std::string data; ...
wwoods/job_stream
job_stream/serialization.h
<filename>job_stream/serialization.h #ifndef JOB_STREAM_SERIALIZATION_H_ #define JOB_STREAM_SERIALIZATION_H_ //Guard against boost default serializations, which do not support unique_ptr //correctly. #ifdef BOOST_SERIALIZATION_VECTOR_HPP #error Include job_stream serialization before boost/serialization/vector.hpp #e...
wwoods/job_stream
job_stream/processor.h
<reponame>wwoods/job_stream<gh_stars>10-100 #ifndef JOB_STREAM_PROCESSOR_H_ #define JOB_STREAM_PROCESSOR_H_ #include "job.h" #include "message.h" #include "module.h" #include "types.h" #include "workerThread.h" #include "yaml.h" #include <boost/mpi.hpp> #include <deque> #include <fstream> #include <functional> #inclu...
ULL-ESIT-IB-2020-2021/ib-practica11-oop-cmake-Ivan-Garcia02
Racionales/src/racional.h
<reponame>ULL-ESIT-IB-2020-2021/ib-practica11-oop-cmake-Ivan-Garcia02 /** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @file racional.h (declaraciones) * @author <NAME> <EMAIL> * @date 7 Enero 2021 * @brief Desarrol...
ULL-ESIT-IB-2020-2021/ib-practica11-oop-cmake-Ivan-Garcia02
Complejos/src/complejo.h
<filename>Complejos/src/complejo.h /** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @file complejo.h (declaraciones) * @author <NAME> <EMAIL> * @date 7 Enero 2021 * @brief Desarrolle un programa cliente complejos.cc...
ULL-ESIT-IB-2020-2021/ib-practica11-oop-cmake-Ivan-Garcia02
Racionales/src/tools.h
/** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @file tools.h (declaraciones funciones) * @author <NAME> <EMAIL> * @date 7 Enero 2021 * @brief Desarrolle un programa cliente racionales.cc que permita operar con núm...
ULL-ESIT-IB-2020-2021/ib-practica11-oop-cmake-Ivan-Garcia02
Modificacion/src/fecha2.h
<filename>Modificacion/src/fecha2.h /** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @file fecha.h (declaraciones) * @author <NAME> <EMAIL> * @date 7 Enero 2021 * @brief Desarrolle una clase Fecha que permita repres...
ULL-ESIT-IB-2020-2021/ib-practica11-oop-cmake-Ivan-Garcia02
Modificacion/src/tools2.h
<gh_stars>0 /** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @file tools.h (declaraciones funciones) * @author <NAME> <EMAIL> * @date 7 Enero 2021 * @brief Desarrolle una clase Fecha que permita representar y gestio...
onlyless/Vocabulary-Statistics
cpp/RBTree.h
#pragma once #include<string> #include<iostream> #include<fstream> #include<cstdio> #define RED true; #define BLACK false; using namespace std; class RBTree { private: class Node { public: string word; bool color; int cnt; int N; Node *left=NULL, *right=NULL; Node(string _word, int _cnt, int _N, bool _...
OccasionallyPassing/XYCycleCollectionView
XYCycleCollectionView/XYCycleCollectionView/XYScycleCollectionView/XYCollectionViewCell.h
<reponame>OccasionallyPassing/XYCycleCollectionView // // XYCollectionViewCell.h // XYScyleCollectionView // // Created by MiPai on 2017/11/14. // Copyright © 2017年 wangyu. All rights reserved. // #import <UIKit/UIKit.h> @interface XYCollectionViewCell : UICollectionViewCell @property (nonatomic, strong) UIImage...
OccasionallyPassing/XYCycleCollectionView
XYCycleCollectionView/XYCycleCollectionView/XYScycleCollectionView/XYScycleCollectionView.h
<filename>XYCycleCollectionView/XYCycleCollectionView/XYScycleCollectionView/XYScycleCollectionView.h // // XYScycleCollectionView.h // XYScyleCollectionView // // Created by MiPai on 2017/11/14. // Copyright © 2017年 wangyu. All rights reserved. // #import <UIKit/UIKit.h> @class XYScycleCollectionView; @protocol...
OccasionallyPassing/XYCycleCollectionView
XYCycleCollectionView/XYCycleCollectionView/ViewController.h
<reponame>OccasionallyPassing/XYCycleCollectionView // // ViewController.h // XYCycleCollectionView // // Created by MiPai on 2017/11/15. // Copyright © 2017年 wangyu. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end
OccasionallyPassing/XYCycleCollectionView
XYCycleCollectionView/XYCycleCollectionView/XYScycleCollectionView/XYPageControl.h
// // XYPageControl.h // XYCycleCollectionView // // Created by MiPai on 2017/11/15. // Copyright © 2017年 wangyu. All rights reserved. // #import <UIKit/UIKit.h> @interface XYPageControl : UIPageControl @property (nonatomic) UIImage * currentImage; //高亮图片 @property (nonatomic) UIImage * defaultImage; //默认图片 ...
OccasionallyPassing/XYCycleCollectionView
XYCycleCollectionView/XYCycleCollectionView/DeallocTestViewController.h
<filename>XYCycleCollectionView/XYCycleCollectionView/DeallocTestViewController.h // // DeallocTestViewController.h // XYCycleCollectionView // // Created by MiPai on 2017/11/20. // Copyright © 2017年 wangyu. All rights reserved. // #import <UIKit/UIKit.h> @interface DeallocTestViewController : UIViewController @...
OccasionallyPassing/XYCycleCollectionView
XYCycleCollectionView/XYCycleCollectionView/XYScycleCollectionView/XYCollectionViewFlowLayout.h
// // XYCollectionViewFlowLayout.h // XYScyleCollectionView // // Created by MiPai on 2017/11/14. // Copyright © 2017年 wangyu. All rights reserved. // #import <UIKit/UIKit.h> @interface XYCollectionViewFlowLayout : UICollectionViewFlowLayout @end
fractional-ray/ParaView
ParaViewCore/VTKExtensions/Default/vtkCSVWriter.h
<reponame>fractional-ray/ParaView<filename>ParaViewCore/VTKExtensions/Default/vtkCSVWriter.h /*========================================================================= Program: ParaView Module: vtkCSVWriter.h Copyright (c) Kitware, Inc. All rights reserved. See Copyright.txt or http://www.paraview.org...
OdyX/pappl
pappl/client.c
<filename>pappl/client.c // // Client processing code for the Printer Application Framework // // Copyright © 2019-2021 by <NAME>. // Copyright © 2010-2019 by Apple Inc. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // // // Include necessary headers... // #include "pappl-...
OdyX/pappl
pappl/system-accessors.c
// // System accessor functions for the Printer Application Framework // // Copyright © 2020 by <NAME>. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // // // Include necessary headers... // #include "system-private.h" #ifdef HAVE_LIBJPEG # include <jpeglib.h> # ifndef J...
OdyX/pappl
pappl/job.h
<gh_stars>1-10 // // Public job header file for the Printer Application Framework // // Copyright © 2019-2020 by <NAME>. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // #ifndef _PAPPL_JOB_H_ # define _PAPPL_JOB_H_ // // Include necessary headers... // # include "base.h...
OdyX/pappl
pappl/log.c
<reponame>OdyX/pappl // // Logging functions for the Printer Application Framework // // Copyright © 2019-2020 by <NAME>. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // // // Include necessary headers... // #include "client-private.h" #include "job-private.h" #include "l...
OdyX/pappl
pappl/printer.c
<reponame>OdyX/pappl // // Printer object for the Printer Application Framework // // Copyright © 2019-2021 by <NAME>. // Copyright © 2010-2019 by Apple Inc. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // // // Include necessary headers... // #include "pappl-private.h" ...
OdyX/pappl
pappl/printer-accessors.c
// // Printer accessor functions for the Printer Application Framework // // Copyright © 2020-2021 by <NAME>. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // // // Include necessary headers... // #include "printer-private.h" #include "system-private.h" // // 'papplPrint...
OdyX/pappl
pappl/printer-usb.c
<filename>pappl/printer-usb.c // // USB printer class support for the Printer Application Framework // // Copyright © 2019-2020 by <NAME>. // Copyright © 2010-2019 by Apple Inc. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // // // Include necessary headers... // #include...
melexis-fir/mlx90640-driver-py
mlx90640/c-code/src/mlx90640_driver_register.c
<filename>mlx90640/c-code/src/mlx90640_driver_register.c #include "mlx90640_driver_register.h" #include <string.h> #include <stdio.h> #include <stdlib.h> #define DRIVER_LIST_LEN 10 static struct MLX90640DriverRegister_t *g_driver_list[DRIVER_LIST_LEN]; static int16_t g_active_driver_index = -1; void mlx90640_regist...
melexis-fir/mlx90640-driver-py
mlx90640/c-code/main.c
#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include "MLX90640_I2C_Driver.h" #include "MLX90640_API.h" #include "mlx90640_driver_register.h" // #include "MLX90640_I2C_Driver_mcp2221.h" // #include "MLX90640_I2C_Driver_devtree.h" #define MLX_I2C_ADDR 0x33 int ma...
dorinbotan/M1280-Board-Drivers
Clock/Clock/DS1337.h
<reponame>dorinbotan/M1280-Board-Drivers<filename>Clock/Clock/DS1337.h #ifndef DS1337_H_ #define DS1337_H_ #include <avr/io.h> //void rtc_init(void (*)(uint8_t*)); void rtc_setTime(uint8_t h, uint8_t m, uint8_t s, void (*)(uint8_t*)); void rtc_setDate(uint8_t y, uint8_t m, uint8_t d, void (*)(uint8_t*)); void rtc_get...
dorinbotan/M1280-Board-Drivers
ringbuffer.h
<reponame>dorinbotan/M1280-Board-Drivers #include <inttypes.h> #ifndef RINGBUFFER_H #define RINGBUFFER_H #define RING_BUFFER_SIZE 128 #if (RING_BUFFER_SIZE & (RING_BUFFER_SIZE - 1)) != 0 #error "RING_BUFFER_SIZE must be a power of two" #endif typedef uint8_t ring_buffer_size_t; #define RING_BUFFER_MASK (RING_BUFFE...
dorinbotan/M1280-Board-Drivers
HandIn/DS1337.c
#include "DS1337.h" #include "twi.h" #define DEVICE_ID 0x68 uint8_t _toBcd(uint8_t value) { return ((value / 10) << 4) + (value % 10); } //uint8_t fromBcd(uint8_t value) //{ //return (value >> 4) * 10 + (value & 0x0F); //} void rtc_init(void (*callbackFunction)(uint8_t*)) { twi_init(100000L); uint8_t data[1] =...
dorinbotan/M1280-Board-Drivers
HandIn/main1.c
<reponame>dorinbotan/M1280-Board-Drivers #include <avr/io.h> #include <avr/interrupt.h> #include "display.h" #include "DS1337.h" void _display_value(uint8_t *value) { // From BCD uint8_t second = (value[0] >> 4) * 10 + (value[0] & 0x0F); uint8_t minute = (value[1] >> 4) * 10 + (value[1] & 0x0F); float toDisplay = ...
dorinbotan/M1280-Board-Drivers
HandIn/main2.c
<reponame>dorinbotan/M1280-Board-Drivers<gh_stars>0 #include <avr/io.h> #include <avr/interrupt.h> #include "mcu.h" const uint8_t DIGIT[10] = { 0xFC, 0x60, 0xDA, 0xF2, 0x66, 0xB6, 0xBE, 0xE0, 0xFE, 0xF6 }; uint8_t init = 0; int8_t value_by_digits[4] = { -1, -1, -1, -1 }; uint8_t current = 0; ISR(TIMER0_OVF_vect) { ...
dorinbotan/M1280-Board-Drivers
usart0.c
#include <avr/interrupt.h> #include <avr/io.h> #include <util/atomic.h> #include "usart0.h" ring_buffer_t usart0_recv_ring_buf; ring_buffer_t usart0_send_ring_buf; void usart0_init(void) { cli(); ring_buffer_init(&usart0_recv_ring_buf); ring_buffer_init(&usart0_send_ring_buf); UCSR0A = 0; // Enable USAR...
dorinbotan/M1280-Board-Drivers
usart.h
#include <avr/io.h> #include "ringbuffer.h" #ifndef USART_H #define USART_H typedef struct { ring_buffer_size_t (*usart_recv_queue_size)(void); ring_buffer_size_t (*usart_recv_dequeue)(char *data); ring_buffer_size_t (*usart_recv_peek)(char *data, ring_buffer_size_t index); void (*usart_send)(char data); vo...
dorinbotan/M1280-Board-Drivers
spi.c
#include "spi.h" #include <avr/interrupt.h> void (*callbackFunction)(uint8_t*); ISR(SPI_STC_vect) { callbackFunction(SPDR); } void spi_init(uint8_t data_order, uint8_t mode, uint8_t polarity, uint8_t phase) { // MOSI SCK SS DDRB |= _BV(PINB2) | _BV(PINB1) | _BV(PINB0); SPCR = ( _BV(SPIE...
dorinbotan/M1280-Board-Drivers
Clock/Clock/twi.c
<reponame>dorinbotan/M1280-Board-Drivers #include "twi.h" #include <avr/interrupt.h> #include <util/twi.h> #include "mcu.h" #define TWI_SendStart() (TWCR = (1 << TWINT) | (1 << TWSTA) | (1 << TWEN) | (1 << TWIE)) #define TWI_SendStop() (TWCR = (1 << TWINT) | (1 << TWSTO) | (1 << TWEN) | (1 << TWIE)) #define TWI_Sen...
dorinbotan/M1280-Board-Drivers
mcu.h
<reponame>dorinbotan/M1280-Board-Drivers #ifndef BIT_MANIPULATION_ #define BIT_MANIPULATION_ #ifndef F_CPU #define F_CPU 7372800L #endif #define SET_BIT(ADDRESS, BIT_POSITION) (ADDRESS |= _BV(BIT_POSITION)) #define CLEAR_BIT(ADDRESS, BIT_POSITION) (ADDRESS &= ~_BV(BIT_POSITION)) #define TOGGLE_BIT(ADDRESS, BIT_POSITI...
dorinbotan/M1280-Board-Drivers
Clock/Clock/spi.h
#ifndef SPI_H_ #define SPI_H_ #include <avr/io.h> #define SPI_DATA_ORDER_LSB_FIRST 1 #define SPI_DATA_ORDER_MSB_FIRST 0 #define SPI_MODE_MASTER 1 #define SPI_MODE_SLAVE 0 #define SPI_CLOCK_POLARITY_HIGH 1 #define SPI_CLOCK_POLARITY_LOW 0 #define SPI_CLOCK_PHASE_SAMPLE_LEADING 0 #define SPI_CLOCK_PHASE_SAMPLE_TRAILING...
dorinbotan/M1280-Board-Drivers
HandIn/display.c
#include "display.h" #include "spi.h" #include "mcu.h" #include <avr/interrupt.h> const uint8_t DIGIT[10] = { 0xFC, 0x60, 0xDA, 0xF2, 0x66, 0xB6, 0xBE, 0xE0, 0xFE, 0xF6 }; uint8_t init = 0; int8_t value_by_digits[4] = { -1, -1, -1, -1 }; uint8_t current = 0; void _trigger(uint8_t *dummy) { // Display value PORTL &...
dorinbotan/M1280-Board-Drivers
usart0.h
<filename>usart0.h<gh_stars>0 #include "usart.h" #include "ringbuffer.h" #ifndef USART0_H #define USART0_H void usart0_init(void); ring_buffer_size_t usart0_recv_queue_size(void); ring_buffer_size_t usart0_recv_dequeue(char *data); ring_buffer_size_t usart0_recv_peek(char *data, ring_buffer_size_t index); void usart...
dorinbotan/M1280-Board-Drivers
ringbuffer.c
<gh_stars>0 #include "ringbuffer.h" void ring_buffer_init(ring_buffer_t *buffer) { buffer->tail_index = 0; buffer->head_index = 0; } void ring_buffer_queue(ring_buffer_t *buffer, char data) { if(ring_buffer_is_full(buffer)) buffer->tail_index = ((buffer->tail_index + 1) & RING_BUFFER_MASK); buffer->buffe...
dorinbotan/M1280-Board-Drivers
display.c
#include "display.h" #include "spi.h" #include "mcu.h" #include <avr/interrupt.h> const uint16_t DISPLAY[4] = { PL3, PL0, PL1, PL2 }; const uint8_t DIGIT[10] = { 0xFC, 0x60, 0xDA, 0xF2, 0x66, 0xB6, 0xBE, 0xE0, 0xFE, 0xF6 }; uint8_t init = 0; int8_t value_by_digits[4] = { -1, -1, -1, -1 }; uint8_t current = 0; ISR(TI...
dorinbotan/M1280-Board-Drivers
spi.h
<gh_stars>0 #ifndef SPI_H_ #define SPI_H_ #include <avr/io.h> #define SPI_DATA_ORDER_LSB_FIRST 1 #define SPI_DATA_ORDER_MSB_FIRST 0 #define SPI_MODE_MASTER 1 #define SPI_MODE_SLAVE 0 #define SPI_CLOCK_POLARITY_HIGH 1 #define SPI_CLOCK_POLARITY_LOW 0 #define SPI_CLOCK_PHASE_LEADING 0 #define SPI_CLOCK_PHASE_TRAILING 1...
dorinbotan/M1280-Board-Drivers
display.h
#ifndef DISPLAY_H_ #define DISPLAY_H_ void display_value(unsigned short); #endif /* DISPLAY_H_ */
dorinbotan/M1280-Board-Drivers
Clock/Clock/main.c
#include <avr/io.h> #include <avr/interrupt.h> #include "display.h" #include "DS1337.h" #include "twi.h" //#include "USART/usart.h" //#include "USART/usart0.h" uint8_t fromBcd(uint8_t value) { return (value >> 4) * 10 + (value & 0x0F); } uint8_t status = 0; void a1(uint8_t *value) { status = 1; display_value(from...
dorinbotan/M1280-Board-Drivers
led.h
#ifndef LED_H_ #define LED_H_ void init_leds() { DDRH = 0xFF; PORTH = 0x00; } // led_no [1..8], state [0..1] void set_led(uint8_t led_no, uint8_t state) { if(led_no < 9 && led_no > 0) if(state) PORTH |= 1 << (8 - led_no); else PORTH &= ~(1 << (8 - led_no)); } #endif /* LED_H_ */
dorinbotan/M1280-Board-Drivers
debounced_key.h
#ifndef DEBOUNCED_KEY_H_ #define DEBOUNCED_KEY_H_ void init_debounced_keys() { DDRE &= ~((1 << 4) | (1 << 5)); } // key_no [1..2], return true if key pressed uint8_t get_debounced_key(uint8_t key_no) { if (key_no != 1 && key_no != 2) return 0; if ((1 << key_no + 3) & PINE) return 1; return 0; } #endif /* D...