summaryrefslogtreecommitdiffstats
path: root/crypto/ssd1306.c
diff options
context:
space:
mode:
authorroot <root@no.no.james.local>2015-09-07 23:40:11 +0100
committerroot <root@no.no.james.local>2015-09-07 23:40:11 +0100
commit8f7b23cea60eca5b359897bfc21ed84eb11a7bb5 (patch)
tree49810ddc616fcce444176b2ff181600f82840ae6 /crypto/ssd1306.c
parentb83365010e8338a41988426f879243208714c44f (diff)
downloadbracelet-8f7b23cea60eca5b359897bfc21ed84eb11a7bb5.tar.gz
bracelet-8f7b23cea60eca5b359897bfc21ed84eb11a7bb5.tar.bz2
bracelet-8f7b23cea60eca5b359897bfc21ed84eb11a7bb5.zip
fish
Diffstat (limited to 'crypto/ssd1306.c')
-rw-r--r--crypto/ssd1306.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/crypto/ssd1306.c b/crypto/ssd1306.c
index 95cab2d..7421669 100644
--- a/crypto/ssd1306.c
+++ b/crypto/ssd1306.c
@@ -14,7 +14,7 @@
static void
i2c_delay ()
{
- nrf_delay_us (10000);
+ nrf_delay_us (1);
}
static void
@@ -306,9 +306,27 @@ sd_on (void)
void
sd_doodle (void)
{
- static uint8_t i;
+ static uint8_t d[8];
+ random_vector_generate(d,1);
+ uint32_t a;
- sd_dat (i++);
+
+ a=d[0];
+ a%=63;
+ a*=8;
+ a+=768;
+
+ gt_read(a,d,sizeof(d));
+
+
+ sd_dat (d[0]);
+ sd_dat (d[1]);
+ sd_dat (d[2]);
+ sd_dat (d[3]);
+ sd_dat (d[4]);
+ sd_dat (d[5]);
+ sd_dat (d[6]);
+ sd_dat (d[7]);
}