This file contains hidden or 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
#!/usr/bin/env python3 | |
import time | |
import usb | |
import sys | |
from sys import platform as _platform | |
# Estos valores se determinan en el proyecto de PSoC | |
VID = 0x04B4 | |
PID = 0xE177 |
This file contains hidden or 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
#!/usr/bin/env python3 | |
''' | |
Basic script to send USB Vendor Commands to PSoC5LP | |
Based on Cypress AN56377 | |
VID = 0x04B4 | |
PID = 0xE176 |
This file contains hidden or 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> | |
int main() | |
{ | |
const uint8_t arreglo[10] = {0,1,2,3,4,5,6,7,8,9}; | |
uint8_t i; | |
for(i = sizeof(arreglo); i != 0; i--){ | |
printf("Pos: %d, Contenido: %d\r\n", sizeof(arreglo) - i, arreglo[sizeof(arreglo) - i]); |
This file contains hidden or 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
/// c_array.c | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
const uint8_t array_c[10] = | |
{ 0x01, 0x02, 0x03, 0x04, 0x05, | |
0x06, 0x07, 0x08, 0x09, 0x0A }; |
This file contains hidden or 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
/// cpp_array.cpp | |
#include <array> | |
#include <iostream> | |
#include <stdint.h> | |
int main(void) | |
{ | |
const std::array<std::uint8_t, 10> array_cpp = | |
{ 0x01, 0x02, 0x03, 0x04, 0x05, | |
0x06, 0x07, 0x08, 0x09, 0x0A }; |
This file contains hidden or 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
/** | |
* Generic FIFO. | |
* Author: Carlos Diaz (2017) | |
* | |
* DISCLAIMER (2021): This implementation was done when I had a few days of | |
* experience using verilog, I was at school and not really sure what | |
* I was doing. I choose to make it public in case of me needing it | |
* in the future, but that was not the case, it's been a long time | |
* since I tried to learn any HDL. | |
* |
This file contains hidden or 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
// file: gray.pcf | |
set_io clk_out 95 | |
set_io gray_leds[3] 96 | |
set_io gray_leds[2] 97 | |
set_io gray_leds[1] 98 | |
set_io gray_leds[0] 99 | |
set_io clk 21 | |
set_io rst 112 | |
// synthesis with yosys for ice40hx1k device (iceStick) |
This file contains hidden or 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
#define LED1 PN_1 | |
#define LED2 PN_0 | |
#define LED3 PF_4 | |
#define LED4 PF_0 | |
#define SW1 PJ_0 | |
#define SW2 PJ_1 | |
void setup() { | |
pinMode(LED1, OUTPUT); | |
pinMode(SW1, INPUT_PULLUP); |
This file contains hidden or 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 <string.h> | |
enum nrf24_addresses { | |
NRF24_PIPE_O = 0, | |
NRF24_PIPE_1 = 1, | |
NRF24_PIPE_2 = 2, | |
NRF24_PIPE_3 = 3, | |
NRF24_PIPE_4 = 4, |
This file contains hidden or 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
#!/bin/bash | |
qemu-system-aarch64 \ | |
-machine virt \ | |
-cpu cortex-a57 \ | |
-nographic -smp 1 \ | |
-m 2048 \ | |
-kernel ./linux-4.8.11/arch/arm64/boot/Image \ | |
--append "console=ttyAMA0" \ | |
$1 $2 |
OlderNewer