This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static IObservable<T> DeadTime<T>(this IObservable<T> source, TimeSpan deadTime) | |
{ | |
return Observable.Create<T>(o => | |
{ | |
var subscriptions = new CompositeDisposable(); | |
var deadTimeTimer = new Subject<IObservable<long>>(); | |
var inDeadTime = false; | |
subscriptions.Add( | |
source.Subscribe( | |
item => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static IObservable<T> DeadTime<T>(this IObservable<T> source, TimeSpan deadTime) | |
{ | |
return Observable.Create<T>(o => | |
{ | |
var subscriptions = new CompositeDisposable(); | |
var lastTime = DateTimeOffset.MinValue; | |
return source | |
.Timestamp() | |
.Where(timestamped => timestamped.Timestamp - lastTime > deadTime) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct enum_type | |
{ | |
enum type | |
{ | |
one, | |
two, | |
three, | |
}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication17 | |
{ | |
class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CurieBLE.h> | |
#include <CurieIMU.h> | |
#include <CurieTimerOne.h> | |
#include <stdint.h> | |
BLEPeripheral blePeripheral; | |
BLEService imuService("FFF0"); | |
static constexpr size_t AccelometerCharacteristicSize = sizeof(int) * 3; | |
static constexpr size_t GyroCharacteristicSize = sizeof(int) * 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <avr/io.h> | |
#include <stdint.h> | |
int main(void) | |
{ | |
/* Replace with your application code */ | |
while (1) | |
{ | |
const volatile uint8_t a = 10; | |
const volatile uint8_t b = 20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private struct ConvertExpressionParts | |
{ | |
public Expression[] Prologue { get; } | |
public Expression[] ValueExpressions { get; } | |
public int Size { get; } | |
public ParameterExpression[] Variables { get; } | |
public ConvertExpressionParts(Expression[] prologue, Expression[] valueExpressions, int size, ParameterExpression[] variables) | |
{ | |
this.Prologue = prologue; | |
this.ValueExpressions = valueExpressions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "simple_dma.hpp" | |
template<size_t TBurstCount> | |
static void burstTransfer(const InputData* input, hls::stream<InputData>& stream, TransferCount transferCount) | |
{ | |
#pragma HLS INLINE off | |
for(; transferCount >= TBurstCount; transferCount -= TBurstCount) { | |
for(TransferCount count = 0; count < TBurstCount; ++count) { | |
#pragma HLS PIPELINE ii=1 | |
stream << *(input++); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "simple_dma.hpp" | |
void simpleDma(const InputData* input, hls::stream<OutputStreamData>& outputStream, AddressOffset offset, TransferCount transferCount) | |
{ | |
#pragma HLS INTERFACE s_axilite port=transferCount bundle=control | |
#pragma HLS INTERFACE s_axilite port=offset bundle=control | |
#pragma HLS INTERFACE s_axilite port=return bundle=control | |
#pragma HLS INTERFACE m_axi depth=TestDataCount port=input offset=off | |
#pragma HLS INTERFACE axis port=outputStream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Esp.h> | |
#include <esp32-hal-bt.h> | |
#include "bt.h" | |
#include "esp_bt_main.h" | |
#include "esp_gap_ble_api.h" | |
static void checkResult(esp_err_t err, const __FlashStringHelper* s) | |
{ | |
if (err != ESP_OK) { | |
Serial.printf("[ERR %08x] ", err); |
OlderNewer