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
Consider I have a class i2c_t which is a templated class. Then I'll do: | |
using i2c1_t = i2c_t<I2C_1, 32, i2c_speed::FULL, 5>; | |
i2c1_t i2c1; | |
Then I want to do the following: | |
using mic_volume_t = chips::i2c::mcp4651<i2c1, 1>; | |
mic_volume_t mic_volume; | |
so that I can do | |
mic_volume.set_volume(3); |
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) 2016 Stefan Petersen, Ciellt AB | |
* | |
* 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 without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
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
#!/usr/bin/env python3 | |
# -*- encoding: utf-8 -*- | |
import os | |
import re | |
import shutil | |
import sys | |
re_cvs_line = re.compile(r'^(.*)\$.*\$(.*)$') |
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
curl -O http://se.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-avr/gcc-avr_4.8.1+Atmel3.4.4-2_amd64.deb | |
curl -O http://se.archive.ubuntu.com/ubuntu/pool/universe/b/binutils-avr/binutils-avr_2.24+Atmel3.4.4-1_amd64.deb | |
curl -O http://se.archive.ubuntu.com/ubuntu/pool/universe/a/avr-libc/avr-libc_1.8.0+Atmel3.4.4-1_all.deb | |
sudo dpkg -i binutils-avr_2.24+Atmel3.4.4-1_amd64.deb | |
sudo dpkg -i gcc-avr_4.8.1+Atmel3.4.4-2_amd64.deb | |
sudo dpkg -i avr-libc_1.8.0+Atmel3.4.4-1_all.deb |
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/ports/avr/atomport.c b/ports/avr/atomport.c | |
index 9ae5555..4107a1d 100644 | |
--- a/ports/avr/atomport.c | |
+++ b/ports/avr/atomport.c | |
@@ -277,21 +277,21 @@ void archThreadContextInit (ATOM_TCB *tcb_ptr, void *stack_top, void (*entry_poi | |
*/ | |
void avrInitSystemTickTimer ( void ) | |
{ | |
- /* Set timer 1 compare match value for configured system tick, | |
- * with a prescaler of 256. We will get a compare match 1A |
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) 2015, Stefan Petersen. 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 | |
* notice, this list of conditions and the following disclaimer. | |
* 2. Redistributions in binary form must reproduce the above copyright |