summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2019-07-04 10:40:56 -0600
committerEvan Lojewski <github@meklort.com>2019-07-04 10:40:56 -0600
commit2552314e1f6676839ebad3053c2a18ba5ae422de (patch)
treee9c4515fb5f5e102840ce5b5b8df53c08b891b1d /utils
parentab5482192a85f249ddc2ce61f81621e7bcfba647 (diff)
downloadbcm5719-ortega-2552314e1f6676839ebad3053c2a18ba5ae422de.tar.gz
bcm5719-ortega-2552314e1f6676839ebad3053c2a18ba5ae422de.zip
Update the apeconsole to use the full size, instead of 1/4 the size.
Diffstat (limited to 'utils')
-rw-r--r--utils/apeconsole/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/apeconsole/main.cpp b/utils/apeconsole/main.cpp
index 38569c4..9cfd048 100644
--- a/utils/apeconsole/main.cpp
+++ b/utils/apeconsole/main.cpp
@@ -113,11 +113,13 @@ int main(int argc, char const *argv[])
uint32_t cached_pointer = *read_pointer;
if(cached_pointer != *write_pointer)
{
- char character = (uint8_t)buffer[cached_pointer];
+ uint32_t word_pointer = cached_pointer / 4;
+ uint32_t byte_index = cached_pointer % 4;
+ char character = (uint8_t)(buffer[word_pointer] >> (byte_index * 8));
// printf("Buffer[%d] = %c\n", cached_pointer, character);
putchar(character);
- if(cached_pointer++ >= buffer_size/4)
+ if(cached_pointer++ >= buffer_size)
{
cached_pointer = 0;
}
OpenPOWER on IntegriCloud