repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/source/hx711.c
/* * hx711.c * * Created on: 24.12.2019 * Author: pvvx */ #include "proj/tl_common.h" #if USE_HX711 #include "hx711.h" #ifndef HX711_SCK #define HX711_SCK GPIO_PC0 #endif #ifndef HX711_DOUT #define HX711_DOUT GPIO_PC1 #endif u32 hx711_buf[HX711_BUF_CNT]; // 64 bytes u8 hx711_wr = 0; u8 hx711_rd = 0; u8 hx...
frankpolte/UBIA
TlsrSrc/Uartfloader/Include/common.h
<filename>TlsrSrc/Uartfloader/Include/common.h #pragma once #include "app_config.h" #include "compiler.h" #include "types.h" #include "bit.h" #if CHIP_TYPE == MCU_CORE_8266 #include "register_8266.h" #include "gpio_default_8266.h" #else #include "register_8267.h" #include "gpio_default_8267.h" #endif #include "gpio.h...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/lfloader.h
<gh_stars>10-100 /* * lfloader.h * * Created on: 07.03.2020 * Author: pvvx */ #ifndef LFLOADER_H_ #define LFLOADER_H_ #define FLOADER_FADDR1 0x71000 // usbfloader #define FLOADER_FADDR2 0x72800 // uartfloader #define FLOADER_SIZE 0x01000 void load_floader(void); #endif /* LFLOADER_H_ */
frankpolte/UBIA
TlsrSrc/UsbFloader/Source/sleep.c
<filename>TlsrSrc/UsbFloader/Source/sleep.c<gh_stars>10-100 #include "common.h" #include "clock.h" _attribute_ram_code_ void sleep_us (u32 us) { u32 t = clock_time(); while(!clock_time_exceed(t, us)); }
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj/mcu_spec/gpio_8266.c
/******************************************************************************************************** * @file gpio_8266.c * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * All rights reserved. ...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/app.h
<reponame>frankpolte/UBIA<gh_stars>10-100 /* * app.h * * Created on: 05.11.2019 * Author: pvvx */ #ifndef APP_H_ #define APP_H_ void user_init(); void ExtDevPowerOn(); void ExtDevPowerOff(); static inline u32 clock_tik_exceed(u32 ref, u32 span_us){ return ((u32)(clock_time() - ref) > span_us); } #endif...
frankpolte/UBIA
TlsrSrc/Uartfloader/Include/gpio.h
<filename>TlsrSrc/Uartfloader/Include/gpio.h #ifndef GPIO_H #define GPIO_H // PS terrible code! //bit operations //#define BIT(n) ( 1<<(n) ) //#define BM_SET(addr,bit) ( *(addr) |= (bit) ) //#define BM_CLR(addr,bit) ( *(addr) &= ~(bit) ) //#define BM_IS_SET(addr,bit) ...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/board_jdy_10.h
/******************************************************************************************************** * @file board_et104_bt05.h * * @brief board configuration for * * @author pvvx *******************************************************************************************************/ #ifndef _BOARD_...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj_lib/pm_8267.h
/******************************************************************************************************** * @file pm_8267.h * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * All rights reserved. *...
frankpolte/UBIA
PowerProfiler/STM32F103/Main/rw_ini.h
// // EEPROM` в FLASH для сохранения настроек (pvvx Ver 1.0) // Циклически использует область в 1024 байт (страницу) во Flash MCU // для сохранения блока конфигурации // #ifndef __RW_FLASH_INI_H #define __RW_FLASH_INI_H #include "stm32f10x.h" #include "stm32f10x_flash.h" // Medium-density devices are STM32F101xx, STM...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/usbCDC/usb_stdRequestType.h
<reponame>frankpolte/UBIA /******************************************************************************************************** * @file usb_stdRequestType.h * * @brief This file provides definitions of requests for standard USB protocol * * @author <EMAIL>; <EMAIL> * @date Oct. 8, 2016 * * @par...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/usbCDC/usb_desc.h
/******************************************************************************************************** * @file usb_desc.h * * @brief This file provides set of functions to manage the USB CDC descriptors * * @author <EMAIL> * @date Oct. 8, 2016 * * @par Copyright (c) 2016, Telink Semiconduct...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj/mcu_spec/adc_8267.c
<reponame>frankpolte/UBIA /******************************************************************************************************** * @file adc_8267.c * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * ...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/ble.h
<reponame>frankpolte/UBIA /* * ble.h * * Created on: 22.02.2020 * Author: pvvx */ #ifndef BLE_H_ #define BLE_H_ #include "proj_lib/rf_drv.h" #include "proj_lib/pm.h" #include "proj_lib/ble/ll/ll.h" #include "proj_lib/ble/hci/hci.h" #include "proj_lib/ble/blt_config.h" #include "proj_lib/ble/trace.h" #includ...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj/mcu_spec/adc_8266.c
/******************************************************************************************************** * @file adc_8266.c * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * All rights reserved. ...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/source/ble.c
<reponame>frankpolte/UBIA /* * ble.c * * Created on: 22.02.2020 * Author: pvvx */ #include "proj/tl_common.h" #if (USE_BLE) #include "ble.h" #include "app.h" #include "flash_eep.h" #include "eep_id.h" #if (USE_USB_CDC) #include "usb.h" #endif #if (USE_I2C_DEV) #include "i2c_dev.h" #endif #if (USE_ADC_DEV) #...
frankpolte/UBIA
PowerProfiler/STM32F103/Main/smbus.c
/* ============================================================================================ HMC5883L device SMBus library code for ARM STM32F103xx is placed under the MIT license Copyright (c) 2012 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and as...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/source/usbCDC/usb_cdc.c
<gh_stars>10-100 /******************************************************************************************************** * @file usb_cdc.c * * @brief This file provides set of functions to manage the USB cdc device * * @author <EMAIL> * @date Oct. 8, 2016 * * @par Copyright (c) 2016, Telink ...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj/drivers/flash.h
/******************************************************************************************************** * @file flash.h * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * All rights reserved. * ...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj/mcu/clock.c
/******************************************************************************************************** * @file clock.c * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * All rights reserved. * ...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/vendor/common/myprintf.h
<gh_stars>10-100 /******************************************************************************************************** * @file myprintf.h * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * All r...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj/drivers/spi_i.h
<reponame>frankpolte/UBIA<filename>TlsrSrc/tl_pvvx_ble_sdk/proj/drivers/spi_i.h /******************************************************************************************************** * @file spi_i.h * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) ...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj_lib/ble/ll/ll_whitelist.h
/* * ll_whitelist.h * * Created on: 2016-9-22 * Author: Administrator */ #ifndef LL_WHITELIST_H_ #define LL_WHITELIST_H_ #include "../ble_common.h" #define MAX_WHITE_LIST_SIZE 4 #if (RAMCODE_OPTIMIZE_CONN_POWER_NEGLECT_ENABLE || BLS_BLE_RF_IRQ_TIMING_EXTREMELY_SHORT_EN) #define MAX_WHITE_I...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj/drivers/i2c.h
<gh_stars>10-100 /******************************************************************************************************** * @file i2c.h * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * All rights...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/hx711.h
<reponame>frankpolte/UBIA /* * hx711.h * * Created on: 26.12.2019 * Author: pvvx */ #ifndef HX711_H_ #define HX711_H_ typedef enum { HX711MODE_A128 = 25, HX711MODE_B32, HX711MODE_A64 } hx711_mode_t; //#define HX711_SCK GPIO_PC0 //#define HX711_DOUT GPIO_PC1 #define HX711_BUF_CNT 16 // 8,16,32 extern ...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/board_e104_bt10.h
<gh_stars>10-100 /******************************************************************************************************** * @file board_et104_bt10.h * * @brief board configuration for * * @author pvvx *******************************************************************************************************...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj/drivers/usb.c
/******************************************************************************************************** * @file usb.c * * @brief for TLSR chips * * @author BLE Group * @date May. 12, 2018 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * All rights reserved. * * ...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/usbCDC/usb_ctrl.h
/******************************************************************************************************** * @file usb_ctrl.h * * @brief This file provides set of functions to manage the USB interface * * @author <EMAIL> * @date Oct. 8, 2016 * * @par Copyright (c) 2016, Telink Semiconductor (Sh...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/source/uart_dev.c
<filename>TlsrSrc/my_ble_usb_i2c_adc/source/uart_dev.c<gh_stars>10-100 /* * uart.c * * Created on: 23.02.2020 * Author: pvvx */ #include "proj/tl_common.h" #if (USE_UART_DEV) #include "proj/drivers/uart.h" #include "uart_dev.h" unsigned char uart_rx_irq = 0, uart_tx_irq = 0; dev_uart_cfg_t cfg_uart; const...
frankpolte/UBIA
TlsrSrc/tl_pvvx_ble_sdk/proj_lib/ble/ll/ll_conn_phy.h
<reponame>frankpolte/UBIA /******************************************************************************************************** * @file ll_conn_phy.h * * @brief for TLSR chips * * @author BLE Group * @date July. 4, 2019 * * @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd. * ...
frankpolte/UBIA
TlsrSrc/my_ble_usb_i2c_adc/include/usbCDC/usb_hw.h
/******************************************************************************************************** * @file usb_hw.h * * @brief This file provides set of functions to manage the USB interface * * @author <EMAIL>; <EMAIL> * @date Oct. 8, 2016 * * @par Copyright (c) 2016, Telink Semiconduc...
frankpolte/UBIA
TlsrSrc/UsbFloader/Include/common.h
<filename>TlsrSrc/UsbFloader/Include/common.h #pragma once /* Enable C linkage for C++ Compilers: */ #if defined(__cplusplus) extern "C" { #endif #define MCU_CORE_8266 1 #define MCU_CORE_8366 2 #define MCU_CORE_8368 3 #define MCU_CORE_8267 4 #define MCU_CORE_8263 5 #define MCU_CORE_8261 6 #define MCU_CORE_8269 7 #d...
frankpolte/UBIA
PowerProfiler/STM32F103/Main/smbus.h
#ifndef _SMBus_H_ #define _SMBus_H_ #include <inttypes.h> #define SMBus_NAME I2C2 #define SMBus_RCC_Periph RCC_APB1Periph_I2C2 #define SMBus_Port GPIOB #define SMBus_SCL_Pin GPIO_Pin_10 #define SMBus_SDA_Pin GPIO_Pin_11 #define SMBus_SCL_PinSource GPIO_PinSource10 #d...
mike-melo/bluewire
bluewire/src/shaders.h
#pragma once #include <GL/glew.h> #define GLSL(version, shader) "#version " #version "\n" #shader const GLchar* vertexShader = GLSL(430, layout(location = 0) in vec3 vPosition; layout(location = 1) uniform mat4 MVP; void main() { gl_Position = MVP * vec4(vPosition, 1); } ); const GLchar* fragmentShader = GL...
ElArtista/GfxWnd
demo/src/game.c
#include "game.h" #include <stdlib.h> #include <stdio.h> #include <string.h> #include <gfxwnd/window.h> #include <glad/glad.h> static void APIENTRY gl_debug_proc(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* user_param) { (void) source; (void) id; ...
ElArtista/GfxWnd
include/gfxwnd/window.h
<gh_stars>0 /*********************************************************************************************************************/ /* /===-_---~~~~~~~~~------____ */ /* |===-~___ ...
ElArtista/GfxWnd
demo/src/mainloop.c
#include "mainloop.h" #include <time.h> long long clock_msec() { return 1000 * clock() / CLOCKS_PER_SEC; } void mainloop(struct mainloop_data* loop_data) { long long next_update = clock_msec(); const float skip_ticks = 1000 / loop_data->updates_per_second; int loops; float interpolation; whi...
ElArtista/GfxWnd
include/gfxwnd/input.h
/*********************************************************************************************************************/ /* /===-_---~~~~~~~~~------____ */ /* |===-~___ _,-'...
ElArtista/GfxWnd
src/window.c
#include "gfxwnd/window.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <glad/glad.h> #include <GLFW/glfw3.h> struct window { GLFWwindow* wnd_handle; struct window_callbacks callbacks; void* userdata; char* title, *title_suffix; int vsync; /* Misc state */ float curso...
wavesplatform/nanos-app-waves
src/crypto/stream_eddsa_sign.c
<reponame>wavesplatform/nanos-app-waves /******************************************************************************* * Waves Platform Wallet App for Nano Ledger devices * Copyright (c) 2017-2020 <NAME> (Tolsi) <<EMAIL>> * * Based on Sample code provided (c) 2016 Ledger and * ...
wavesplatform/nanos-app-waves
src/glyphs.h
<reponame>wavesplatform/nanos-app-waves<gh_stars>10-100 #ifndef GLYPH_badge_loading_v2_BPP #define GLYPH_badge_loading_v2_WIDTH 14 #define GLYPH_badge_loading_v2_HEIGHT 14 #define GLYPH_badge_loading_v2_BPP 1 extern unsigned int const C_badge_loading_v2_colors[]; extern unsigned char const C_bad...
wavesplatform/nanos-app-waves
src/glyphs.c
#include "glyphs.h" unsigned int const C_badge_loading_v2_colors[] = { 0x00000000, 0x00ffffff, }; unsigned char const C_badge_loading_v2_bitmap[] = { 0x60, 0x00, 0x1e, 0xc0, 0x01, 0x18, 0x00, 0x06, 0xc0, 0x00, 0x30, 0x00, 0x0c, 0xc0, 0x03, 0xb0, 0x01, 0x66, 0x80, 0x71, 0x38, 0xf8, 0x07, 0x78, 0x00, }; #ifdef H...
e4z9/sodium-cxx-examples
qt/sqdatefield.h
#pragma once #include <sqcombobox.h> #include <QDate> #include <QWidget> #include <sodium/sodium.h> class SQDateField : public QWidget { public: SQDateField(); const sodium::cell<QDate> &date() const; private: SQComboBox<int> *_year = nullptr; SQComboBox<int> *_month = nullptr; SQComboBox<int>...
e4z9/sodium-cxx-examples
qt/sqcombobox.h
#pragma once #include <QComboBox> #include <QVector> #include <boost/optional.hpp> #include <sodium/sodium.h> template<class T> class SQComboBox : public QComboBox { public: struct Item { QString displayName; T value; }; SQComboBox(const QVector<Item> &items); const sodium::cell...
e4z9/sodium-cxx-examples
qt/sqpushbutton.h
#pragma once #include <QPushButton> #include <sodium/sodium.h> #include <functional> class SQPushButton : public QPushButton { public: SQPushButton(const QString &text); SQPushButton(const QString &text, const sodium::cell<bool> &enabled); ~SQPushButton(); const sodium::stream<sodium::unit> &sClick...
e4z9/sodium-cxx-examples
qt/sqlabel.h
<reponame>e4z9/sodium-cxx-examples<filename>qt/sqlabel.h #pragma once #include <QLabel> #include <sodium/sodium.h> #include <functional> class SQLabel : public QLabel { public: SQLabel(const sodium::cell<QString> &text); ~SQLabel(); private: std::function<void()> _textUnsubscribe; };
e4z9/sodium-cxx-examples
examples/sqspinner.h
#pragma once #include <QWidget> #include <sodium/sodium.h> class SQSpinner : public QWidget { public: SQSpinner(int initialValue); const sodium::cell<int> &value() const; private: sodium::cell<int> _value; };
e4z9/sodium-cxx-examples
qt/sqeditbase.h
<reponame>e4z9/sodium-cxx-examples<filename>qt/sqeditbase.h #pragma once #include <QString> #include <QThread> #include <QTimer> #include <sodium/sodium.h> template<class Base> class SQEditBase : public Base { public: SQEditBase(const sodium::stream<QString> &sText, const QString &initialText, ...
JiazeWang/PAConv
scene_seg/lib/pointops/src/labelstat/labelstat_cuda_kernel.h
#ifndef _LABELSTAT_CUDA_KERNEL #define _LABELSTAT_CUDA_KERNEL #include <torch/serialize/tensor.h> #include <vector> #include <ATen/cuda/CUDAContext.h> void labelstat_and_ballquery_cuda_fast(int b, int n, int m, float radius, int nsample, int nclass, at::Tensor new_xyz_tensor, at::Tensor xyz_tensor, at::Tensor labe...
JiazeWang/PAConv
scene_seg/lib/pointops/src/grouping_int/grouping_int_cuda_kernel.h
<filename>scene_seg/lib/pointops/src/grouping_int/grouping_int_cuda_kernel.h #ifndef _GROUPING_INT_CUDA_KERNEL #define _GROUPING_INT_CUDA_KERNEL #include <torch/serialize/tensor.h> #include <vector> #include <ATen/cuda/CUDAContext.h> void grouping_int_forward_cuda(int b, int c, int n, int m, int nsample, at::Tensor po...
JiazeWang/PAConv
scene_seg/lib/pointops/src/interpolation/interpolation_cuda_kernel.h
#ifndef _INTERPOLATION_CUDA_KERNEL #define _INTERPOLATION_CUDA_KERNEL #include <torch/serialize/tensor.h> #include <vector> #include <ATen/cuda/CUDAContext.h> void nearestneighbor_cuda(int b, int n, int m, at::Tensor unknown_tensor, at::Tensor known_tensor, at::Tensor dist2_tensor, at::Tensor idx_tensor); void interpo...
JiazeWang/PAConv
scene_seg/lib/pointops/src/grouping/grouping_cuda_kernel.h
<filename>scene_seg/lib/pointops/src/grouping/grouping_cuda_kernel.h #ifndef _GROUPING_CUDA_KERNEL #define _GROUPING_CUDA_KERNEL #include <torch/serialize/tensor.h> #include <vector> #include <ATen/cuda/CUDAContext.h> void grouping_forward_cuda(int b, int c, int n, int m, int nsample, at::Tensor points_tensor, at::Ten...
JiazeWang/PAConv
scene_seg/lib/paconv_lib/src/gpu/operator.h
// // Created by 丁润语 on 2020/8/12. // #ifndef _OPERATOR_H #define _OPERATOR_H #include <torch/torch.h> void assign_score_withk_forward_kernel_wrapper(int B, int N0, int N1, int M, int K, int O, int aggregate, const at::Tensor& points, const at::Tensor...
JiazeWang/PAConv
scene_seg/lib/pointops/src/ballquery/ballquery_cuda_kernel.h
#ifndef _BALLQUERY_CUDA_KERNEL #define _BALLQUERY_CUDA_KERNEL #include <torch/serialize/tensor.h> #include <vector> #include <ATen/cuda/CUDAContext.h> void ballquery_cuda(int b, int n, int m, float radius, int nsample, at::Tensor new_xyz_tensor, at::Tensor xyz_tensor, at::Tensor idx_tensor); void ballquery_cuda_fast(...
JiazeWang/PAConv
scene_seg/lib/pointops/src/featuredistribute/featuredistribute_cuda_kernel.h
<filename>scene_seg/lib/pointops/src/featuredistribute/featuredistribute_cuda_kernel.h #ifndef _FEATUREDISTRIBUTE_CUDA_KERNEL #define _FEATUREDISTRIBUTE_CUDA_KERNEL #include <torch/serialize/tensor.h> #include <vector> #include <ATen/cuda/CUDAContext.h> void featuredistribute_cuda(int b, int n, int m, at::Tensor max_x...
JiazeWang/PAConv
scene_seg/lib/pointops/src/sampling/sampling_cuda_kernel.h
#ifndef _SAMPLING_CUDA_KERNEL #define _SAMPLING_CUDA_KERNEL #include <torch/serialize/tensor.h> #include <vector> #include <ATen/cuda/CUDAContext.h> void gathering_forward_cuda(int b, int c, int n, int m, at::Tensor points_tensor, at::Tensor idx_tensor, at::Tensor out_tensor); void gathering_backward_cuda(int b, int c...
JiazeWang/PAConv
scene_seg/lib/pointops/src/cuda_utils.h
#ifndef _CUDA_UTILS_H #define _CUDA_UTILS_H #include <cmath> #define TOTAL_THREADS 1024 #define CHECK_CUDA(x) TORCH_CHECK(x.is_cuda(), #x, " must be a CUDAtensor ") #define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x, " must be contiguous ") #define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x) #define...
luiiizfernando/Lista-6
com112_sort.h
<filename>com112_sort.h void escolha(int opcao, int *v, int n, int *comparacao, int *movimento); void metodoBolha(int *v,int n, int *comparacao, int *movimento); void selection_sort(int *v, int n, int *comparacao, int *movimento); void insertion_sort(int *v, int n, int *comparacao, int *movimento); void mergeSort(i...
TXKTOKMACHINE/monero-gui
src/qt/MoneroSettings.h
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ****************************************************************************/ // Copyright (c) 2014-2019, The Monero Project // // All rights reserved. /...
CSHF-yhhhh/A-Simple-Packet-Filtering-Firewall-in-Linux
write.c
/* @文件:write.c @作者: CSHF[https://github.com/CSHF-yhhhh] @说明: 驱动相关函数 */ #include <string.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <fcntl.h> #include <unistd.h> //打开设备驱动,如:/dev/cshfFirewall int OpenDev(char *name) { printf("%s\n", name); int fd = open(name, O_RDWR); if (fd < 0) ...
CSHF-yhhhh/A-Simple-Packet-Filtering-Firewall-in-Linux
firewall.c
<gh_stars>0 #include <linux/device.h> #include <linux/uaccess.h> #include <linux/time.h> #include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/netfilter.h> #include <linux/netfilter_ipv4.h> #include <linux/skbuff.h> #include <linux/udp.h> #include <linux/tcp.h> #include <linux/icmp...
freearhey/TableTool
Table Tool/TTFormatViewController.h
<filename>Table Tool/TTFormatViewController.h<gh_stars>1000+ // // TTFormatViewController.h // Table Tool // // Created by <NAME> on 24.07.15. // Copyright (c) 2015 Egger Apps. All rights reserved. // #import <Cocoa/Cocoa.h> #import "CSVConfiguration.h" @class TTFormatViewController; @protocol TTFormatViewContro...
freearhey/TableTool
Table Tool/CSVReader.h
// // CSVReader.h // Table Tool // // Created by <NAME> on 09.07.15. // Copyright (c) 2015 Egger Apps. All rights reserved. // #import <Foundation/Foundation.h> #import "CSVConfiguration.h" @interface CSVReader : NSObject @property (readonly) NSData *data; @property CSVConfiguration *config; @property (readonly,...
freearhey/TableTool
Table Tool/CSVHeuristic.h
<filename>Table Tool/CSVHeuristic.h // // CSVHeuristic.h // Table Tool // // Created by <NAME> on 04.08.15. // Copyright (c) 2015 Egger Apps. All rights reserved. // #import <Foundation/Foundation.h> #import "CSVConfiguration.h" @interface CSVHeuristic : NSObject @property CSVConfiguration *config1; @property CS...
freearhey/TableTool
Table Tool/CSVConfiguration.h
<gh_stars>1000+ // // CSVConfiguration.h // Table Tool // // Created by <NAME> on 21.07.15. // Copyright (c) 2015 Egger Apps. All rights reserved. // #import <Foundation/Foundation.h> @interface CSVConfiguration : NSObject <NSCopying> @property NSStringEncoding encoding; @property NSString *columnSeparator; @pro...
freearhey/TableTool
Table Tool/CSVWriter.h
<gh_stars>1000+ // // CSVWriter.h // Table Tool // // Created by <NAME> on 10.07.15. // Copyright (c) 2015 Egger Apps. All rights reserved. // #import <Foundation/Foundation.h> #import "CSVConfiguration.h" @interface CSVWriter : NSObject @property (readonly) NSArray *dataArray; @property NSArray *columnsOrder; @...
freearhey/TableTool
Table Tool/TTErrorViewController.h
// // TTErrorViewController.h // Table Tool // // Created by <NAME> on 30.07.15. // Copyright (c) 2015 Egger Apps. All rights reserved. // #import <Cocoa/Cocoa.h> @interface TTErrorViewController : NSViewController @property IBOutlet NSTextField *information; @property IBOutlet NSTextField *message; -(instancet...
freearhey/TableTool
Table Tool/Constants.h
<reponame>freearhey/TableTool // // Constants.h // Table Tool // // Created by <NAME> on 12.06.17. // Copyright (c) 2017 Egger Apps. All rights reserved. // #include <Cocoa/Cocoa.h> #pragma mark Pasteboard Types extern NSString *TTRowInternalPboardType;
freearhey/TableTool
Table Tool/Document.h
// // Document.h // Table Tool // // Created by <NAME> on 06.07.15. // Copyright (c) 2015 Egger Apps. All rights reserved. // #import <Cocoa/Cocoa.h> #import "CSVConfiguration.h" #import "TTFormatViewController.h" @interface Document : NSDocument <NSTableViewDataSource, NSTableViewDelegate, TTFormatViewController...
Ruphobia/mydev-esp-open-rtos
extras/onewire/onewire.h
<filename>extras/onewire/onewire.h #ifndef __ONEWIRE_H__ #define __ONEWIRE_H__ #include <espressif/esp_misc.h> // sdk_os_delay_us #include "FreeRTOS.h" /** @file onewire.h * * Routines to access devices using the Dallas Semiconductor 1-Wire(tm) * protocol. */ /** Select the table-lookup method of computing the...
Ruphobia/mydev-esp-open-rtos
examples/pwm_test/pwm_test.c
<filename>examples/pwm_test/pwm_test.c /* Very basic example to test the pwm library * Hook up an LED to pin14 and you should see the intensity change * * Part of esp-open-rtos * Copyright (C) 2015 <NAME> (https://github.com/jcard0na) * BSD Licensed as described in the file LICENSE */ #include "espressif/esp_comm...
Ruphobia/mydev-esp-open-rtos
extras/adafruit_sharpmemory_display/adafruit_sharpmemory_display.c
<filename>extras/adafruit_sharpmemory_display/adafruit_sharpmemory_display.c /********************************************************************* * Adafruit Sharp Memory Display Breakout driver for ESP8266 * Modified / used code from the Adafruit arduino lib, see below :) * * Uses SPI Port 1 * * SPI_CLK = GPIO...
Ruphobia/mydev-esp-open-rtos
examples/ws2812_i2s/ws2812_i2s_colour_loop.c
/** * Example of ws2812_i2s library usage. * * This example shows light that travels in circle with fading tail. * As ws2812_i2s library using hardware I2S the output pin is GPIO3 and * can not be changed. * * This sample code is in the public domain., */ #include "espressif/esp_common.h" #include "FreeRTOS.h" ...
Ruphobia/mydev-esp-open-rtos
extras/ws2812/ws2812.h
/** * @file ws2812.h * @brief ESP8266 driver for WS2812 * * This is a simple bit-banging driver for WS2812. * * It will work for WS2812, WS2812B and possibly others, * with small alterations. * * The WS2812 protocol takes roughly 1µs per bit, * thus ~24µs per "pixel", plus 50µs to indicate * the end of da...
Ruphobia/mydev-esp-open-rtos
examples/tls_server/tls_server.c
/* tls_server - simple TLS server that outputs some statistics to a connecting client, * then closes the socket. * * Similar to the the ssl_server example in mbedtls. * * To test this program, connect to the ESP using openssl command line like this: * * openssl s_client -connect 192.168.66.209:800 * * The open...
Ruphobia/mydev-esp-open-rtos
extras/flirlipton/flirlipton.c
#include "flirlipton.h" sys_mutex_t *pSPIMutex; int FLIR_SPI_CS_GPIO_NUM; void FLIR_Lipton_CaptureImage(FLIRBuffer ImageBuffer) { //lock the SPI port sys_mutex_lock(pSPIMutex); FLIR_Lipton_ChipSelect(1);//chip disabled //setup up the spi port spi_init(1, SPI_MODE3, SPI_FREQ_DIV_20M, true, SPI_BIG_ENDIAN, true);...
Ruphobia/mydev-esp-open-rtos
open_esplibs/libmain/user_interface.c
/* Recreated Espressif libmain user_interface.o contents. Copyright (C) 2015 Espressif Systems. Derived from MIT Licensed SDK libraries. BSD Licensed as described in the file LICENSE */ #include "open_esplibs.h" #if OPEN_LIBMAIN_USER_INTERFACE // The contents of this file are only built if OPEN_LIBMAIN_USER_INTE...
Ruphobia/mydev-esp-open-rtos
examples/mqtt_client/mqtt_client.c
#include "espressif/esp_common.h" #include "esp/uart.h" #include <string.h> #include <FreeRTOS.h> #include <task.h> #include <ssid_config.h> #include <espressif/esp_sta.h> #include <espressif/esp_wifi.h> #include <paho_mqtt_c/MQTTESP8266.h> #include <paho_mqtt_c/MQTTClient.h> #include <semphr.h> /* You can use h...
Ruphobia/mydev-esp-open-rtos
extras/rboot-ota/ota-tftp.c
/* TFTP Server OTA support * * For details of use see ota-tftp.h * * Part of esp-open-rtos * Copyright (C) 2015 Superhouse Automation Pty Ltd * BSD Licensed as described in the file LICENSE */ #include <FreeRTOS.h> #include <string.h> #include <strings.h> #include "lwip/err.h" #include "lwip/api.h" #include "lw...
Ruphobia/mydev-esp-open-rtos
examples/access_point/access_point.c
<reponame>Ruphobia/mydev-esp-open-rtos<filename>examples/access_point/access_point.c /* Very basic example showing usage of access point mode and the DHCP server. The ESP in the example runs a telnet server on 172.16.0.1 (port 23) that outputs some status information if you connect to it, then closes the conn...
Ruphobia/mydev-esp-open-rtos
extras/dht/dht.h
<filename>extras/dht/dht.h /* * Part of esp-open-rtos * Copyright (C) 2016 <NAME> (https://github.com/jsuiker) * BSD Licensed as described in the file LICENSE * */ #ifndef __DHT_H__ #define __DHT_H__ #include <stdint.h> #include <stdbool.h> #define DHT11 11 #define DHT22 22 // Type ...
Ruphobia/mydev-esp-open-rtos
extras/dhcpserver/include/dhcpserver.h
<gh_stars>1-10 /* Very basic LWIP & FreeRTOS-based DHCP server * * Header file contains default configuration for the DHCP server. * * * Part of esp-open-rtos * Copyright (C) 2015 Superhouse Automation Pty Ltd * BSD Licensed as described in the file LICENSE */ #ifndef _DHCPSERVER_H #define _DHCPSERVER_H #ifnde...
Ruphobia/mydev-esp-open-rtos
core/esp_spi.c
/* * ESP hardware SPI master driver * * Part of esp-open-rtos * Copyright (c) <NAME>, 2016 * BSD Licensed as described in the file LICENSE */ #include "esp/spi.h" #include "esp/iomux.h" #include "esp/gpio.h" #include <string.h> #define _SPI0_SCK_GPIO 6 #define _SPI0_MISO_GPIO 7 #define _SPI0_MOSI_GPIO 8 #defin...
Ruphobia/mydev-esp-open-rtos
extras/i2c/i2c.c
<filename>extras/i2c/i2c.c<gh_stars>1-10 /* * The MIT License (MIT) * * Copyright (c) 2015 <NAME> (github.com/kanflo) * * 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 restr...
Ruphobia/mydev-esp-open-rtos
extras/flirlipton/flirlipton.h
#ifndef FLIRLIPTON_H #define FLIRLIPTON_H #include <string.h> #include <stddef.h> #include <esp/spi.h> #include <lwip/sys.h> #define ADDRESS (0x2A) #define SYS (0x02) #define GET (0x00) #define VOSPI_FRAME_SIZE (164) #ifndef _USEGPIO_16_ #define _USEGPIO_16_ #define ESP8266_REG(addr) *((volatile uint32_t *)(0x600...
Ruphobia/mydev-esp-open-rtos
extras/ds18b20/ds18b20.h
#ifndef DRIVER_DS18B20_H_ #define DRIVER_DS18B20_H_ #include "onewire/onewire.h" /** @file ds18b20.h * * Communicate with the DS18B20 family of one-wire temperature sensor ICs. * */ typedef onewire_addr_t ds18b20_addr_t; /** An address value which can be used to indicate "any device on the bus" */ #define DS18...
SSL-Roots/CON-SAI
avoiding_point_generator/src/transformation.h
#ifndef TRANSFORMATION_H #define TRANSFORMATION_H #include <complex> #include <cmath> #include <geometry_msgs/Point.h> typedef std::complex<double> Complex; namespace Tool{ constexpr double e = std::numeric_limits<double>::epsilon(); double normalize(double angle){ while(angle > M_PI){ ...
SSL-Roots/CON-SAI
trapezoidal_control/src/transformation.h
#ifndef TRANSFORMATION_H #define TRANSFORMATION_H #include <complex> #include <cmath> typedef std::complex<double> Complex; namespace Tool{ inline double normalize(double angle){ while(angle > M_PI){ angle -= 2.0*M_PI; } while(angle < -M_PI){ angle += 2.0*M_PI; ...
zulip/zulip-ios
Zulip/Controllers/ViewControllers/AboutViewController.h
<filename>Zulip/Controllers/ViewControllers/AboutViewController.h // // AboutViewController.h // Zulip // // Created by <NAME> on 9/26/13. // // #import <UIKit/UIKit.h> @interface AboutViewController : UIViewController @property (strong, nonatomic) IBOutlet UILabel *version; @end
zulip/zulip-ios
Zulip/Protocols/MessageComposing.h
<gh_stars>100-1000 // // MessageComposing.h // Zulip // // Created by <NAME> on 1/21/14. // // #import <Foundation/Foundation.h> @protocol MessageComposing <NSObject> - (void)showComposeViewForUser:(ZUser *)user; @end
zulip/zulip-ios
Zulip/Controllers/LongPoller.h
// // LongPoller.h // Zulip // // Created by <NAME> on 8/5/13. // // #import <Foundation/Foundation.h> typedef void(^EventBlock)(NSArray *events); typedef void(^InitialData)(NSDictionary *data); typedef void(^ErrorHandler)(void); @interface LongPoller : NSObject @property (nonatomic, retain) NSString *queueId; ...
zulip/zulip-ios
Zulip/PresenceManager.h
<gh_stars>100-1000 // // PresenceManager.h // Zulip // // Created by <NAME> on 12/31/13. // // #import <Foundation/Foundation.h> // PresenceManager updates the Zulip server periodially when in the foreground, with presence information // It also receives and handles the realm's presence information and inserts it ...
zulip/zulip-ios
Zulip/NarrowOperators.h
<reponame>zulip/zulip-ios // // NarrowOperators.h // Zulip // // Created by <NAME> on 8/1/13. // // #import <Foundation/Foundation.h> #import "RawMessage.h" /** This represents a bunch of narrow operators, and can be converted into either an NSCompoundPredicate* for Core Data lookups or a Zulip-compatible JSON n...
zulip/zulip-ios
Zulip/ZulipAppDelegate.h
#import <UIKit/UIKit.h> #import "LoginViewController.h" #import "HomeViewController.h" #import "ErrorViewController.h" #import "AFHTTPRequestOperation.h" #import "JASidePanelController.h" #import "NarrowOperators.h" @interface ZulipAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> @property (...
zulip/zulip-ios
ZulipTests/ZulipTests.h
// // ZulipTests.h // ZulipTests // #import <SenTestingKit/SenTestingKit.h> @interface ZulipTests : SenTestCase @end
zulip/zulip-ios
Zulip/Models/RawMessage.h
<filename>Zulip/Models/RawMessage.h // // RawMessage.h // Zulip // // Created by <NAME> on 7/31/13. // // #import <Foundation/Foundation.h> #import "ZMessage.h" #import "ZUser.h" #import "ZSubscription.h" typedef void(^RawMessageChangeHandler)(RawMessage *rawMsg); /** This is a "non-NSManagedObject" ZMessage, f...
zulip/zulip-ios
Zulip/Models/ZUser.h
<reponame>zulip/zulip-ios // // ZUser.h // Zulip // // Created by <NAME> on 7/29/13. // // #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> @class ZMessage, ZSubscription; @interface ZUser : NSManagedObject @property (nonatomic, retain) NSString * avatar_url; @property (nonatomic, retain) NSString...
zulip/zulip-ios
Zulip/Controllers/ViewControllers/LeftSidebarViewController.h
// // LeftSidebarViewController.h // Zulip // // Created by <NAME> on 8/7/13. // // #import <UIKit/UIKit.h> @interface LeftSidebarViewController : UITableViewController - (void)reset; @end
zulip/zulip-ios
Zulip/Models/RangePair.h
<reponame>zulip/zulip-ios // // RangePair.h // Zulip // // Created by <NAME> on 8/6/13. // // #import <Foundation/Foundation.h> @interface RangePair : NSObject <NSCoding> @property NSUInteger left; @property NSUInteger right; - (id) initWithStart:(NSUInteger)theStart andEnd:(NSUInteger)theEnd; - (id) initForComp...
zulip/zulip-ios
Zulip/ErrorViewController.h
#import <UIKit/UIKit.h> @interface ErrorViewController : UIViewController @property (strong, nonatomic) IBOutlet UILabel *errorMessage; - (IBAction) goBack; @end