From f5b208523521c8099dbc63ea021b7b1e5def3b0c Mon Sep 17 00:00:00 2001
From: Vipin Thomas <vipin.thomas@stud.th-deg.de>
Date: Tue, 22 Jun 2021 14:20:58 +0000
Subject: [PATCH] Update pixel.cpp

---
 pixel.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pixel.cpp b/pixel.cpp
index 8733c45..11fc4ad 100644
--- a/pixel.cpp
+++ b/pixel.cpp
@@ -15,6 +15,7 @@ int addNum=0;
 long long convert(int n);
 int convertBinInt(long long n);
 void decrypt(int data);
+void toAscii(char *c);
 
 
 void pixel(char *key;
@@ -37,7 +38,7 @@ void pixel(char *key;
 	#pragma HLS INTERFACE axis port=dout
 
     pkt_t pkt=din.read();
-
+    toAscii(*key);
     switch(selector)
     {
         case 0:
@@ -131,8 +132,8 @@ int dec = 0, i = 7, b=0,rem=0;
     return dec;
 }
 
-void toAscii(char c) {
-    int n=(int)c;
+void toAscii(char *c) {
+    int n=(int)*c;
     key=(char)n;
 }
 
-- 
GitLab