In the following instructions, keep in mind that I'm using an
install prefix of ~/ti
as a placeholder while I attempt to bring on
OpenCL by hand. That, and some other paths will be replaced with
Buildroot-specific install directories later on.
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 <assert.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include "system_config_lptim.h" | |
#include "system_config_power.h" | |
#include "system_config_irq.h" | |
#include "FreeRTOS.h" | |
#include "FreeRTOSConfig.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
#![feature(const_generics)] | |
use num::{PrimInt, Zero}; | |
#[derive(Default)] | |
struct BitAcc<T: Default, const N: u8> { | |
acc: T, | |
n: u8, | |
} |
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
module interlaced_ntsc ( | |
input wire clk, | |
input wire [2:0] pixel_data, // 0 ( black )..5 (bright white) | |
output wire h_sync_out, // single clock tick indicating pixel_y will incrememt on next clock ( for debugging ) | |
output wire v_sync_out, // single clock tick indicating pixel_y will reset to 0 or 1 on next clock, depending on the field ( for debugging ) | |
output wire [9:0] pixel_y, // which line | |
output wire [9:0] pixel_x, | |
output wire pixel_is_visible, | |
output reg [2:0] ntsc_out |
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
trait FromHexDecBin: Sized { | |
type Error; | |
fn from_hex_dec_bin(s: &str) -> Result<Self, Self::Error>; | |
} | |
macro_rules! impl_from_hex_dec_bin { | |
($T:tt, $E:ty) => { | |
impl FromHexDecBin for $T { | |
type Error = $E; | |
fn from_hex_dec_bin(s: &str) -> Result<$T, Self::Error> { |
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
pub unsafe fn reset_handler() { | |
// Lots of stuff | |
for (proc_num, proc_) in PROCESSES.as_ref().iter().enumerate() { | |
match proc_ { | |
Some(p) => { | |
load_process_hook(proc_num as u32, p.package_name, p.flash_non_protected_start() as u32) | |
}, | |
None => (), | |
} | |
} |
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
diff --git a/lib/fosphor/Makefile b/lib/fosphor/Makefile | |
index a8fb3bb..07af0e6 100644 | |
--- a/lib/fosphor/Makefile | |
+++ b/lib/fosphor/Makefile | |
@@ -1,6 +1,6 @@ | |
UNAME=$(shell uname) | |
CC=gcc | |
-CFLAGS=-Wall -Werror -O2 `pkg-config freetype2 glfw3 --cflags` -g | |
+CFLAGS=-Wall -O2 `pkg-config freetype2 glfw3 --cflags` -g | |
LDLIBS=`pkg-config freetype2 glfw3 --libs` -lm |
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
# $(CURRENT_DIR) contains the location of this makefile | |
CURRENT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) |
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
%.compdb_entry: %.c | |
@echo " {" > $@ | |
@echo " \"command\": \"cc $(CFLAGS) $(CPPFLAGS) -c $<\"," >> $@ | |
@echo " \"directory\": \"$(CURDIR)\"," >> $@ | |
@echo " \"file\": \"$<\"" >> $@ | |
@echo " }," >> $@ | |
COMPDB_ENTRIES = $(addsuffix .compdb_entry, $(basename $(SOURCES))) | |
compile_commands.json: $(COMPDB_ENTRIES) |
Common rust source for both rust driver and userland code.
use core::intrinsics::transmute;
#[repr(C)]
#[derive(Debug, Clone, Copy)]
pub enum Partnum {
CC1121,
CC1120,