summaryrefslogtreecommitdiffstats
path: root/crypto/ssd1306.c
diff options
context:
space:
mode:
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]);
}