repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication/PointerImplementation.h
/** * @author <NAME> 14.07.2016 * * Communication related implementation that is ought to be passed as pointer or callback. */ #pragma once #include "uc-core/configuration/IoPins.h" /** * Writes a logic high to the north transmission pin. */ void northTxHiImpl(void) { NORTH_TX_HI; } /** * Writes a logic ...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/interrupts/TimerCounter1.h
/** * @author <NAME> 20.07.2016 * * Timer / counter 1 related configuration. */ #pragma once #include <avr/interrupt.h> #include "TimerCounter.h" #if defined(__AVR_ATtiny1634__) || defined(__AVR_ATmega16__) # define __TIMER1_INTERRUPT_CLEAR_PENDING_COMPARE_A \ (((TIFR & (1 << OCF1A)) != 0) ? TIFR = (1 << ...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/CommunicationProtocol.h
/** * @author <NAME> 2016 * * Communication protocol related arguments. */ #pragma once /** * On timeout the current communication falls back to the communication's start state. The counter * is decremented each main loop. A zero value indicates the timeout. * Reasonable values are ∈ [128, UINT8_MAX]. */ #def...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/scheduler/SchedulerTypesCtors.h
/* * @author <NAME> 18.09.2016 * * Scheduler types constructor implementation. */ #pragma once #include "SchedulerTypes.h" #include "common/common.h" /** * constructor function * @param o the object to construct **/ void constructSchedulerTask(SchedulerTask *const o) { o->startTimestamp = 0; o->endTimest...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/types/ParticleTypesCtors.h
/* * @author <NAME> 2016 * * Particle types constructor implementation. */ #pragma once #include "ParticleTypes.h" #include "NodeAddressTypesCtors.h" #include "AlertsTypesCtors.h" #include "DiscoveryPulseCountersCtors.h" #include "CommunicationTypesCtors.h" #include "uc-core/communication/CommunicationTypesCtors....
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/interrupts/TimerCounter0.h
<gh_stars>1-10 /** * @author <NAME> 20.07.2016 * * Timer / counter 0 related configuration. */ #pragma once #include <avr/interrupt.h> #include "TimerCounter.h" #if defined(__AVR_ATtiny1634__) || defined(__AVR_ATmega16__) # if defined(__AVR_ATmega16__) # define __TIMER0_INTERRUPT_WAVE_GENERATION_MODE_PWM_PH...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/evaluation/Evaluation.h
<reponame>ProgrammableMatter/particle-firmware<filename>src/avr-common/utils/uc-core/evaluation/Evaluation.h<gh_stars>1-10 /** * @author <NAME> 15.10.2016 * * Evaluation related implementation. */ #pragma once #include "uc-core/particle/Globals.h" void heatWiresTask(SchedulerTask *const task); #ifdef EVALUATION...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/periphery/PeripheryTypesCtors.h
/* * @author <NAME> 18.09.2016 * * Periphery types constructor implementation. */ #pragma once #include "PeripheryTypes.h" /** * constructor function * @param o the object to construct **/ void constructBlinkAddress(BlinkAddress *const o) { o->blinkColumnCounter = 0; o->blinkRowCounter = 0; o->blinkA...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/interrupts/DiscoveryTimer.h
/** * @author <NAME> 20.07.2016 * * Discovery timer interrupt related configuration. */ #pragma once #include "TimerCounter1.h" // TODO: rename misleading "sense" to discovery pulse #define __TIMER_NEIGHBOUR_SENSE_PRESCALER_VALUE \ __TIMER_COUNTER_PRESCALER_8 #define __TIMER_NEIGHBOUR_SENSE_PRESCALER_ENABL...
ProgrammableMatter/particle-firmware
src/avr-common/utils/common/PortADefinition.h
<reponame>ProgrammableMatter/particle-firmware<filename>src/avr-common/utils/common/PortADefinition.h /** * @author <NAME> 2015 */ #pragma once #include <avr/io.h> #define AOut PORTA #define AIn PINA #define ADir DDRA
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/parity/Parity.h
<gh_stars>1-10 /** * @author <NAME> 22.09.2016 * * Parity related implementation. */ #pragma once #include "uc-core/communication/CommunicationTypes.h" #include "common/common.h" #include "simulation/SimulationMacros.h" /** * Stores the even parity bit of the TxPort's buffer to the same buffer. * The port data...
ProgrammableMatter/particle-firmware
src/particle-simulation-sendheader-test/main/main.c
/** * @author <NAME> 21.07.2016 */ #define SIMULATION_SEND_HEADER_TEST #include <uc-core/particle/ParticleLoop.h> int main(void) { processLoop(); return 0; }
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication-protocol/CommunicationProtocolTypes.h
/** * @author <NAME> 13.07.2016 * * Communication related types definitions. */ #pragma once #include <stdint.h> /** * Describes communication states of the initiator. The initiator is the particle which * started the communication. */ typedef enum CommunicationInitiatorStateTypes { COMMUNICATION_INITIAT...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/discovery/DiscoveryTypesCtors.h
/* * @author <NAME> 09.10.2016 * * Discovery types constructor implementation. */ #pragma once #include "DiscoveryTypes.h" /** * constructor function * @param o the object to construct */ void constructDiscoveryPulseCounter(DiscoveryPulseCounter *const o) { o->counter = 0; o->isConnected = false; }
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/synchronization/SampleFifoTypes.h
/** * @author <NAME> 26.09.2016 * * Synchronization FiFo related types. */ #pragma once #include <stdint.h> #include "BasicCalculationTypes.h" #include "uc-core/configuration/synchronization/SampleFifoTypes.h" #include "LeastSquareRegressionTypes.h" typedef struct FifoElement { SampleValueType value; uin...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/time/TimeTypesCtors.h
/** * @author <NAME> 12.07.2016 * * Time types constructor implementation. */ #pragma once #include "TimeTypes.h" #include "uc-core/configuration/Time.h" /** * constructor function * @param o the object to construct */ void constructLocalTimeTracking(LocalTimeTracking *const o) { o->numTimePeriodsPassed ...
ProgrammableMatter/particle-firmware
src/avr-common/utils/common/PortBDefinition.h
<reponame>ProgrammableMatter/particle-firmware<gh_stars>1-10 /** * @author <NAME> 2015 */ #pragma once #include <avr/io.h> #define BOut PORTB #define BIn PINB #define BDir DDRB
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/synchronization/Synchronization.h
<gh_stars>1-10 /** * @author <NAME> 24.09.2016 * * Synchronization related implementation. */ #pragma once #include "uc-core/configuration/synchronization/Synchronization.h" #include "uc-core/configuration/communication/Communication.h" #include "uc-core/configuration/communication/Commands.h" #include "uc-core/p...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/communication/Commands.h
/** * @author <NAME> 3.10.2016 * * Communication related arguments. */ #pragma once #define COMMANDS_EXPECTED_TIME_PACKAGE_RECEPTION_DURATION UINT16_MAX
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/interrupts/LocalTime.h
<reponame>ProgrammableMatter/particle-firmware /** * @author <NAME> 20.07.2016 * Local time tracking related configuration. */ #pragma once #include "TimerCounter1.h" #if defined(__AVR_ATtiny1634__) || defined(__AVR_ATmega16__) # define LOCAL_TIME_INTERRUPT_COMPARE_VALUE (OCR1B) # define LOCAL_TIME_INTERRUPT...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/types/CommunicationTypes.h
<gh_stars>1-10 /* * @author <NAME> 09.10.2016 * * Communication state definition. */ #pragma once #include <stdint.h> #include "uc-core/discovery/DiscoveryTypes.h" #include "uc-core/communication/CommunicationTypes.h" #include "uc-core/communication-protocol/CommunicationProtocolTypes.h" /** * facade to bundle p...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication-protocol/Commands.h
/** * @author <NAME> 12.07.2016 * * Received package/command related implementation. */ #pragma once #include "uc-core/configuration/communication/Commands.h" #include "CommunicationProtocolTypes.h" #include "CommunicationProtocolPackageTypesCtors.h" #include "uc-core/communication/ManchesterDecodingTypes.h" #in...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/Time.h
<reponame>ProgrammableMatter/particle-firmware /** * @author <NAME> 12.07.2016 * * Local time related arguments. */ #pragma once #include "uc-core/configuration/communication/Communication.h" /** * Put the local time tracking ISR timer counter in phase once the local time is updated by a time package. * Disab...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/Leds.h
<filename>src/avr-common/utils/uc-core/configuration/Leds.h /** * @author <NAME> 2016 * * LEDs related arguments. */ #pragma once /** * Enable define to suppress all LED outputs. * Disable define to enable all LED outputs. */ #define LEDS_SUPPRESS_OUTPUT
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/synchronization/Synchronization.h
<filename>src/avr-common/utils/uc-core/configuration/synchronization/Synchronization.h /** * @author <NAME> 24.09.2016 * * Synchronization related arguments. */ #pragma once /** * The difference of measured synchronization package durations are shifted by the synthetic offset UINT16_MAX/2=0x7fff * to overcome t...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication/ManchesterDecodingTypesCtors.h
/** * @author <NAME> 2016 * * Manchester types constructor implementation. */ #pragma once #include "ManchesterDecodingTypes.h" /** * constructor function * @param o reference to the object to construct */ void constructSnapshot(Snapshot *const o) { o->isRisingEdge = false; o->timerValue = 0; } /** ...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/scheduler/Scheduler.h
/** * @author <NAME> 11.10.2016 * * Scheduler related implementation. */ #pragma once #include "Scheduler.h" #include "uc-core/particle/Globals.h" #include "common/common.h" #include "uc-core/particle/types/ParticleStateTypes.h" void taskEnableNodeTypeLimit(uint8_t taskId, NodeType nodeType) { SchedulerTask...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/actuation/ActuationTypes.h
/** * @author <NAME> 12.07.2016 * * Actuation types definition. */ #pragma once #include <stdint.h> /** * Describes all possible output modes. */ typedef enum HeatingLevelType { HEATING_LEVEL_TYPE_MAXIMUM = 0x0, HEATING_LEVEL_TYPE_STRONG = 0x1, HEATING_LEVEL_TYPE_MEDIUM = 0x2, HEATING_LEVEL_TYP...
ProgrammableMatter/particle-firmware
src/avr-common/utils/common/PortDDefinition.h
/** * @author <NAME> 2015 */ #pragma once #include <avr/io.h> #define DOut PORTD #define DIn PIND #define DDir DDRD
ProgrammableMatter/particle-firmware
src/avr-common/utils/common/PortCDefinition.h
<gh_stars>1-10 /** * @author <NAME> 2015 */ #pragma once #include <avr/io.h> #define COut PORTC #define CIn PINC #define CDir DDRC
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/synchronization/LeastSquareRegressionTypes.h
/** * @author <NAME> 23.09.2016 * * Linear Least Squares Regression related types. */ #pragma once #include <stdint.h> #include "BasicCalculationTypes.h" typedef struct LeastSquareRegressionResult { /** * k as known of f(x)=k*x+d */ CalculationType k; /** * d as known of f(x)=k*x+d */...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/types/NodeAddressTypes.h
<gh_stars>1-10 /* * @author <NAME> 2016 * * Node address state definition. */ #pragma once #include <stdint.h> /** * The node address in the network. The origin node is addressed as row=1, column=1. * Address (0,0) is reserved. */ typedef struct NodeAddress { uint8_t row; uint8_t column; } NodeAddress...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/discovery/DiscoveryTypes.h
/* * @author <NAME> 09.10.2016 * * Discovery state definition. */ #pragma once #include <stdint.h> /** * The discovery pulse counter stores the amount of discovery pulses and the connectivity state. */ typedef struct DiscoveryPulseCounter { // discovery pulse counter volatile uint8_t counter : 5; /...
ProgrammableMatter/particle-firmware
src/particle-simulation/main/main.c
/** * @author <NAME> 2015 */ #include <uc-core/particle/ParticleLoop.h> int main(void) { processLoop(); return 0; }
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/synchronization/LeastSquareRegression.h
/** * @author <NAME> 23.09.2016 * * Linear Least Squares Regression related implementation. */ #pragma once #include "SynchronizationTypes.h" #include "Deviation.h" /** * Calculating Linear Least Squares fitting function for measured values: * https://en.wikipedia.org/wiki/Linear_least_squares_(mathematics)#Or...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/interrupts/Vectors.h
<filename>src/avr-common/utils/uc-core/configuration/interrupts/Vectors.h /** * @author <NAME> 20.07.2016 * * ISR vector names related configuration. */ #pragma once #include <avr/interrupt.h> #define RESET_VECT _VECTOR(0) #if defined(__AVR_ATtiny1634__) # define NORTH_PIN_CHANGE_INTERRUPT_VECT \ PCINT2_vec...
ProgrammableMatter/particle-firmware
src/particle-transmission-simulation/main/main.c
/** * @author <NAME> 2016 */ #include "uc-core/particle/Particle.h" //unsigned char __stuff __attribute__((section(".noinit"))); /** * A mocked up particle loop. It puts the particle in an initialized reception state. */ void processLoop(void) { forever { process(); } } /** * starts a configur...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/ParticleLoop.h
/** * @author <NAME> 2016 * * The main loop implementation. */ #pragma once #include "Particle.h" /** * The main particle loop. It repetitively calls the state driven particle core implementation. */ extern inline void processLoop(void) __attribute__ ((noreturn)); inline void processLoop(void) { IO_PORTS_...
ProgrammableMatter/particle-firmware
src/particle/main/main.c
/** * @author <NAME> 2015 */ #include <uc-core/particle/ParticleLoop.h> FUSES = { .low = (FUSE_SUT_CKSEL0 & FUSE_SUT_CKSEL2 & FUSE_SUT_CKSEL3 & FUSE_SUT_CKSEL4 & FUSE_CKOUT), .high = HFUSE_DEFAULT, .extended = EFUSE_DEFAULT, }; int main(void) { processLoop(); return 0; }
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication/CommunicationTypesCtors.h
<filename>src/avr-common/utils/uc-core/communication/CommunicationTypesCtors.h<gh_stars>1-10 /** * @author <NAME> 2016 * * Communication types constructor implementation. */ #pragma once #include <math.h> #include "CommunicationTypes.h" #include "ManchesterDecodingTypesCtors.h" /** * constructor function * @par...
ProgrammableMatter/particle-firmware
src/avr-common/utils/common/PortInteraction.h
/** * @author <NAME> 2011 */ #pragma once /** * pin definition */ #define Pin0 1 #define Pin1 2 #define Pin2 4 #define Pin3 8 #define Pin4 16 #define Pin5 32 #define Pin6 64 #define Pin7 128 /** * better readable expressions for manipulating port direction */ #define setIn &= ~ #define setOut |= #define setHi...
ProgrammableMatter/particle-firmware
src/particle-reception-simulation/main/main.c
<gh_stars>1-10 /** * @author <NAME> 2016 */ #include "uc-core/particle/Particle.h" //unsigned char __stuff __attribute__((section(".noinit"))); /** * A mocked up particle loop. It puts the particle in an initialized reception state. */ extern inline void processLoop(void); inline void processLoop(void) { f...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/synchronization/SampleFifoTypesCtors.h
<filename>src/avr-common/utils/uc-core/synchronization/SampleFifoTypesCtors.h /** * @author <NAME> 26.09.2016 * * Synchronization FiFo constructors. */ #pragma once #include "SynchronizationTypes.h" #include "LeastSquareRegressionTypesCtors.h" void constructFifoElement(FifoElement *const o) { // The lightwei...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/interrupts/TxRxTimer.h
/** * @author <NAME> 20.07.2016 * * Tx/rx related configuration. */ #pragma once #include "TimerCounter1.h" #if defined(__AVR_ATtiny1634__) || defined(__AVR_ATmega16__) # define __TIMER_TX_RX_COUNTER_PRESCALER_ENABLE __TIMER1_INTERRUPT_PRESCALER_ENABLE(__PRESCALER_1) # define __TIMER_TX_RX_COUNTER_PRESCALER_...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/types/AlertsTypes.h
<filename>src/avr-common/utils/uc-core/particle/types/AlertsTypes.h /* * @author <NAME> 09.10.2016 * * Alerts state definition. */ #pragma once #include <stdint.h> /** * alert switches to en-/disable alerts on runtime */ typedef struct Alerts { uint8_t isRxBufferOverflowEnabled : 1; uint8_t isRxParityE...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/actuation/Actuation.h
/** * @author <NAME> 12.07.2016 * * Actuation related implementation. */ #pragma once #include "ActuationTypes.h" #include "uc-core/particle/Globals.h" #include "uc-core/configuration/IoPins.h" #include "uc-core/configuration/interrupts/ReceptionPCI.h" #include "uc-core/configuration/interrupts/ActuationTimer.h"...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/evaluation/EvaluationTypes.h
/* * @author <NAME> 15.10.2016 * * Evaluation state definition. */ #pragma once #include <stdint.h> #include "uc-core/particle/types/NodeAddressTypes.h" #include "uc-core/configuration/Evaluation.h" #ifdef EVALUATION_ENABLE_FLUCTUATE_CPU_FREQUENCY_ON_PURPOSE typedef struct RuntimeOscCalibration { uint8_t ini...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/Particle.h
/** * @author <NAME> 2016 * * Particle core implementation. */ #pragma once #include <avr/sleep.h> #include "common/common.h" #include "Globals.h" #include "uc-core/particle/types/ParticleTypes.h" #include "uc-core/particle/types/ParticleTypesCtors.h" #include "uc-core/configuration/IoPins.h" #include "uc-core/de...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/Evaluation.h
/** * @author <NAME> 16.10.2016 * * Evaluation related arguments. */ #pragma once //#define EVALUATION_SIMPLE_SYNC_AND_ACTUATION //#define EVALUATION_SYNC_CYCLICALLY //#define EVALUATION_SYNC_WITH_CYCLIC_UPDATE_TIME_REQUEST_FLAG //#define EVALUATION_SYNC_WITH_CYCLIC_UPDATE_TIME_REQUEST_FLAG_IN_PHASE_SHIFTING #de...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/interrupts/ReceptionPCI.h
/** * @author <NAME> 20.07.2016 * * Reception pin change interrupt configuration. */ #pragma once #include <avr/interrupt.h> #include "common/PortInteraction.h" #ifdef __AVR_ATtiny1634__ // for production MCU # define __RX_INTERRUPT_FLAG_NORTH PCIF2 # define __RX_INTERRUPT_FLAG_EAST PCIF1 # define __RX_INTER...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/periphery/Periphery.h
/** * @author <NAME> 17.09.2016 */ #pragma once #include "uc-core/particle/Globals.h" #include "uc-core/configuration/IoPins.h" #include "common/common.h" #include "uc-core/delay/delay.h" #include "uc-core/configuration/Periphery.h" #include "uc-core/configuration/interrupts/ReceptionPCI.h" #include "uc-core/sched...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/IoPins.h
/** * @author <NAME> 2016 * * Input and output pin related arguments. */ #pragma once #include "common/PortADefinition.h" #include "common/PortBDefinition.h" #include "common/PortCDefinition.h" #include "uc-core/configuration/Leds.h" #if defined(__AVR_ATmega16__) # include "common/PortDDefinition.h" #endif #...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication/ManchesterDecoding.h
/** * @author <NAME> 2016 */ #pragma once #include <math.h> #include "Communication.h" #include "ManchesterDecodingTypes.h" #include "uc-core/configuration/interrupts/TxRxTimer.h" #include "simulation/SimulationMacros.h" #include "uc-core/configuration/Particle.h" #include "uc-core/configuration/communication/Commu...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication/Transmission.h
<reponame>ProgrammableMatter/particle-firmware<gh_stars>1-10 /** * @author <NAME> 05.2016 * * Transmission related implementation. */ #pragma once #include "common/common.h" #include "uc-core/configuration/interrupts/TxRxTimer.h" #include "simulation/SimulationMacros.h" /** * Schedules the next transmission int...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/interrupts/TimerCounter.h
/** * @author <NAME> 20.07.2016 * * General timer counter related configuration. */ #pragma once #if defined(__AVR_ATtiny1634__) || defined(__AVR_ATmega16__) # define __TIMER_COUNTER_PRESCALER_DISCONNECTED_FLAGS \ ((1 << CS02) | (1 << CS01) | (1 << CS00)) # define __TIMER_COUNTER_PRESCALER_1 \ ((0 <<...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/types/CommunicationTypesCtors.h
/* * @author <NAME> 09.10.2016 * * Communication types constructor implementation. */ #pragma once #include "CommunicationTypes.h" #include "uc-core/particle/PointerImplementation.h" #include "uc-core/communication/PointerImplementation.h" /** * constructor function * @param o the object to construct */ void ...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/types/NodeAddressTypesCtors.h
<reponame>ProgrammableMatter/particle-firmware /* * @author <NAME> 2016 * * Node address types constructor implementation. */ #pragma once #include "NodeAddressTypes.h" /** * constructor function * @param o the object to construct */ void constructNodeAddress(NodeAddress *const o) { o->row = 0; o->col...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/interrupts/DiscoveryPCI.h
/** * @author <NAME> 16.09.2016 * * Discovery pin change interrupt configuration. */ #pragma once #include <avr/interrupt.h> #include "common/PortInteraction.h" #ifdef __AVR_ATtiny1634__ // for production MCU # define __DISCOVERY_INTERRUPT_FLAG_NORTH PCIF2 # define __DISCOVERY_INTERRUPT_FLAG_EAST PCIF1 # def...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication-protocol/CommunicationProtocolPackageTypes.h
<filename>src/avr-common/utils/uc-core/communication-protocol/CommunicationProtocolPackageTypes.h /** * @author <NAME> 13.07.2016 * * Definition of all package types that can be transmitted/received. */ #pragma once #include <stdint.h> /** * Convenience macro: evaluate to the number of bytes bit mask */ #defi...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/synchronization/Deviation.h
/** * @author <NAME> 23.09.2016 * * Linear Least Squares Regression related implementation. */ #pragma once #include "uc-core/configuration/synchronization/Deviation.h" #include "SynchronizationTypes.h" #include "Synchronization.h" //#include "uc-core/stdout/stdio.h" #ifndef DEVIATION_BINARY_SEARCH_SQRT # incl...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/Particle.h
<filename>src/avr-common/utils/uc-core/configuration/Particle.h<gh_stars>1-10 /** * @author <NAME> 2016 * * Particle related arguments. */ #pragma once /** * Delay separating particle loops while in discovery state. */ #define PARTICLE_DISCOVERY_LOOP_DELAY \ DELAY_US_30 /** * Delay separating the followin...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/Globals.h
/** * @author <NAME> 2016 * * Declaration of the global particle struct. * Do not declare globals __BEFORE__ the global Particle struct, * since simulated test cases will fail. */ #pragma once #include "uc-core/particle/types/ParticleTypes.h" /** * The global particle state structure containing attributes, bu...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/Discovery.h
<reponame>ProgrammableMatter/particle-firmware<filename>src/avr-common/utils/uc-core/configuration/Discovery.h /** * @author <NAME> 2016 * * Discovery related arguments. */ #pragma once /** * Cut-off value. Pulses counted above are not stored. * When number of incoming pulses >= RX_DISCOVERY_PULSE_COUNTER_MAX ...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication/CommunicationTypes.h
/** * @author <NAME> 2016 * * Communication types related definitions. */ #pragma once #include <stdint.h> #include "ManchesterDecodingTypes.h" #include "uc-core/configuration/Particle.h" #include "uc-core/configuration/communication/Communication.h" /** * Describes a bit within a 4 byte buffer. */ typedef str...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/delay/delay.h
/** * @author <NAME> 2016 * * Delay macros to overcome call of static inline in non static inline functions. * This macros are understood to be approximations but accurate enough for normal usage. */ #pragma once #include <stdint.h> extern inline void __delay_loop_2(uint16_t __count); /** * non static inline d...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/discovery/Discovery.h
<reponame>ProgrammableMatter/particle-firmware<filename>src/avr-common/utils/uc-core/discovery/Discovery.h /** * @author <NAME> 2015 */ #pragma once #include "uc-core/configuration/Discovery.h" #include "uc-core/configuration/IoPins.h" #include "uc-core/discovery/DiscoveryTypes.h" #include "uc-core/particle/Globals...
ProgrammableMatter/particle-firmware
src/manchester-code-tx-simulation/main/main.c
/** * @author <NAME> 2016 */ #include <avr/io.h> #include <avr/interrupt.h> #include <common/common.h> #include <uc-core/configuration/IoPins.h> #include <uc-core/particle/Globals.h> //#include <uc-core/particle/types/ParticleTypesCtors.h> #include <uc-core/communication/Communication.h> #include <uc-core/delay/del...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/communication/Communication.h
<reponame>ProgrammableMatter/particle-firmware<filename>src/avr-common/utils/uc-core/configuration/communication/Communication.h<gh_stars>1-10 /** * @author <NAME> 2016 * * Communication related arguments. */ #pragma once /** * Clock speed vs. minimum error ratio table, deprecated transmitter isr handling: * *...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/stdout/Stdout.h
<reponame>ProgrammableMatter/particle-firmware /** * @author <NAME> 07.10.2016 */ #pragma once #ifdef NDEBUG # define setupUart(...) #else # if defined(__AVR_ATtiny1634__) # include <avr/io.h> # include <stdio.h> # include "common/PortInteraction.h" # include "uc-core/configuration/Stdout.h" # def...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/synchronization/BasicCalculationTypes.h
/** * @author <NAME> 02.10.2016 * * Calculation related types. */ #pragma once #include <stdint.h> #ifdef C_STRUCTS_TO_JSON_PARSER_TYPEDEF_NOT_SUPPORTED_SUPPRESS_REGULAR_TYPEDEFS # define CumulationType uint32_t # define SampleValueType uint16_t # define CalculationType float # define IndexType uint8_t #els...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/stdout/stdio.h
<reponame>ProgrammableMatter/particle-firmware<filename>src/avr-common/utils/uc-core/stdout/stdio.h /** * @author <NAME> 08.10.2016 */ #pragma once #ifdef __AVR_ATtiny1634__ #include <stdio.h> #else #define printf(...) #endif
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/time/TimeTypes.h
<gh_stars>1-10 /** * @author <NAME> 12.07.2016 */ #pragma once #include <stdint.h> #include "uc-core/configuration/Time.h" /** * Structure to Keep track of number of intervals passed since time tracking was activated. * A time interval can be adjusted at runtime. */ typedef struct LocalTimeTracking { /** ...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/Commands.h
<gh_stars>1-10 /** * @author <NAME> 13.07.2016 * * Particle's higher level network commands ought to be used as network API. */ #pragma once #include "Globals.h" #include "uc-core/communication-protocol/Commands.h" /** * Transmits a new network geometry to the network. Particles outside the new boundary * swi...
ProgrammableMatter/particle-firmware
src/avr-common/utils/simulation/SimulationMacros.h
/** * @author <NAME> 2016 */ #ifndef __SIMULATION_MACROS_H__ #define __SIMULATION_MACROS_H__ # ifdef SIMULATION # include <avr/io.h> # define IF_DEBUG_SWITCH_TO_ERRONEOUS_STATE \ CLI; \ ParticleAttributes.node.state = STATE_TYPE_ERRONEOUS # define DEBUG_CHAR_OUT(value) UDR=(value) # define DE...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/synchronization/LeastSquareRegressionTypesCtors.h
<gh_stars>1-10 /** * @author <NAME> 23.09.2016 * * Linear Least Squares Regression related types. */ #pragma once #include "LeastSquareRegressionTypes.h" /** * constructor function * @param o reference to the object to construct */ void constructLeastSquareRegressionResult(LeastSquareRegressionResult *const o...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/types/ParticleStateTypes.h
/* * @author <NAME> 11.10.2016 * * Particle state definition. */ #pragma once /** * Possible particle's state machine states are listed in this enum. */ typedef enum StateType { // uninitialized state STATE_TYPE_UNDEFINED = 0, // state when particle is initializing STATE_TYPE_STA...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/synchronization/Deviation.h
<gh_stars>1-10 /** * @author <NAME> 23.09.2016 * * Deviation related configuration. */ #pragma once /** * use * double sqrt(double val) of math.h or binary search * sqrt(float *val, float *result) */ #define DEVIATION_MATH_SQRT //#define DEVIATION_BINARY_SEARCH_SQRT
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/communication/ManchesterDecoding.h
<gh_stars>1-10 /** * @author <NAME> 3.10.2016 * * Communication related arguments. */ #pragma once /** * If defined enables merging the high bits [15:1] of the time stamp with * the edge direction bit to one uint8_t which uses 1/3 less memory for * decoding buffer but looses the least significant bit for times...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/synchronization/SamplesFifo.h
/** * @author <NAME> 26.09.2016 * * Synchronization FiFo related implementation. */ #pragma once #include "uc-core/configuration/synchronization/SampleFifoTypes.h" #include "SynchronizationTypes.h" #include <math.h> #include "uc-core/stdout/stdio.h" bool isFiFoFull(const SamplesFifoBuffer *const samplesFifoBuffe...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication-protocol/CommunicationProtocol.h
/** * Created by <NAME> on 11.05.2016 * * Protocol tx/rx relevant implementation. */ #pragma once #include "uc-core/particle/Globals.h" #include "CommunicationProtocolTypes.h" #include "simulation/SimulationMacros.h" #include "uc-core/configuration/CommunicationProtocol.h" #include "uc-core/configuration/IoPins.h"...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/synchronization/SampleFifoTypes.h
<filename>src/avr-common/utils/uc-core/configuration/synchronization/SampleFifoTypes.h /** * @author <NAME> 24.09.2016 * * Sample capturing related arguments. */ #pragma once /** * Amount of uint16 samples the synchronization buffers for clock skew approximation. */ //#define SAMPLE_FIFO_NUM_BUFFER_ELEMENTS 120...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/PointerImplementation.h
/** * @author <NAME> 13.07.2016 * * Particle core related implementation that is ought to be passed as pointer or callback. */ #pragma once #include "uc-core/communication/ManchesterDecoding.h" #include "uc-core/communication-protocol/Interpreter.h" /** * North port reception implementation. */ void receiveNo...
ProgrammableMatter/particle-firmware
src/particle-simulation-setnewnetworkgeometry-test/main/main.c
/** * @author <NAME> 2016 */ #define SIMULATION_SET_NEW_NETWORK_GEOMETRY_TEST #include <uc-core/particle/ParticleLoop.h> int main(void) { processLoop(); return 0; }
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication/ManchesterDecodingTypes.h
/** * @author <NAME> 2016 * * Manchester decoding related types definition. */ #pragma once #include <stdint.h> #include "uc-core/configuration/communication/ManchesterDecoding.h" /** * Possible manchester decoder states. */ typedef enum ManchesterDecodingStateType { DECODER_STATE_TYPE_START, // initializa...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/types/DiscoveryPulseCountersTypes.h
/* * @author <NAME> 09.10.2016 * * Discovery state definition. */ #pragma once #include <stdint.h> #include "uc-core/discovery/DiscoveryTypes.h" /** * Stores the amount of incoming pulses for each communication channel. The isConnected flags are set * if the number of incoming pulses exceeds a specific thresho...
ProgrammableMatter/particle-firmware
src/particle-initial-io-test/main/Interrupts.c
<gh_stars>1-10 /** * @author <NAME> 2015 */ #include <avr/io.h> #include <avr/interrupt.h> /** * pin on port A change interrupt request */ ISR(PCINT0_vect) { // rx-A or rx-B } /** * External Pin, Power-on Reset, Brown-Out Reset, Watchdog Reset */ ISR(_VECTOR(0)) { } /** * Watchdog Time-out */ ISR(WDT_ve...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/synchronization/SynchronizationTypesCtors.h
/** * @author <NAME> 24.09.2016 * * Synchronization related arguments. */ #pragma once #include "uc-core/configuration/Evaluation.h" #ifdef EVALUATION_SYNC_CYCLICALLY # define SYNCHRONIZATION_TYPES_CTORS_FIRST_SYNC_PACKAGE_LOCAL_TIME ((uint16_t) 160) # define SYNCHRONIZATION_TYPES_CTORS_FAST_SYNC_PACKAGE_SEPAR...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/particle/types/ParticleTypes.h
/* * @author <NAME>016 * * Particle state definition. */ #pragma once #include <stdint.h> #include "uc-core/particle/types/NodeAddressTypes.h" #include "uc-core/actuation/ActuationTypes.h" #include "uc-core/time/TimeTypes.h" #include "uc-core/periphery/PeripheryTypes.h" #include "uc-core/synchronization/Synchroni...
ProgrammableMatter/particle-firmware
src/particle-simulation-io-test/main/main.c
<filename>src/particle-simulation-io-test/main/main.c /** * @author <NAME> 2016 */ #include <avr/pgmspace.h> #include "../libs/common/common.h" #include <uc-core/configuration/IoPins.h> #define SIMULATION #include <simulation/SimulationMacros.h> //const char testMessage[] PROGMEM = "test"; /** * Generates a cert...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication/ManchesterCoding.h
/** * @author <NAME> 2016 * * Manchester coding related implementation. */ #pragma once #include "ManchesterDecodingTypes.h" /** * rectifies the transmission signal according to the upcoming bit * @param port the designated port to read buffered data and write signal to */ static void __rectifyTransmissionBit...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/periphery/PeripheryTypes.h
<gh_stars>1-10 /* * @author <NAME> 18.09.2016 * * Particle state definition. */ #pragma once #include <stdint.h> typedef enum AddressBlinkStates { ADDRESS_BLINK_STATES_START, ADDRESS_BLINK_STATES_BLINK_ROW, ADDRESS_BLINK_STATES_ROW_ON, ADDRESS_BLINK_STATES_ROW_OFF, ADDRESS_BLINK_STATES_PAUSE,...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication-protocol/CommunicationProtocolTypesCtors.h
<reponame>ProgrammableMatter/particle-firmware /** * Created by <NAME> on 11.05.2016 * * Communication protocol types constructor implementation. */ #pragma once #include "uc-core/particle/Globals.h" #include "./CommunicationProtocolTypes.h" /** * constructor function * @param o reference to the object to cons...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/Stdout.h
<filename>src/avr-common/utils/uc-core/configuration/Stdout.h /** * @author <NAME> 08.10.2016 * * USART related arguments. */ #pragma once #ifdef __AVR_ATtiny1634__ /** * Baud rate for USART1 output (RS232). * Default setup is 8bit, no parity bit, 1 stop bit or better known as "8N1". * Note: The USART transmis...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/time/Time.h
/** * @author <NAME> 12.07.2016 */ #pragma once #include "TimeTypes.h" #include "uc-core/particle/Globals.h" /** * Enables the local time interrupt using current adjustment argument * {@link ParticleAttributes.localTime.timePeriodInterruptDelay}. * Write to LOCAL_TIME_INTERRUPT_COMPARE_VALUE is not atomic. */...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/configuration/Periphery.h
/** * @author <NAME> 2016 * * Periphery related arguments. */ #pragma once /** * To shrink flash usage on target device, the periphery implementation can be removed safely * without to influence the compilation except the output size. * Enable the define to remove the implementation, disable the define to comp...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/communication/Communication.h
<gh_stars>1-10 /** * @author <NAME> 2016 * * Byte oriented communication related implementation. */ #pragma once #include "common/common.h" #include "CommunicationTypes.h" #include "ManchesterDecodingTypes.h" /** * Increments the bit mask and the byte number accordingly. * @param o the buffer bit pointer refer...
ProgrammableMatter/particle-firmware
src/avr-common/utils/uc-core/interrupts/Interrupts.h
<gh_stars>1-10 /** * @author <NAME> 2015 */ #pragma once #include "uc-core/particle/Globals.h" #include "uc-core/configuration/IoPins.h" #include "uc-core/configuration/interrupts/Vectors.h" #include "uc-core/configuration/interrupts/TxRxTimer.h" #include "uc-core/configuration/interrupts/LocalTime.h" #include "uc-...
ProgrammableMatter/particle-firmware
src/particle-initial-io-test/main/main.c
<filename>src/particle-initial-io-test/main/main.c<gh_stars>1-10 /** * @author <NAME> 2015 */ #include <util/delay.h> #include <common/common.h> #include <common/PortADefinition.h> #include <common/PortBDefinition.h> #include <common/PortCDefinition.h> FUSES = { .low = LFUSE_DEFAULT, .high = HFUSE_D...
ProgrammableMatter/particle-firmware
src/particle-simulation-heatwiresrange-test/main/main.c
<reponame>ProgrammableMatter/particle-firmware /** * @author <NAME> 2016 */ #define SIMULATION_HEAT_WIRES_RANGE_TEST #include <uc-core/particle/ParticleLoop.h> int main(void) { processLoop(); return 0; }
amplework/ZAlertView
Example/Pods/Target Support Files/Pods-ZAlertView_Example/Pods-ZAlertView_Example-umbrella.h
#ifdef __OBJC__ #import <UIKit/UIKit.h> #endif FOUNDATION_EXPORT double Pods_ZAlertView_ExampleVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_ZAlertView_ExampleVersionString[];