repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
nug-/amk | main/porting/stm32/stm32f411xe.c | /**
* stm32f411xe.c
*/
#include "generic_hal.h"
#include "tusb.h"
#include "amk_printf.h"
I2C_HandleTypeDef hi2c1;
DMA_HandleTypeDef hdma_i2c1_tx;
DMA_HandleTypeDef hdma_i2c1_rx;
SPI_HandleTypeDef hspi1;
DMA_HandleTypeDef hdma_spi1_rx;
DMA_HandleTypeDef hdma_spi1_tx;
RTC_HandleTypeDef hrtc;
#ifdef TINYUSB_ENABLE... |
nug-/amk | main/drivers/w25qxx.c | /**
* @file w25qxx.c
*/
#include "w25qxx.h"
#include "wait.h"
#include "amk_printf.h"
#ifndef W25QXX_NUM
#define W25QXX_NUM 1
#endif
#define WQCMD_DUMMY 0xA5
//Write Enable
#define WQCMD_WRITE_ENABLE 0x06
//Volatile SR Write Enable
#define WQCMD_SR_WRITE_ENABLE 0x50
//Write Disable
#define WQCM... |
nug-/amk | keyboards/m65_original/config.h | /**
* config.h
*
*/
#pragma once
// USB Device descriptor parameter
#define VENDOR_ID 0x4D58 // MX
#define PRODUCT_ID 0x6500 // M65 with screen
#define DEVICE_VER 0x0001
#define MANUFACTURER Matrix Lab
#define PRODUCT Matrix Vita
// key matrix
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
#define MAT... |
nug-/amk | main/porting/nrf52/gzll_keyboard.h | /**
* @file gzll_keyboard.h
*/
#pragma once
#include "gzll_config.h"
void gzll_keyboard_init(bool host);
void gzll_keyboard_start(void);
void gzll_keyboard_stop(void); |
nug-/amk | main/porting/nrf52/gzll_keyboard.c | <filename>main/porting/nrf52/gzll_keyboard.c
/**
* @ile gzll_keyboard.c
*/
#include <stdint.h>
#include "gzll_keyboard.h"
#include "nordic_common.h"
#include "app_error.h"
#include "nrf_gzll.h"
#include "nrf_gzll_error.h"
#include "nrf_drv_clock.h"
#include "eeconfig_flash.h"
#include "rf_keyboard.h"
#include "usb_i... |
nug-/amk | main/drivers/ssd1357.c | /**
* ssd1357.c
*/
#include "ssd1357.h"
#include "spi.h"
#include "wait.h"
#define BRIGHTNESS 0x0F
#define COL_BEGIN 0x20
#define COL_END 0x5f
#define ROW_BEGIN 0x00
#define ROW_END 0x3f
enum{
CMD_SetColumnAddress = 0x15,
CMD_SetRowAddress = 0x75,
CMD_WriteRAM = 0x5C,
CMD_ReadRAM,
C... |
nug-/amk | sdk_stm32/mcus/l072/stm32l0xx_it.c | <reponame>nug-/amk
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32l0xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
* @attention
*
* <h2><c... |
nug-/amk | main/vial/send_string.c | /* Copyright 2021
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope t... |
nug-/amk | main/amk/amk_eeprom.c | /**
* Copyright 2021 astro. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/**
* @file amk_eeprom.c
*/
#include "amk_eeprom.h"
#include "amk_keymap.h"
#include "amk_printf.h"
#ifdef RGB_ENABLE
#include "rgb_led.h"
#e... |
nug-/amk | keyboards/controller/config.h | /**
* config.h
*
*/
#pragma once
/* USB Device descriptor parameter */
#define VENDOR_ID 0x4D58 // MX
#define PRODUCT_ID 0x4848 // HH
#define DEVICE_VER 0x0001
#define MANUFACTURER astro
#define PRODUCT HHKB BLE
/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 8
#define VBUS_DETECT_PIN ... |
nug-/amk | main/porting/stm32/stm32f722xx.c | /**
* stm32_l431xx.c
*/
#include "generic_hal.h"
#include "usb_descriptors.h"
DMA_HandleTypeDef hdma_i2c1_rx;
DMA_HandleTypeDef hdma_i2c1_tx;
SPI_HandleTypeDef hspi1;
DMA_HandleTypeDef hdma_spi1_rx;
DMA_HandleTypeDef hdma_spi1_tx;
SPI_HandleTypeDef hspi2;
DMA_HandleTypeDef hdma_spi2_rx;
DMA_HandleTypeDef hdma_spi... |
nug-/amk | keyboards/m65/m65.h | /**
* m65.h
*/
#pragma once
#include "amk_config.h"
#ifdef ACTIONMAP_ENABLE
#define LT_NO AC_NO
#else
#define LT_NO KC_NO
#endif
#define LAYOUT_default( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c... |
nug-/amk | main/rgb/rgb_effect_matrix.h | <gh_stars>10-100
/**
* @file rgb_effect_matrix.h
* @brief rgb matrix definition
*/
#pragma once
#include "rgb_driver.h"
enum {
RM_EFFECT_STATIC,
RM_EFFECT_BREATH,
RM_EFFECT_GRADIENT,
RM_EFFECT_RAINBOW,
RM_EFFECT_GRADIENT_V,
RM_EFFECT_RAINBOW_V,
RM_EFFECT_ROTATE,
RM_EFFECT_SNAKE,
... |
nug-/amk | main/vial/keycode_convert.c | <reponame>nug-/amk
/**
* @file keycode_convert.c
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* ... |
nug-/amk | main/porting/common/usb_interface.h | /**
* usb_interface.h
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "usb_descriptors.h"
void usb_init(void);
void usb_task(void);
bool usb_ready(void);
bool usb_suspended(void);
void usb_remote_wakeup(void);
void usb_send_report(uint8_t report_type, const void* data, size_t size); |
nug-/amk | main/porting/gd32/gpio_pin.c | <reponame>nug-/amk
/**
* @file gpio_pin.c
*/
#include <string.h>
#include "generic_hal.h"
#include "amk_gpio.h"
int gpio_read_pin(pin_t pin)
{
return gpio_input_bit_get(GET_PORT(pin), GET_PIN(pin)) ? 1 : 0;
}
void gpio_write_pin(pin_t pin, int value)
{
gpio_bit_write(GET_PORT(pin), GET_PIN(pin), value ? SE... |
nug-/amk | main/drivers/i2c.c | /**
* i2c.c
*/
#if defined(NRF52832_XXAA) || defined(NRF52840_XXAA)
# include "i2c_nrf52.c"
#elif defined(STM32F411xE) || defined(STM32F405xx) || defined(STM32F722xx)
# include "i2c_stm32.c"
#endif |
nug-/amk | main/usb/mscusb.h | /**
* @file mscusb.h
* usb msc interface
*/
#pragma once
void msc_init(void);
void msc_task(void);
// reset the chip to original state
void msc_erase(void);
|
nug-/amk | main/drivers/rgb_driver.h | /**
* @file rgb_driver.h
* @brief rgb led driver implementation
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "rgb_common.h"
typedef struct s_rgb_driver rgb_driver_t;
typedef void (*rd_init)(rgb_driver_t *driver);
typedef void (*rd_uninit)(rgb_driver_t* driver);
typedef void (*... |
nug-/amk | main/amk/amk_printf.c | /**
* Copyright 2021 astro. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/**
* @file amk_printf.c
*/
#include "amk_printf.h"
int xprintf(char* fmt, ...)
{
int result = 0;
va_list va;
va_start(va, fmt);
result = vpr... |
nug-/amk | keyboards/controller/controller_keymap.c | <gh_stars>10-100
/**
* controller_keymap.c
* default keymap for the hhkb ble controller
*/
#include "controller.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0]=LAYOUT_default(
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSLS, GRV,
TAB, Q, ... |
nug-/amk | keyboards/hhkbusb/hhkb_matrix.c | /**
* hhkbusb_matrix.c
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "generic_hal.h"
#include "report.h"
#include "matrix.h"
#include "host.h"
#include "timer.h"
#include "usb_descriptors.h"
#include "ring_buffer.h"
#include "amk_gpio.h"
#include "amk_keymap.h"
#include "am... |
nug-/amk | main/porting/gd32/usb_comp.c | <reponame>nug-/amk
/**
* @file usb_comp.c
*/
#include "usb_comp.h"
#include "usb_descriptors.h"
static uint8_t comp_init(usb_dev *udev, uint8_t config_index);
static uint8_t comp_deinit(usb_dev *udev, uint8_t config_index);
static uint8_t comp_req_proc(usb_dev *udev, usb_req *req);
static uint8_t comp_dat... |
nug-/amk | main/amk/matrix_scan.c | /**
* Copyright 2021 astro. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/**
* @file matrix_scan.c
* keyboard matrix scanning implementation
*/
#include <string.h>
#include "matrix_scan.h"
#include "keyboard.h"
#inc... |
nug-/amk | main/rgb/rgb_led.c | /**
* @file rgb_led.c
*/
#include "rgb_led.h"
#include "rgb_driver.h"
#ifdef RGB_LINEAR_ENABLE
#include "rgb_linear.h"
#include "rgb_effect_linear.h"
#endif
#ifdef RGB_INDICATOR_ENABLE
#include "rgb_indicator.h"
#endif
#ifdef RGB_MATRIX_ENABLE
#include "rgb_matrix.h"
#include "rgb_effect_matrix.h"
#e... |
nug-/amk | main/porting/nrf52/generic_nrf52.c | <filename>main/porting/nrf52/generic_nrf52.c
/**
* @file generic_nrf52.c
* board implementation of nrf52
*/
#include "common_config.h"
#include "nrf_pwr_mgmt.h"
#include "nrf_delay.h"
#include "nrf_drv_clock.h"
#include "app_scheduler.h"
#include "ble_keyboard.h"
#include "gzll_keyboard.h"
#include "eec... |
nug-/amk | keyboards/abelx_hs/abelx_hs.c | /**
* @file abelx_hs.c
*/
#include <stdbool.h>
#include "abelx_hs.h"
#include "led.h"
#include "wait.h"
#include "pca9535.h"
#include "is31fl3236.h"
#include "is31fl3731.h"
#include "aw9106b.h"
#include "rgb_driver.h"
#include "rgb_indicator.h"
#include "rgb_linear.h"
#include "amk_gpio.h"
#include "amk_printf.h"... |
nug-/amk | main/porting/nrf52/usb_backend_usb.c | <reponame>nug-/amk<filename>main/porting/nrf52/usb_backend_usb.c<gh_stars>10-100
/**
* usb_backend_uart.h
* send usb report throught the uart
*/
#include "usb_interface.h"
#include "nrf_delay.h"
#include "nrf_drv_clock.h"
#include "app_usbd.h"
#include "app_usbd_core.h"
#include "app_usbd_hid_generic.h"
#incl... |
nug-/amk | main/drivers/ws2812.c | <reponame>nug-/amk
/**
* @file ws2812.c
*/
#ifdef WS2812_LED_NUM
#if defined(NRF52832_XXAA) || defined(NRF52840_XXAA)
# include "ws2812_nrf52.c"
#else
# include "ws2812_stm32_pwm.c"
#endif
#endif
|
nug-/amk | sdk_stm32/mcus/f722/stm32f7xx_hal_msp.c | /* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32f7xx_hal_msp.c
* @brief This file provides code for the MSP Initialization
* and de-Initialization codes.
********************************************... |
nug-/amk | main/porting/gd32/gd32.c | /**
* @file gd32.c
*/
#include "amk_gpio.h"
#include "usb_descriptors.h"
#include "usb_comp.h"
#include "drv_usb_hw.h"
#include "drv_usbd_int.h"
volatile static uint32_t systick_count;
extern usb_core_driver amk_comp;
extern void usb_timer_irq(void);
static void systick_init(void)
{
if (SysTick_Config(System... |
nug-/amk | main/amk/matrix_scan.h | <reponame>nug-/amk<filename>main/amk/matrix_scan.h<gh_stars>10-100
/**
* Copyright 2021 astro. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/**
* @file matrix_scan.h
* @brief keyboard matrix scanning interface
*/
#incl... |
nug-/amk | main/porting/gd32/usb_comp.h | <reponame>nug-/amk
/**
* @file usb_comp.h
* @brief hid composite device
*/
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "usbd_enum.h"
#include "usb_hid.h"
extern usb_desc comp_desc;
extern usb_class_core usbd_comp_cb;
bool usbd_comp_itf_ready(usb_core_driver *udev, uint32_t itf);... |
nug-/amk | main/amk/amk_eeprom.h | <reponame>nug-/amk
/**
* Copyright 2021 astro. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/**
* @file amk_eeprom.h
*/
#pragma once
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "eeconfig.... |
nug-/amk | main/porting/nrf52/rf_keyboard.c | <filename>main/porting/nrf52/rf_keyboard.c<gh_stars>10-100
/**
* @file rf_keyboard.c
*
*/
#include "common_config.h"
#include "nrf_gpio.h"
#include "nrf_pwr_mgmt.h"
#include "nrfx_wdt.h"
#include "nrf_drv_timer.h"
#include "nrf_drv_clock.h"
#include "nrf_drv_rtc.h"
#include "usb_interface.h"
#include "app_schedule... |
nug-/amk | sdk_stm32/hal_usb/usbd_desc.c | /* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : App/usbd_desc.c
* @version : v2.0_Cube
* @brief : This file implements the USB device descriptors.
*********************************************************... |
nug-/amk | main/drivers/ws2812_nrf52.c | /**
* @file ws2812_nrf52.c
*/
#include "nrfx_pwm.h"
#include "nrf_gpio.h"
#include "ws2812.h"
#include "nrf_log.h"
#include "rgb_common.h"
#include "wait.h"
// data copied from the Adafruit NeoPixel lib
#define PWM_DIVIDER 20
#define WS2812_VAL_0 (0x8000 | 6)
#define WS2812_VAL_1 (0x8000 | 13)... |
nug-/amk | main/rgb/rgb_led.h | <reponame>nug-/amk
/**
* @file rgb_led.h
*/
#pragma once
#include "rgb_driver.h"
void rgb_led_init(void);
void rgb_led_task(void);
void rgb_led_prepare_sleep(void);
rgb_driver_t *rgb_led_map(uint8_t led_index);
bool rgb_led_is_on(void);
void rgb_led_set_all(bool on);
void rgb_led_config_init(vo... |
nug-/amk | main/drivers/ws2812_stm32_pwm.c | /**
* @file ws2812_stm32_pwm.c
*
* timer pwm based driver for ws2812
*
*/
#include <stdbool.h>
#include "rgb_common.h"
#include "ws2812.h"
#ifndef PWM_TIM
#define PWM_TIM htim1
#endif
#ifndef PWM_TIM_CHANNEL
#define PWM_TIM_CHANNEL TIM_CHANNEL_3
#endif
#ifndef PWM_TIM_PERIOD
#error "pwm time period must be... |
nug-/amk | keyboards/m65/m65_keymap.c | /*
* m65_keymap.c
*/
#include "m65.h"
#define _______ KC_TRNS
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_default(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
KC_TAB, KC... |
nug-/amk | keyboards/m20ble/m20ble.c | /*
* m20ble.c
*/
#include "m20ble.h"
#include "rgb_driver.h"
#include "rgb_linear.h"
#include "is31fl3731.h"
rgb_led_t g_rgb_leds[RGB_LED_NUM] = {
{0, C1_1, C3_2, C4_2},
{0, C1_2, C2_2, C4_3},
{0, C1_3, C2_3, C3_3},
{0, C1_4, C2_4, C3_4},
{0, C1_5, C2_5, C3_5},
{0, C1_6, ... |
nug-/amk | keyboards/rfhost/rfhost_matrix.c | /**
* rfhost_matrix.c
*/
#include <stdbool.h>
#include "matrix.h"
void matrix_init_custom(void)
{}
bool matrix_scan_custom(matrix_row_t* raw)
{return false;}
//void matrix_prepare_sleep(void) { }
|
nug-/amk | main/porting/common/usb_tinyusb.c | <reponame>nug-/amk
/**
* usb_tinyusb.c
*/
#include "usb_interface.h"
#include "usb_descriptors.h"
#include "generic_hal.h"
#include "amk_printf.h"
#include "report_queue.h"
#ifdef VIAL_ENABLE
#include "vial_porting.h"
#endif
static hid_report_queue_t report_queue;
static bool usb_itf_ready(uint32_t type);
static ... |
nug-/amk | main/porting/nrf52/ble/ble_bas_service.c | <reponame>nug-/amk
/**
* @file ble_bas_service.h
* @brief ble battery service
*/
#include "amk_gpio.h"
#include "ble_bas.h"
#include "ble_bas_service.h"
#include "nrf_saadc.h"
#include "nrf_drv_saadc.h"
#define SAADC_SAMPLES 5
#define BAT_UPDATE_THRESHHOLD 5
#define BAT_UPDATE_WEIGHT 70
static n... |
nug-/amk | main/drivers/is31fl3733.h | <gh_stars>10-100
/**
* @file is31fl3733.h
* @brief driver interace for is31fl3733
*/
#pragma once
#include "i2c_led.h"
i2c_led_t *is31fl3733_init(uint8_t addr, uint8_t index, uint8_t led_start, uint8_t led_num);
void is31fl3733_uninit(i2c_led_t *driver);
void is31fl3733_set_color(i2c_led_t * driver, uint8_t inde... |
nug-/amk | main/porting/nrf52/ble/ble_hids_service.c | <reponame>nug-/amk
/**
* @file ble_hids_service.c
* @brief hid service implementation
*/
#include "ble_hids.h"
#include "ble_hids_service.h"
#include "usb_descriptors.h"
#include "report_queue.h"
const static uint8_t hid_report_descriptor [] = {
TUD_HID_REPORT_DESC_KEYBOARD( HID_REPORT_ID(NRF_REPORT_ID_KEYBOAR... |
nug-/amk | main/rgb/rgb_linear.c | /**
* @file rgb_linear.c
*/
#include "rgb_linear.h"
#include "rgb_driver.h"
#include "rgb_effect_linear.h"
typedef struct {
rgb_effect_t effects[RGB_SEGMENT_NUM];
} rgb_linear_t;
static rgb_linear_t rgb_linear;
void rgb_linear_init(void)
{
// initialize rgb effects
for (int i = 0; i <... |
nug-/amk | main/rgb/rgb_matrix.h | <reponame>nug-/amk<filename>main/rgb/rgb_matrix.h
/**
* @file rgb_matrix.h
*/
#pragma once
#include "rgb_common.h"
extern rgb_param_t g_rgb_matrix_params[RGB_MATRIX_NUM];
void rgb_matrix_init(void);
void rgb_matrix_task(void);
void rgb_matrix_uninit(void);
void rgb_matrix_prepare_sleep(void);
|
nug-/amk | main/porting/gd32/usb_gd32.c | /**
* @file usb_gd32.c
* interface implementation
*/
#include "usb_interface.h"
#include "usb_conf.h"
#include "drv_usb_dev.h"
#include "drv_usb_hw.h"
#include "report_queue.h"
#include "wait.h"
#include "amk_printf.h"
#include "usb_descriptors.h"
#include "usb_comp.h"
usb_core_driver amk_comp;
us... |
nug-/amk | main/porting/atsamd/atsamd.c | /**
* @file atsamd.c
*/
#include "amk_gpio.h"
#include "usb_descriptors.h"
struct flash_descriptor FLASH_0;
struct usart_sync_descriptor USART_0;
static void FLASH_0_CLOCK_init(void)
{
_pm_enable_bus_clock(PM_BUS_APBB, NVMCTRL);
}
static void FLASH_0_init(void)
{
FLASH_0_CLOCK_init();
flash_init(&FLAS... |
nug-/amk | sdk_stm32/mcus/f411/stm32f4xx_it.c | <gh_stars>10-100
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32f4xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
* @attention
*
* <h2><cen... |
nug-/amk | main/porting/nrf52/usb_interface.h | /**
* usb_interface.h
*
*/
#pragma once
#include "ble_config.h"
// usb power up
typedef void (*nrf_usb_enable)(void);
// usb power down
typedef void (*nrf_usb_disable)(void);
// usb suspend
typedef void (*nrf_usb_suspend)(bool remote_wakeup_en);
// usb resume
typedef void (*nrf_usb_resume)(void);
// usb leds
type... |
nug-/amk | main/screen/screen.c | <filename>main/screen/screen.c
/**
* @file screen.c
*/
#include "screen.h"
#include "amk_gpio.h"
#ifndef SCREEN_DRIVER
#define SCREEN_DRIVER_ST7735
#endif
#ifdef SCREEN_DRIVER_ST7735
#include "st7735.h"
#define screen_driver_t st7735_t
#else
#include "ssd1357.h"
#define screen_driver_t ssd1357_t
#endif
static sc... |
nug-/amk | main/amk/amk_boot.c | /**
* Copyright 2021 astro. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/**
* @file amk_boot.c
*/
#include <stdbool.h>
#include "wait.h"
#include "matrix.h"
#include "bootloader.h"
#include "keymap.h"
#include "actionmap.h"
#inclu... |
nug-/amk | keyboards/m65_original/m65.c | /*
* m65.c
*/
#include <string.h>
#include "m65.h"
#include "timer.h"
#include "led.h"
#include "amk_gpio.h"
#include "usb_descriptors.h"
#ifdef DYNAMIC_CONFIGURATION
extern RTC_HandleTypeDef hrtc;
static void reset_to_msc(bool msc);
#endif
#ifdef SCREEN_ENABLE
#include "screen.h"
#include "fractal.h"
#endif
#... |
nug-/amk | keyboards/controller/controller.c | /**
* @file controller.c
*/
#include "controller.h"
|
nug-/amk | main/porting/stm32/usb_hal.c | /**
* usb_hal.c
*/
#include "usb_interface.h"
#include "usb_descriptors.h"
#include "generic_hal.h"
#include "usb_device.h"
#include "usb_descriptors.h"
#include "usbd_composite.h"
#include "amk_printf.h"
#include "usb_host.h"
#include "usbh_hid_multi.h"
#include "report_parser.h"
#include "report_queue.h"
extern U... |
nug-/amk | main/porting/nuvoton/gpio_pin.c | <filename>main/porting/nuvoton/gpio_pin.c
/**
* @file gpio_pin.c
*/
#include "generic_hal.h"
#include "amk_gpio.h"
#define PIN_CVT(pin) GPIO_PIN_DATA((GET_PORT(pin)), (GET_PIN(pin)))
#define PORT_CVT(pin) (GPIO_T *)(GPIO_BASE + (GET_PORT(pin))*0x40)
int gpio_read_pin(pin_t pin)
{
return PIN_CVT(pin);
}
v... |
nug-/amk | main/drivers/st7735.h | <filename>main/drivers/st7735.h
/**
* @file st7735.h
*/
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "amk_gpio.h"
typedef struct {
#ifdef SCREEN_POWER_PIN
pin_t power;
#endif
pin_t reset;
pin_t cs;
pin_t dc;
} st7735_t;
void st7735_init(st7735_t *driver);
void st7735_fill_rect(s... |
nug-/amk | sdk_stm32/hal_usb/dcd_hal_stm32.c | /**
* dcd_hal.c
*/
#include "generic_hal.h"
#include "device/dcd.h"
#include "amk_printf.h"
#if defined(STM32F103xB)
#define DCD_MAX_EP_NUM 8
#define DCD_USB_INSTANCE USB
#define DCD_USB_IRQn USB_LP_CAN1_RX0_IRQn
#elif defined(STM32F411xE) || defined(STM32F405xx)
#define DC... |
nug-/amk | main/drivers/is31fl3731.c | <filename>main/drivers/is31fl3731.c
/**
* is31fl3731.c
* driver implementation for is31fl3731
*/
#include <stdbool.h>
#include <string.h>
#include "is31fl3731.h"
#include "rgb_common.h"
#include "i2c.h"
#include "wait.h"
#define PWM_BUFFER_SIZE 144
#define CONTROL_BUFFER_SIZE 18
#define COMMAND_REG 0... |
nug-/amk | main/porting/nrf52/ble/ble_bas_service.h | /**
* @file ble_bas_service.h
* @brief ble battery service
*/
#pragma once
#include "ble_config.h"
void ble_bas_service_init(void);
void ble_bas_service_start(void);
void ble_bas_service_prepare_sleep(void); |
Itheme/Worderer | Classes/CharTreeLayer.h | <filename>Classes/CharTreeLayer.h<gh_stars>0
//
// CharTreeLayer.h
// Worderer
//
// Created by <NAME> on 30/06/16.
// Copyright © 2016 Itheme. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CharTreeLayer : NSObject
+ (CharTreeLayer *) createWithSampleWords:(NSArray <NSString *> *)words;
+ ... |
Nodrev/assimp | code/AssetLib/FBX/FBXProperties.h | <reponame>Nodrev/assimp<gh_stars>10-100
/*
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2021, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitt... |
Nodrev/assimp | include/assimp/XmlParser.h | <gh_stars>10-100
/*
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2021, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the
fol... |
mathisloge/alfons | src/alfons/path/splinePath.h | /*
* Based on The New Chronotext Toolkit
* Copyright (C) 2014, <NAME> - All rights reserved.
*
* Adapted to Alfons
* Copyright (C) 2015, <NAME>
*
* The following source-code is distributed under the Simplified BSD License.
*/
/*
* References:
*
* "Spline Curves" BY <NAME>
* http://www.cse.unsw.edu.au/~lamb... |
mathisloge/alfons | src/alfons/fontFace.h | /*
* Based on The New Chronotext Toolkit
* Copyright (C) 2014, <NAME> - All rights reserved.
*
* Adapted to Alfons
* Copyright (C) 2015, <NAME>
*
* The following source-code is distributed under the Simplified BSD License.
*/
#pragma once
#include "freetypeHelper.h"
#include "glyph.h"
#include "inputSource.h"... |
mathisloge/alfons | src/alfons/textBatch.h | <filename>src/alfons/textBatch.h
/*
* Based on The New Chronotext Toolkit
* Copyright (C) 2014, <NAME> - All rights reserved.
*
* Adaption to Alfons
* Copyright (C) 2015, <NAME>
*
* The following source-code is distributed under the Simplified BSD License.
*/
#pragma once
#include "lineLayout.h"
#include "qua... |
vaginessa/Notepad2-Bookmark-Edition | scintilla/macosx/ScintillaMacOSX.h | <reponame>vaginessa/Notepad2-Bookmark-Edition
/*
* ScintillaMacOSX.h
* tutorial
*
* Original code by <NAME> on Sun Sep 01 2002.
* Contributors:
* <NAME>, ActiveState
* <NAME>, Adobe
*
*/
#include "TView.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#... |
vaginessa/Notepad2-Bookmark-Edition | scintilla/include/ILexer.h | // Scintilla source code edit control
/** @file ILexer.h
** Interface between Scintilla and lexers.
**/
// Copyright 1998-2010 by <NAME> <<EMAIL>>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef ILEXER_H
#define ILEXER_H
#ifdef SCI_NAMESPACE
namespace Scintilla... |
vaginessa/Notepad2-Bookmark-Edition | src/Notepad2.h | <gh_stars>1-10
/******************************************************************************
*
*
* Notepad2
*
* Notepad2.h
* Global definitions and declarations
*
* See Readme.txt for more information about this source code.
* Please send me your comments to this work.
*
* See License.txt for details about distribu... |
vaginessa/Notepad2-Bookmark-Edition | scintilla/cocoa/ScintillaView.h | <gh_stars>1-10
/**
* Declaration of the native Cocoa View that serves as container for the scintilla parts.
*
* Created by <NAME>.
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#im... |
vaginessa/Notepad2-Bookmark-Edition | scintilla/src/FontQuality.h | // Scintilla source code edit control
/** @file FontQuality.h
** Definitions to control font anti-aliasing.
**/
// Copyright 1998-2009 by <NAME> <<EMAIL>>
// The License.txt file describes the conditions under which this software may be distributed.
#define SC_EFF_QUALITY_MASK 0xF
#define SC_EFF_QUALITY_D... |
AndrewFromMelbourne/raspberry_pi_revision | table.c | //-------------------------------------------------------------------------
//
// The MIT License (MIT)
//
// Copyright (c) 2015 <NAME>
//
// 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 w... |
tonymiceli/tinymfc | statbar.h | <gh_stars>1-10
#ifndef STATBAR_H
#define STATBAR_H
#include "window.h"
#include <windows.h>
#include <commctrl.h>
class CStatusBar : public CWnd
{
public:
CStatusBar();
virtual BOOL Create(HINSTANCE hInstance,
LPCTSTR lpPaneText,
HWND hWndPa... |
tonymiceli/tinymfc | splitter.h | <filename>splitter.h
#ifndef SPLITTER_H
#define SPLITTER_H
#include "window.h"
#include "view.h"
#include "rect.h"
#include <list> // Include STL list
#define SPLITTER_SIZE 5
#define SPLITTER_HORZ 0
#define SPLITTER_VERT 1
using namespace std;
typedef list<CView *> CViewList;
typedef list<int> CSiz... |
tonymiceli/tinymfc | Window.h | <filename>Window.h
#ifndef WINDOW_H
#define WINDOW_H
#include <windows.h>
#include <winuser.h>
#include "rect.h"
#include <assert.h>
#include <dbt.h> // PDEV_BROADCAST_HDR
#define PROP_ID "TinyMFC_id"
#define PROP_THIS "TinyMFC_this"
extern LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam... |
tonymiceli/tinymfc | globals.h | #ifndef GLOBALS_H
#define GLOBALS_H
//class CMainWnd;
#include "mainwnd.h"
#include <shlobj.h>
extern HINSTANCE g_hInstance;
extern CMainWnd *g_pwndMain;
extern LPMALLOC g_Malloc;
extern void TFC_SetMainWindow(CMainWnd *pwndMain);
extern CMainWnd *TFC_GetMainWindow();
extern BOOL TFC_Init();
extern... |
tonymiceli/tinymfc | MainWnd.h | <gh_stars>1-10
#ifndef MAINWND_H
#define MAINWND_H
#include "window.h"
#include "toolbar.h"
#include "statbar.h"
#include "splitter.h"
//#include "dockframe.h"
//#include "button.h"
class CMainWnd : public CWnd
{
CToolBar *m_pToolBar;
CStatusBar *m_pStatusBar;
// CDockFrame *m_pDockFrame;... |
tonymiceli/tinymfc | button.h | #ifndef BUTTON_H
#define BUTTON_H
#include "window.h"
class CButton : public CWnd
{
public:
CButton();
virtual BOOL Create(HINSTANCE hInstance,
LPCTSTR lpCaption,
HWND hWndParent,
int x,
... |
tonymiceli/tinymfc | toolbar.h | #ifndef TOOLBAR_H
#define TOOLBAR_H
#include "window.h"
#include <commctrl.h>
class CToolBar : public CWnd
{
TBBUTTON tbb; // Used for adding toolbar buttons
public:
CToolBar();
virtual BOOL Create(HINSTANCE hInstance,
HWND hWndParent,
... |
tonymiceli/tinymfc | dialog.h | #ifndef DIALOG_H
#define DIALOG_H
#include "window.h"
class CDialog : public CWnd
{
public:
CDialog();
int CreateModal(HINSTANCE hInstance,
LPCTSTR lpszTemplate,
HWND hWndParent);
BOOL DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
/... |
tonymiceli/tinymfc | view.h | #ifndef VIEW_H
#define VIEW_H
#include "window.h"
class CDC;
class CView : public CWnd
{
protected:
CView *m_pwndContainer;
BOOL m_bDocked;
BOOL m_bBackground; // is background window (other windows are docked about this one)
int m_nWidth, m_nHeight; // used when not docked
int m_nS... |
tonymiceli/tinymfc | rect.h | <reponame>tonymiceli/tinymfc
#ifndef RECT_H
#define RECT_H
#include <windows.h>
class CRect : public RECT
{
public:
CRect();
CRect(LONG left, LONG top, LONG right, LONG bottom);
void SetRect(LONG left, LONG top, LONG right, LONG bottom);
LONG GetWidth();
LONG GetHeight();
void... |
tonymiceli/tinymfc | dc.h | <gh_stars>1-10
#ifndef DC_H
#define DC_H
#include <windows.h>
class CDC
{
protected:
HDC m_hDC;
public:
CDC();
CDC(HDC hDC);
HDC GetHDC();
int FillRect(CONST RECT *lprc, HBRUSH hbr);
operator HDC();
};
inline CDC::CDC()
{
m_hDC = NULL;
}
inline CDC::CDC(HDC hDC)
... |
tonymiceli/tinymfc | listview.h | #ifndef LISTVIEW_H
#define LISTVIEW_H
#include "window.h"
#include <commctrl.h>
class CListView : public CWnd
{
protected:
int m_nColumns;
public:
CListView();
virtual BOOL Create(HINSTANCE hInstance,
HWND hWndParent,
int x,
... |
tonymiceli/tinymfc | treeview.h | #ifndef TREEVIEW_H
#define TREEVIEW_H
#include "window.h"
#include <commctrl.h>
class CTreeView : public CWnd
{
public:
CTreeView();
virtual BOOL Create(HINSTANCE hInstance,
HWND hWndParent,
int x,
int y,
... |
tonymiceli/tinymfc | tabctl.h | #ifndef TABCTL_H
#define TABCTL_H
#include "window.h"
#include <commctrl.h>
class CTabCtl : public CWnd
{
protected:
int m_nTabs;
public:
CTabCtl();
virtual BOOL Create(HINSTANCE hInstance,
HWND hWndParent,
int x,
... |
tonymiceli/tinymfc | wndclass.h | #ifndef WNDCLASS_H
#define WNDCLASS_H
#include <windows.h>
class CWndClass
{
WNDCLASSEX wcex;
public:
CWndClass(LPCTSTR lpszClassName, HINSTANCE hInst);
~CWndClass();
void SetStyle(UINT style);
void SetWndProc(WNDPROC lpfnWndProc);
void SetClsExtra(int cbClsExtra);
void SetWndExtra(... |
tonymiceli/tinymfc | dockview.h | #ifndef DOCKVIEW_H
#define DOCKVIEW_H
#include "view.h"
class CDC;
class CDockView : public CView
{
protected:
CRect m_rectDrag,
m_rectClose; // rectangle for close button
int m_nXDrag, m_nYDrag, m_nDragSize, m_nDockSize, m_nDragOrientation;
CView *m_pwndDragView;
LONG ... |
LuaDist-testing/ldecnumber | version.h | #define SVN_REVS "21"
|
luoxiaomiao/LXMNetwork | Example/Pods/Headers/Private/LXMNetwork/LXMNetworkDriver.h | //
// LXMNetworkDriver.h
// LXMNetwork
//
// Created by luoxiaomiao on 2019/5/29.
// Copyright © 2019 omiao. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class LXMRequest;
@protocol AFMultipartFormData;
@protocol LXMNetworkDriverDelegate <NSObject>
- (NSDictionary *)defaul... |
luoxiaomiao/LXMNetwork | Example/Example/CustomRequest.h | <reponame>luoxiaomiao/LXMNetwork<gh_stars>10-100
//
// CustomRequest.h
// Example
//
// Created by luoxiaomiao on 2019/5/30.
// Copyright © 2019 omiao. All rights reserved.
//
#import <LXMNetwork/LXMNetwork.h>
NS_ASSUME_NONNULL_BEGIN
@interface CustomRequest : LXMRequest
@end
NS_ASSUME_NONNULL_END
|
luoxiaomiao/LXMNetwork | Example/Example/Network/LXMInfoHolder.h | <reponame>luoxiaomiao/LXMNetwork<gh_stars>10-100
//
// LXMInfoHolder.h
// Example
//
// Created by luoxiaomiao on 2019/8/6.
// Copyright © 2019 omiao. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface LXMInfoHolder : NSObject
+ (instancetype)shareInstance;
- (void)set... |
luoxiaomiao/LXMNetwork | Classes/LXMNetworkConstant.h | //
// LXMNetworkConstant.h
// LXMNetwork
//
// Created by luoxiaomiao on 2019/5/29.
// Copyright © 2019 omiao. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, LXMNetworkMethod) {
LXMNetworkMethodGET,
LXMNetworkMethodPOST,
LXMNetworkMethodD... |
luoxiaomiao/LXMNetwork | Example/Pods/Headers/Private/LXMNetwork/LXMNetwork.h | <filename>Example/Pods/Headers/Private/LXMNetwork/LXMNetwork.h
//
// LXMNetwork.h
// LXMNetwork
//
// Created by luoxiaomiao on 2019/6/28.
// Copyright © 2019 omiao. All rights reserved.
//
#import <Foundation/Foundation.h>
#if __has_include(<LXMNetwork/LXMNetwork.h>)
#import <LXMNetwork/LXMRequest.h>
#import <L... |
luoxiaomiao/LXMNetwork | Example/Pods/Headers/Private/LXMNetwork/LXMRequest.h | <gh_stars>10-100
//
// LXMRequest.h
// LXMNetwork
//
// Created by luoxiaomiao on 2019/5/29.
// Copyright © 2019 omiao. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "LXMNetworkConstant.h"
NS_ASSUME_NONNULL_BEGIN
@protocol AFMultipartFormData;
typedef void(^LXMNetworkComplete) (BOOL success,... |
luoxiaomiao/LXMNetwork | Example/Example/Model.h | //
// Model.h
// Example
//
// Created by luoxiaomiao on 2019/5/30.
// Copyright © 2019 omiao. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <YYModel.h>
NS_ASSUME_NONNULL_BEGIN
@interface Model : NSObject<YYModel>
@property (nonatomic, copy) NSString *origin;
@property (nonatomic, copy) NSS... |
luoxiaomiao/LXMNetwork | Example/Example/Network/LXMHttpClient.h | <gh_stars>10-100
//
// LXMHttpClient.h
// Example
//
// Created by luoxiaomiao on 2019/8/6.
// Copyright © 2019 omiao. All rights reserved.
//
// AFHTTPSessionManager的子类,主要功能是配置请求参数
// 设置超时、证书、序列化
#import <AFNetworking/AFHTTPSessionManager.h>
NS_ASSUME_NONNULL_BEGIN
@interface LXMHttpClient : AFHTTPSessionMana... |
yevfast/distccps | src/sha.h | #ifndef SHA_H
#define SHA_H
#include <inttypes.h>
#include <stdio.h>
#define SHASUM_SIZE 20
int sha1_calculate(const char *msg, size_t msg_size, uint8_t *out,
size_t out_size);
#endif // SHA_H
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.