This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> //uint8_t and friends | |
#define ROWS 3 | |
#define COLS 4 | |
int main(void){ | |
uint8_t m[ROWS][COLS] = {{1,2,3,4}, {5,6,7,8}, {9,10,11,12}}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2012 Andres Vahter. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* | |
* - Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
import struct | |
import time | |
s = serial.Serial('/dev/tty.KeySerial1', 9600, stopbits=serial.STOPBITS_TWO, timeout=1.) | |
class Display(object): | |
def __init__(self, serial, receiver='00'): | |
self.s = serial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> //uint8_t and friends | |
int main(void){ | |
uint8_t settings[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; // preamble, stx and other stuff must be defined here | |
char text[] = "hello world"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <time.h> | |
uint32_t d_shift_register = 0; | |
uint32_t d_taps[32]; | |
uint32_t d_tap_count; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint16_t ax25crc16(unsigned char *data_p, uint16_t length) { | |
uint16_t crc = 0xFFFF; | |
uint32_t data; | |
uint16_t crc16_table[] = { | |
0x0000, 0x1081, 0x2102, 0x3183, | |
0x4204, 0x5285, 0x6306, 0x7387, | |
0x8408, 0x9489, 0xa50a, 0xb58b, | |
0xc60c, 0xd68d, 0xe70e, 0xf78f | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* uartSample_main.c | |
* | |
* This file contains the test / demo code to demonstrate the UART driver | |
* functionality on SYS/BIOS 6 | |
* | |
* Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/ | |
* | |
* | |
* Redistribution and use in source and binary forms, with or without |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EDMA3_DRV_Handle* hi2cEdma; | |
GIO_Handle i2c_outHandle; | |
GIO_Handle i2c_inHandle; | |
I2c_Params i2cParams; | |
//---------------------------------------------------------------- | |
// Setup I2C | |
//---------------------------------------------------------------- | |
void I2C_init(EDMA3_DRV_Handle* hEdma) { | |
I2c_ChanParams chanParams; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "vpiftransfer.h" | |
// this must be defined here otherwise there will be Uint32 etc redefine errors | |
#define _TI_STD_TYPES | |
#include <cslr/soc_C6748.h> | |
#include <cslr/cslr_syscfg0_C6748.h> | |
#include <vpif/include/Fvid.h> | |
#include <vpif/include/Vpif.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef CONFIGURATION_H | |
#define CONFIGURATION_H | |
// This configurtion file contains the basic settings. | |
// Advanced settings can be found in Configuration_adv.h | |
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration | |
//User specified version info of this build to display in [Pronterface, etc] terminal window during startup. | |
//Implementation of an idea by Prof Braino to inform user that any changes made | |
//to this build by the user have been successfully uploaded into firmware. |
OlderNewer