diff --git a/.github/workflows/clang-format_check.yml b/.github/workflows/clang-format_check.yml
index d19d503..7b2c58e 100644
--- a/.github/workflows/clang-format_check.yml
+++ b/.github/workflows/clang-format_check.yml
@@ -5,7 +5,6 @@ on:
branches: [main, develop]
pull_request:
branches: [main, develop]
-# on: workflow_dispatch
jobs:
formatting-check:
name: Formatting Check
diff --git a/.github/workflows/run_cppcheck.yml b/.github/workflows/run_cppcheck.yml
index 499f5f4..926d65e 100644
--- a/.github/workflows/run_cppcheck.yml
+++ b/.github/workflows/run_cppcheck.yml
@@ -8,13 +8,13 @@ on:
jobs:
cppcheck-annotations_scr:
- name: cppcheck-annotations
+ name: cppcheck-annotations /src
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- - name: Run cppcheck-annotation-action
+ - name: Run cppcheck-annotation-action for src
uses: Konstantin343/cppcheck-annotation-action@v1.0
with:
std: 'c99'
@@ -24,15 +24,13 @@ jobs:
annotation-failures: 'warning'
# suppress: 'unusedFunction'
# annotation-level-default: 'error'
-
- - name: Annotate lines with errors
+ - name: Annotate lines with errors src
uses: yuzutech/annotations-action@v0.4.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
title: 'Results of CppCheck src files'
input: 'annotations.json'
-
- - name: Run cppcheck-annotation-action
+ - name: Run cppcheck-annotation-action for tests
uses: Konstantin343/cppcheck-annotation-action@v1.0
with:
std: 'c99'
@@ -42,10 +40,10 @@ jobs:
annotation-failures: 'warning'
# suppress: 'unusedFunction'
# annotation-level-default: 'error'
-
- - name: Annotate lines with errors
+ - name: Annotate lines with errors test_src
uses: yuzutech/annotations-action@v0.4.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- title: 'Results of CppCheck test src files'
- input: 'annotations.json'
\ No newline at end of file
+ title: 'Results of CppCheck test lcd_hd44780 files'
+ input: 'annotations.json'
+
diff --git a/.gitignore b/.gitignore
index a81b62c..9ef128b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,7 @@ out_avr/
Release/
Debug/
Build/
-.vscode/settings.json
+.vscode/
# HW test ingnored files
.metadata/
.cproject
@@ -13,3 +13,4 @@ Build/
+
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json
deleted file mode 100644
index feb4fa7..0000000
--- a/.vscode/c_cpp_properties.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "configurations": [
- {
- "name": "windows-gcc-x64",
- "includePath": [
- "${workspaceFolder}/**"
- ],
- "defines": [
- "_DEBUG",
- "UNICODE",
- "_UNICODE"
- ],
- "compilerPath": "C:/Qt_6_5/Tools/mingw1120_64/bin/gcc.exe",
- "cStandard": "${default}",
- "cppStandard": "${default}",
- "intelliSenseMode": "windows-gcc-x64"
- },
- {
- "name": "AVR-GCC ATMega328P",
- "includePath": [
- "${workspaceFolder}/**",
- "D:/19_EMBEDED_TOOLS/1_AVR_toolchain/avr/include/**"
- ],
- "defines": [
- "_DEBUG",
- "UNICODE",
- "_UNICODE",
- "__AVR_ATmega3250P__",
- "AVR"
- ],
- "cppStandard": "gnu++17",
- "compilerPath": "D:\\19_EMBEDED_TOOLS\\1_AVR_toolchain\\bin\\avr-gcc.exe",
- "cStandard": "c99"
- },
- {
- "name": "ARM-GCC",
- "includePath": [
- "${workspaceFolder}/**"
- ],
- "defines": [
- "_DEBUG",
- "UNICODE",
- "_UNICODE"
- ],
- "cppStandard": "gnu++17",
- "compilerPath": "C:\\ST\\STM32CubeCLT\\GNU-tools-for-STM32\\bin\\arm-none-eabi-gcc.exe",
- "cStandard": "c99"
- }
- ],
- "version": 4
-}
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index 109429f..0000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "version": "0.2.0",
- "configurations": [
- {
- "name": "C/C++ Runner: Debug Session",
- "type": "cppdbg",
- "request": "launch",
- "args": [],
- "stopAtEntry": false,
- "externalConsole": true,
- "cwd": "d:/0_Projekty/6_Biblioteki/LCD_HD44780/test/lcd_hd44780",
- "program": "d:/0_Projekty/6_Biblioteki/LCD_HD44780/test/lcd_hd44780/build/Debug/outDebug",
- "MIMode": "gdb",
- "miDebuggerPath": "gdb",
- "setupCommands": [
- {
- "description": "Enable pretty-printing for gdb",
- "text": "-enable-pretty-printing",
- "ignoreFailures": true
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
deleted file mode 100644
index ce240ef..0000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,175 +0,0 @@
-{
- // See https://go.microsoft.com/fwlink/?LinkId=733558
- // for the documentation about the tasks.json format
- "version": "2.0.0",
- "tasks": [
- {
- "label": "build lcd_hd44780_test",
- "type": "shell",
- "command": "make",
- "args": [
- "all",
- "-j12",
- "-o lcd_hd44780.o"
-
- ],
- "options": {
- "cwd": "${workspaceFolder}/test/lcd_hd44780/out"
- },
- "group": {
- "kind": "build",
- "isDefault": true
- },
- // "problemMatcher": [],
- // "dependsOn":["run lizard test"],
- },
- {
- "label": "clean lcd_hd44780_test",
- "type": "shell",
- "command": "make clean",
- "args": [],
- "options": {
- "cwd": "${workspaceFolder}/test/lcd_hd44780/out"
- },
- "group": {
- "kind": "build",
- "isDefault": true
- }
- },
- {
- "type": "shell",
- "label": "run lcd_hd44780_test",
- "command": "./lcd_hd44780_test.exe",
- "args": [],
- "options": {
- "cwd": "${workspaceFolder}/test/lcd_hd44780/out"
- },
- "group": "test"
- },
- {
- "type": "shell",
- "label": "UBUNTU run lcd_hd44780_test",
- "command": "./lcd_hd44780_test",
- "args": [],
- "options": {
- "cwd": "${workspaceFolder}/test/lcd_hd44780/out"
- },
- "group": "test"
- },
- {
- "label": "run lizard test",
- "type": "shell",
- "command": "lizard src/ --CCN 12 -Tnloc=30 -a 4 --languages cpp -V -w -i 1",
- "args": [],
- "options": {
- "cwd": "${workspaceFolder}"
- },
- "group": "test",
-
- },
- {
- "label": "run lizard test with report",
- "type": "shell",
- "command": "lizard src/ --CCN 12 -Tnloc=30 -a 4 --languages cpp -V -o reports/Cyclomatic_Complexity/Lizard_report.html",
- "args": [],
- "options": {
- "cwd": "${workspaceFolder}"
- },
- "group": "test",
-
- },
- {
- "label": "run cppcheck for src",
- "type": "shell",
- "command": "cppcheck",
- "args": [
- // ".", // option for whole project
- "src/",
- // "-itest/unity/", //suppress directory test/unity/
- // "-itest/template/", //suppress directory test/template/
- "--enable=all",
- "--inconclusive",
- "--force" ,
- "--inline-suppr",
- // "--output-file=reports/cppcheck.out", // this will print out report instead of printing problems in terminal
- "--platform=win64",
- "--suppress=missingInclude",
- "--suppress=missingIncludeSystem",
- "--suppress=unusedFunction",
- ],
- "options": {
- "cwd": "${workspaceFolder}"
- },
- "group": "test",
- },
- {
- "label": "run cppcheck for test",
- "type": "shell",
- "command": "cppcheck",
- "args": [
- // ".", // option for whole project
- "test/lcd_hd44780",
- "-itest/lcd_hd44780/out",
- "-itest/lcd_hd44780/out_avr",
- // "-itest/template/", //suppress directory test/template/
- "--enable=all",
- "--inconclusive",
- "--force" ,
- "--inline-suppr",
- // "--output-file=reports/cppcheck.out", // this will print out report instead of printing problems in terminal
- "--platform=win64",
- "--suppress=missingInclude",
- "--suppress=missingIncludeSystem",
- // "--suppress=unusedFunction",
- ],
- "options": {
- "cwd": "${workspaceFolder}"
- },
- "group": "test",
- },
- { // to use it replace "template" with specific module and provide whole"directory_to_your_project_folder" for exampel "D_/Projects/Project_a" D:/0_Projekty/6_Biblioteki/LCD_HD44780/
- "label": "UBUNTU lcd_hd44780 code coverage report generation",
- "type": "shell",
- "command": "python3 -m gcovr CMakeFiles/lcd_hd44780_test.dir/home/sandra/Pulpit/test/LCD_HD44780 -r ../../.. --html-details ../../../reports/Code_Coverage/lcd_hd44780_gcov_report.html",
- "args": [],
- "options": {
- "cwd": "${workspaceFolder}/test/lcd_hd44780/out"
- },
- "group": "test",
-
- },
- { // to use it replace "template" with specific module and provide whole"directory_to_your_project_folder" for exampel "D_/Projects/Project_a" D:/0_Projekty/6_Biblioteki/LCD_HD44780/
- "label": "lcd_hd44780 code coverage report generation",
- "type": "shell",
- "command": "python3 -m gcovr CMakeFiles/lcd_hd44780_test.dir/D_/0_Projekty/6_Biblioteki/LCD_HD44780/src -r ../../.. --html-details ../../../reports/Code_Coverage/lcd_hd44780_gcov_report.html",
- "args": [],
- "options": {
- "cwd": "${workspaceFolder}/test/lcd_hd44780/out"
- },
- "group": "test",
-
- }
- { // to use it replace "template" with specific module and provide whole"directory_to_your_project_folder" for exampel "D_/Projects/Project_a" D:/0_Projekty/6_Biblioteki/LCD_HD44780/
- "label": "lcd_hd44780 AVR code coverage report generation",
- "type": "shell",
- "command": "python3 -m gcovr CMakeFiles/lcd_hd44780_test.dir/D_/0_Projekty/6_Biblioteki/LCD_HD44780/src -r ../../.. --html-details ../../../reports/Code_Coverage/lcd_hd44780_AVR_gcov_report.html",
- "args": [],
- "options": {
- "cwd": "${workspaceFolder}/test/lcd_hd44780/out_avr"
- },
- "group": "test",
-
- }
- // { // to use it replace "template" with specific module and provide whole"directory_to_your_project_folder" for exampel "D_/Projects/Project_a"
- // "label": "template module.c code coverage report generation",
- // "type": "shell",
- // "command": "python3 -m gcovr CMakeFiles/template_test.dir/directory_to_your_project_folder -r ../../.. --html-details ../../../reports/Code_Coverage/template_gcov_report.html",
- // "args": [],
- // "options": {
- // "cwd": "${workspaceFolder}/test/template/out"
- // },
- // "group": "test",
-
- // },
- ]
-}
\ No newline at end of file
diff --git a/reports/Code_Coverage/info.txt b/reports/Code_Coverage/info.txt
deleted file mode 100644
index 21cb249..0000000
--- a/reports/Code_Coverage/info.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-This folder will contain output from GCov tool. Look at the template task shown below
-
- // { // to use it replace "template" with specific module and provide whole"directory_to_your_project_folder" for exampel "D_/Projects/Project_a"
- // "label": "template module.c code coverage report generation",
- // "type": "shell",
- // "command": "python -m gcovr CMakeFiles/template_test.dir/directory_to_your_project_folder -r ../../.. --html-details ../../../reports/Code_Coverage/template_gcov_report.html",
- // "args": [],
- // "options": {
- // "cwd": "${workspaceFolder}/test/template/out"
- // },
- // "group": "test",
-
- // },
- Delete this file after generating first report.
\ No newline at end of file
diff --git a/reports/Code_Coverage/lcd_hd44780_gcov_report.functions.html b/reports/Code_Coverage/lcd_hd44780_gcov_report.functions.html
index c087afc..e2c90da 100644
--- a/reports/Code_Coverage/lcd_hd44780_gcov_report.functions.html
+++ b/reports/Code_Coverage/lcd_hd44780_gcov_report.functions.html
@@ -23,7 +23,7 @@
GCC Code Coverage Report
Date: |
- 2023-12-08 00:43:02 |
+ 2024-01-12 11:24:32 |
@@ -38,21 +38,21 @@ GCC Code Coverage Report
Lines: |
- 73 |
- 73 |
- 100.0% |
+ 228 |
+ 230 |
+ 99.1% |
Functions: |
- 12 |
- 12 |
+ 35 |
+ 35 |
100.0% |
Branches: |
- 2 |
- 2 |
- 100.0% |
+ 46 |
+ 47 |
+ 97.9% |
@@ -74,170 +74,492 @@ GCC Code Coverage Report
- lcd_char
+ check_lcd_buf_possition_ptr_overflow
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 438
+ |
+
+ called 837 times
+ |
+
+
+
+ copy_lcd_buf_2_prev_lcd_buf
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 445
+ |
+
+ called 469 times
+ |
+
+
+
+ fill_bin_value_buffer
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 403
+ |
+
+ called 27 times
+ |
+
+
+
+ fill_zeros_buffer
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 423
+ |
+
+ called 27 times
+ |
+
+
+
+ lcd_bin
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 671
+ |
+
+ called 14 times
+ |
+
+
+
+ lcd_blinking_cursor_on
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 763
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_buf_bin
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 881
+ |
+
+ called 13 times
+ |
+
+
+
+ lcd_buf_char
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 780
+ |
+
+ called 63 times
+ |
+
+
+
+ lcd_buf_cls
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 770
+ |
+
+ called 382 times
+ |
+
+
+
+ lcd_buf_hex
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 856
+ |
+
+ called 32 times
+ |
+
+
+
+ lcd_buf_int
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 829
+ |
+
+ called 28 times
+ |
+
+
+
+ lcd_buf_locate
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 787
+ |
+
+ called 87 times
+ |
+
+
+
+ lcd_buf_str
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 792
+ |
+
+ called 160 times
+ |
+
+
+
+ lcd_char
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 587
+ |
+
+ called 348 times
+ |
+
+
+
+ lcd_cls
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 540
+ |
+
+ called 382 times
+ |
+
+
+
+ lcd_cursor_off
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 754
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_cursor_on
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 744
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_def_char
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 558
+ |
+
+ called 63 times
+ |
+
+
+
+ lcd_hex
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 645
+ |
+
+ called 28 times
+ |
+
+
+
+ lcd_home
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 731
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_init
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 495
+ |
+
+ called 375 times
+ |
+
+
+
+ lcd_int
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 617
+ |
+
+ called 28 times
+ |
+
+
+
+ lcd_load_char_bank
+ |
+
+ src\lcd_hd44780.c
+ |
+
+ 568
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_locate
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 238
+ 699
|
- called 2 times
+ called 439 times
|
- lcd_cls
+ lcd_reset_all_SIG
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 195
+ 136
|
- called 16 times
+ called 375 times
|
- lcd_def_char
+ lcd_set_all_SIG
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 210
+ 127
|
- called 18 times
+ called 375 times
|
- lcd_init
+ lcd_str
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 156
+ 598
|
- called 14 times
+ called 77 times
|
- lcd_load_char_bank
+ lcd_update
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 220
+ 802
|
- called 2 times
+ called 94 times
|
- lcd_reset_all_SIG
+ lcd_write_4bit_data
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 78
+ 145
|
- called 14 times
+ called 8118 times
|
- lcd_set_all_SIG
+ lcd_write_byte
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 69
+ 165
|
- called 14 times
+ called 3309 times
|
- lcd_write_4bit_data
+ lcd_write_cmd
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 87
+ 153
|
- called 536 times
+ called 2100 times
|
- lcd_write_byte
+ lcd_write_data
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 107
+ 159
|
- called 240 times
+ called 1209 times
|
- lcd_write_cmd
+ register_LCD_IO_driver
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 95
+ 122
|
- called 94 times
+ called 375 times
|
- lcd_write_data
+ update_lcd_curosr_possition
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 101
+ 455
|
- called 146 times
+ called 7520 times
|
- register_LCD_IO_driver
+ write_lcd_buf_2_lcd
|
- src\lcd_hd44780.c
+ src\lcd_hd44780.c
|
- 64
+ 471
|
- called 14 times
+ called 7520 times
|
diff --git a/reports/Code_Coverage/lcd_hd44780_gcov_report.html b/reports/Code_Coverage/lcd_hd44780_gcov_report.html
index d7dbd0b..ad43667 100644
--- a/reports/Code_Coverage/lcd_hd44780_gcov_report.html
+++ b/reports/Code_Coverage/lcd_hd44780_gcov_report.html
@@ -23,7 +23,7 @@ GCC Code Coverage Report
Date: |
- 2023-12-08 00:43:02 |
+ 2024-01-12 11:24:32 |
Coverage: |
@@ -46,21 +46,21 @@ GCC Code Coverage Report
Lines: |
- 73 |
- 73 |
- 100.0% |
+ 228 |
+ 230 |
+ 99.1% |
Functions: |
- 12 |
- 12 |
+ 35 |
+ 35 |
100.0% |
Branches: |
- 2 |
- 2 |
- 100.0% |
+ 46 |
+ 47 |
+ 97.9% |
@@ -93,14 +93,14 @@ GCC Code Coverage Report
lcd_hd44780.c
- 100.0
+ 99.1
|
- 100.0% |
- 73 / 73 |
+ 99.1% |
+ 228 / 230 |
100.0% |
- 12 / 12 |
- 100.0% |
- 2 / 2 |
+ 35 / 35 |
+ 97.9% |
+ 46 / 47 |
diff --git a/reports/Code_Coverage/lcd_hd44780_gcov_report.lcd_hd44780.c.9b5fec2915da14d10e466e7fb812c453.html b/reports/Code_Coverage/lcd_hd44780_gcov_report.lcd_hd44780.c.9b5fec2915da14d10e466e7fb812c453.html
index 38f7778..fa04692 100644
--- a/reports/Code_Coverage/lcd_hd44780_gcov_report.lcd_hd44780.c.9b5fec2915da14d10e466e7fb812c453.html
+++ b/reports/Code_Coverage/lcd_hd44780_gcov_report.lcd_hd44780.c.9b5fec2915da14d10e466e7fb812c453.html
@@ -27,7 +27,7 @@ GCC Code Coverage Report
Date: |
- 2023-12-08 00:43:02 |
+ 2024-01-12 11:24:32 |
@@ -41,21 +41,21 @@ GCC Code Coverage Report
Lines: |
- 73 |
- 73 |
- 100.0% |
+ 228 |
+ 230 |
+ 99.1% |
Functions: |
- 12 |
- 12 |
+ 35 |
+ 35 |
100.0% |
Branches: |
- 2 |
- 2 |
- 100.0% |
+ 46 |
+ 47 |
+ 97.9% |
@@ -75,134 +75,387 @@ GCC Code Coverage Report
- lcd_char
+ check_lcd_buf_possition_ptr_overflow
+ |
+
+ 438
+ |
+
+ called 837 times
+ |
+
+
+
+ copy_lcd_buf_2_prev_lcd_buf
+ |
+
+ 445
+ |
+
+ called 469 times
+ |
+
+
+
+ fill_bin_value_buffer
+ |
+
+ 403
+ |
+
+ called 27 times
+ |
+
+
+
+ fill_zeros_buffer
+ |
+
+ 423
+ |
+
+ called 27 times
+ |
+
+
+
+ lcd_bin
+ |
+
+ 671
+ |
+
+ called 14 times
+ |
+
+
+
+ lcd_blinking_cursor_on
+ |
+
+ 763
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_buf_bin
+ |
+
+ 881
+ |
+
+ called 13 times
+ |
+
+
+
+ lcd_buf_char
+ |
+
+ 780
+ |
+
+ called 63 times
+ |
+
+
+
+ lcd_buf_cls
+ |
+
+ 770
+ |
+
+ called 382 times
+ |
+
+
+
+ lcd_buf_hex
+ |
+
+ 856
+ |
+
+ called 32 times
+ |
+
+
+
+ lcd_buf_int
+ |
+
+ 829
+ |
+
+ called 28 times
+ |
+
+
+
+ lcd_buf_locate
+ |
+
+ 787
+ |
+
+ called 87 times
+ |
+
+
+
+ lcd_buf_str
+ |
+
+ 792
+ |
+
+ called 160 times
+ |
+
+
+
+ lcd_char
+ |
+
+ 587
+ |
+
+ called 348 times
+ |
+
+
+
+ lcd_cls
+ |
+
+ 540
+ |
+
+ called 382 times
+ |
+
+
+
+ lcd_cursor_off
+ |
+
+ 754
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_cursor_on
+ |
+
+ 744
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_def_char
+ |
+
+ 558
+ |
+
+ called 63 times
+ |
+
+
+
+ lcd_hex
+ |
+
+ 645
+ |
+
+ called 28 times
+ |
+
+
+
+ lcd_home
+ |
+
+ 731
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_init
+ |
+
+ 495
+ |
+
+ called 375 times
+ |
+
+
+
+ lcd_int
+ |
+
+ 617
+ |
+
+ called 28 times
+ |
+
+
+
+ lcd_load_char_bank
+ |
+
+ 568
+ |
+
+ called 7 times
+ |
+
+
+
+ lcd_locate
|
- 238
+ 699
|
- called 2 times
+ called 439 times
|
- lcd_cls
+ lcd_reset_all_SIG
|
- 195
+ 136
|
- called 16 times
+ called 375 times
|
- lcd_def_char
+ lcd_set_all_SIG
|
- 210
+ 127
|
- called 18 times
+ called 375 times
|
- lcd_init
+ lcd_str
|
- 156
+ 598
|
- called 14 times
+ called 77 times
|
- lcd_load_char_bank
+ lcd_update
|
- 220
+ 802
|
- called 2 times
+ called 94 times
|
- lcd_reset_all_SIG
+ lcd_write_4bit_data
|
- 78
+ 145
|
- called 14 times
+ called 8118 times
|
- lcd_set_all_SIG
+ lcd_write_byte
|
- 69
+ 165
|
- called 14 times
+ called 3309 times
|
- lcd_write_4bit_data
+ lcd_write_cmd
|
- 87
+ 153
|
- called 536 times
+ called 2100 times
|
- lcd_write_byte
+ lcd_write_data
|
- 107
+ 159
|
- called 240 times
+ called 1209 times
|
- lcd_write_cmd
+ register_LCD_IO_driver
|
- 95
+ 122
|
- called 94 times
+ called 375 times
|
- lcd_write_data
+ update_lcd_curosr_possition
|
- 101
+ 455
|
- called 146 times
+ called 7520 times
|
- register_LCD_IO_driver
+ write_lcd_buf_2_lcd
|
- 64
+ 471
|
- called 14 times
+ called 7520 times
|
@@ -252,7 +505,7 @@ GCC Code Coverage Report
|
|
- * @Last Modified time: 2023-12-08 00:01:47 |
+ * @Last Modified time: 2024-01-10 18:04:17 |
6 |
@@ -287,84 +540,84 @@ GCC Code Coverage Report
|
|
- |
+ #include <stdio.h> |
11 |
|
|
- #define BUSY_FLAG 1 << 7 |
+ #include <stdlib.h> |
12 |
|
|
- |
+ #include <string.h> |
13 |
|
|
- // LCD driver commands |
+ |
14 |
|
|
- // clang-format off |
+ typedef char lcd_pos_t; |
15 |
|
|
- #define LCDC_CLS 0x01 |
+ // clang-format off |
16 |
|
|
- #define LCDC_HOME 0x02 |
+ #define BUSY_FLAG 1 << 7 |
17 |
|
|
- /********************************/ |
+ #define VAL_PREFIX_LENGHT 2U |
18 |
|
|
- #define LCDC_ENTRY_MODE 0x04 |
+ |
19 |
|
|
- #define LCDC_ENTRYR 0x02 |
+ // LCD driver commands |
20 |
|
|
- #define LCDC_ENTRYL 0x00 |
+ #define LCDC_CLS 0x01 |
21 |
|
|
- #define LCDC_MOVE 0x01 |
+ #define LCDC_HOME 0x02 |
22 |
@@ -378,70 +631,70 @@ GCC Code Coverage Report
|
|
- #define LCDC_ONOFF 0x08 |
+ #define LCDC_ENTRY_MODE 0x04 |
24 |
|
|
- #define LCDC_DISPLAYON 0x04 |
+ #define LCDC_ENTRYR 0x02 |
25 |
|
|
- #define LCDC_CURSORON 0x02 |
+ #define LCDC_ENTRYL 0x00 |
26 |
|
|
- #define LCDC_CURSOROFF 0x00 |
+ #define LCDC_MOVE 0x01 |
27 |
|
|
- #define LCDC_BLINKON 0x01 |
+ /********************************/ |
28 |
|
|
- /********************************/ |
+ #define LCDC_ONOFF 0x08 |
29 |
|
|
- #define LCDC_SHIFT 0x10 |
+ #define LCDC_DISPLAYON 0x04 |
30 |
|
|
- #define LCDC_SHIFTDISP 0x08 |
+ #define LCDC_CURSORON 0x02 |
31 |
|
|
- #define LCDC_SHIFTR 0x04 |
+ #define LCDC_CURSOROFF 0x00 |
32 |
|
|
- #define LCDC_SHIFTL 0x00 |
+ #define LCDC_BLINKON 0x01 |
33 |
@@ -455,203 +708,203 @@ GCC Code Coverage Report
|
|
- #define LCDC_FUNC 0x20 |
+ #define LCDC_SHIFT 0x10 |
35 |
|
|
- #define LCDC_FUNC8B 0x10 |
+ #define LCDC_SHIFTDISP 0x08 |
36 |
|
|
- #define LCDC_FUNC4B 0x00 |
+ #define LCDC_SHIFTR 0x04 |
37 |
|
|
- #define LCDC_FUNC2L 0x08 |
+ #define LCDC_SHIFTL 0x00 |
38 |
|
|
- #define LCDC_FUNC1L 0x00 |
+ /********************************/ |
39 |
|
|
- #define LCDC_FUNC5x10 0x04 |
+ #define LCDC_FUNC 0x20 |
40 |
|
|
- #define LCDC_FUNC5x7 0x00 |
+ #define LCDC_FUNC8B 0x10 |
41 |
|
|
- /********************************/ |
+ #define LCDC_FUNC4B 0x00 |
42 |
|
|
- #define LCDC_SET_CGRAM 0x40 |
+ #define LCDC_FUNC2L 0x08 |
43 |
|
|
- #define LCDC_SET_DDRAM 0x80 |
+ #define LCDC_FUNC1L 0x00 |
44 |
|
|
- // clang-format on |
+ #define LCDC_FUNC5x10 0x04 |
45 |
|
|
- |
+ #define LCDC_FUNC5x7 0x00 |
46 |
|
|
- |
+ /********************************/ |
47 |
|
|
- |
+ #define LCDC_SET_CGRAM 0x40 |
48 |
|
|
- |
+ #define LCDC_SET_DDRAM 0x80 |
49 |
|
|
- static const struct LCD_IO_driver_interface_struct *LCD = NULL; |
+ |
50 |
|
|
- // const struct char_bank_struct *char_bank = &char_bank_1; |
+ #ifndef UNIT_TEST |
51 |
|
|
- |
+ #define PRIVATE static |
52 |
|
|
- static void register_LCD_IO_driver(void); |
+ #else |
53 |
|
|
- static void lcd_set_all_SIG(void); |
+ #define PRIVATE |
54 |
|
|
- static void lcd_reset_all_SIG(void); |
+ #endif |
55 |
|
|
- static void lcd_write_4bit_data(uint8_t data); |
+ |
56 |
|
|
- static void lcd_write_cmd(uint8_t cmd); |
+ #if LCD_BUFFERING == ON |
57 |
|
|
- static void lcd_write_data(uint8_t data); |
+ |
58 |
|
|
- static void lcd_write_byte(uint8_t byte); |
+ #define LAST_CHAR_IN_LCD_LINE (LCD_X-1) |
59 |
|
|
- #if USE_RW_PIN == ON |
+ #define LAST_LCD_LINE (LCD_Y-1) |
60 |
|
|
- static uint8_t lcd_read_byte(void); |
+ |
61 |
|
|
- static uint8_t lcd_read_4bit_data(void); |
+ PRIVATE char lcd_buffer[LCD_Y][LCD_X]; |
62 |
|
|
- #endif |
+ PRIVATE char prev_lcd_buffer[LCD_Y][LCD_X]; |
63 |
@@ -664,92 +917,92 @@ GCC Code Coverage Report
64 |
|
- 14 |
- static void register_LCD_IO_driver(void) |
+ |
+ static lcd_pos_t *lcd_buf_position_ptr; |
65 |
|
|
- { |
+ #endif |
66 |
|
- 14 |
- LCD = LCD_IO_driver_interface_get(); |
+ |
+ |
67 |
|
- 14 |
- } |
+ |
+ static const struct LCD_IO_driver_interface_struct *LCD = NULL; |
68 |
|
|
- |
+ bool LCD_UPDATE_EVENT = false; |
69 |
|
- 14 |
- static void lcd_set_all_SIG(void) |
+ |
+ |
70 |
|
|
- { |
+ static void register_LCD_IO_driver(void); |
71 |
|
- 14 |
- LCD->set_SIG(LCD_E); |
+ |
+ static void lcd_set_all_SIG(void); |
72 |
|
- 14 |
- LCD->set_SIG(LCD_RS); |
+ |
+ static void lcd_reset_all_SIG(void); |
73 |
|
|
- #if USE_RW_PIN == ON |
+ static void lcd_write_4bit_data(uint8_t data); |
74 |
|
|
- LCD->set_SIG(LCD_RW); |
+ static void lcd_write_cmd(uint8_t cmd); |
75 |
|
|
- #endif |
+ static void lcd_write_data(uint8_t data); |
76 |
|
- 14 |
- } |
+ |
+ static void lcd_write_byte(uint8_t byte); |
77 |
@@ -762,932 +1015,932 @@ GCC Code Coverage Report
78 |
|
- 14 |
- static void lcd_reset_all_SIG(void) |
+ |
+ #if USE_RW_PIN == ON |
79 |
|
|
- { |
+ static uint8_t lcd_read_byte(void); |
80 |
|
|
- #if USE_RW_PIN == ON |
+ static uint8_t lcd_read_4bit_data(void); |
81 |
|
|
- LCD->reset_SIG(LCD_RW); |
+ #endif |
82 |
|
|
- #endif |
+ #ifdef AVR |
83 |
|
- 14 |
- LCD->reset_SIG(LCD_RS); |
+ |
+ #if ((USE_LCD_INT == ON) || (USE_LCD_HEX == ON)) |
84 |
|
- 14 |
- LCD->reset_SIG(LCD_E); |
+ |
+ static void lcd_put_spaces(uint8_t empty_spaces); |
85 |
|
- 14 |
- } |
+ |
+ #endif |
86 |
|
|
- |
+ #if USE_LCD_INT == ON |
87 |
|
- 536 |
- void lcd_write_4bit_data(uint8_t data) |
+ |
+ static void lcd_int_AVR(int val, uint8_t width, enum alignment alignment); |
88 |
|
|
- { |
+ #endif |
89 |
|
- 536 |
- LCD->set_SIG(LCD_E); |
+ |
+ #if USE_LCD_HEX == ON |
90 |
|
- 536 |
- data &= 0x0F; |
+ |
+ static void lcd_hex_AVR(int val, uint8_t width, enum alignment alignment); |
91 |
|
- 536 |
- LCD->write_data(data); |
+ |
+ #endif |
92 |
|
- 536 |
- LCD->reset_SIG(LCD_E); |
+ |
+ #if USE_LCD_BIN == ON |
93 |
|
- 536 |
- } |
+ |
+ static void lcd_bin_AVR(int val, uint8_t width); |
94 |
|
|
- |
+ #endif |
95 |
|
- 94 |
- static void lcd_write_cmd(uint8_t cmd) |
+ |
+ #if LCD_BUFFERING == ON |
96 |
|
|
- { |
+ #if ((USE_LCD_BUF_INT == ON) || (USE_LCD_BUF_HEX == ON)) |
97 |
|
- 94 |
- LCD->reset_SIG(LCD_RS); |
+ |
+ static void lcd_buf_put_spaces(uint8_t empty_spaces); |
98 |
|
- 94 |
- lcd_write_byte(cmd); |
+ |
+ #endif |
99 |
|
- 94 |
- } |
+ |
+ #if USE_LCD_BUF_INT == ON |
100 |
|
|
- |
+ static void lcd_buf_int_AVR(int val, uint8_t width, enum alignment alignment); |
101 |
|
- 146 |
- void lcd_write_data(uint8_t data) |
+ |
+ #endif |
102 |
|
|
- { |
+ #if USE_LCD_BUF_HEX == ON |
103 |
|
- 146 |
- LCD->set_SIG(LCD_RS); |
+ |
+ static void lcd_buf_hex_AVR(int val, uint8_t width, enum alignment alignment); |
104 |
|
- 146 |
- lcd_write_byte(data); |
+ |
+ #endif |
105 |
|
- 146 |
- } |
+ |
+ #if USE_LCD_BUF_BIN == ON |
106 |
|
|
- |
+ static void lcd_buf_bin_AVR(int val, uint8_t width); |
107 |
|
- 240 |
- void lcd_write_byte(uint8_t byte) |
+ |
+ #endif |
108 |
|
|
- { |
+ #endif |
109 |
|
|
- #if USE_RW_PIN == ON |
+ #else |
110 |
|
|
- LCD->reset_SIG(LCD_RW); |
+ #if (USE_LCD_BIN == ON || ((LCD_BUFFERING == ON) && (LCD_USE_BUF_BIN == ON))) |
111 |
|
|
- #endif |
+ static void fill_bin_value_buffer(int val, char *bin_val_buffer); |
112 |
|
- 240 |
- lcd_write_4bit_data((byte) >> 4); |
+ |
+ static void fill_zeros_buffer(const char *buffer, uint8_t width, char *zeros_buf); |
113 |
|
- 240 |
- lcd_write_4bit_data((byte)&0x0F); |
+ |
+ #endif |
114 |
|
|
- #if USE_RW_PIN == ON |
+ #endif |
115 |
|
|
- //check_BUSSY_FALG |
+ #if LCD_BUFFERING==ON |
116 |
|
|
- LCD->set_data_pins_as_inputs(); |
+ static void check_lcd_buf_possition_ptr_overflow(void); |
117 |
|
|
- LCD->reset_SIG(LCD_RS); |
+ static void copy_lcd_buf_2_prev_lcd_buf(void); |
118 |
|
|
- LCD->set_SIG(LCD_RW); |
+ static void update_lcd_curosr_possition(uint8_t *lcd_cursor_position,uint8_t *lcd_line, uint8_t *missed_char_counter_in_LCD_line); |
119 |
|
|
- while (lcd_read_byte() & BUSY_FLAG) |
+ static void write_lcd_buf_2_lcd(const uint8_t *lcd_cursor_position,const uint8_t *lcd_line,uint8_t * missed_char_counter_in_LCD_line, const lcd_pos_t *prev_lcd_buff_pos_ptr); |
120 |
|
|
- { |
+ #endif |
121 |
|
|
- } |
+ |
122 |
|
- |
- LCD->reset_SIG(LCD_RW); |
+ 375 |
+ static void register_LCD_IO_driver(void) |
123 |
|
|
- LCD->set_data_pins_as_outputs(); |
+ { |
124 |
|
- |
- |
+ 375 |
+ LCD = LCD_IO_driver_interface_get(); |
125 |
|
- |
- #else |
+ 375 |
+ } |
126 |
|
- 240 |
- LCD->delay_us(120); |
+ |
+ |
127 |
|
- |
- #endif |
+ 375 |
+ static void lcd_set_all_SIG(void) |
128 |
|
- 240 |
- } |
+ |
+ { |
129 |
|
- |
- |
+ 375 |
+ LCD->set_SIG(LCD_E); |
130 |
|
- |
- #if USE_RW_PIN == ON |
+ 375 |
+ LCD->set_SIG(LCD_RS); |
131 |
|
|
- uint8_t lcd_read_byte(void) |
+ #if USE_RW_PIN == ON |
132 |
|
|
- { |
+ LCD->set_SIG(LCD_RW); |
133 |
|
|
- uint8_t data; |
+ #endif |
134 |
|
- |
- //read 4 MSB |
+ 375 |
+ } |
135 |
|
|
- data = (lcd_read_4bit_data() << 4); |
+ |
136 |
|
- |
- //read 4 LSB |
+ 375 |
+ static void lcd_reset_all_SIG(void) |
137 |
|
|
- data |= (lcd_read_4bit_data() & 0x0F); |
+ { |
138 |
|
|
- return data; |
+ #if USE_RW_PIN == ON |
139 |
|
|
- } |
+ LCD->reset_SIG(LCD_RW); |
140 |
|
|
- |
+ #endif |
141 |
|
- |
- uint8_t lcd_read_4bit_data(void) |
+ 375 |
+ LCD->reset_SIG(LCD_RS); |
142 |
|
- |
- { |
+ 375 |
+ LCD->reset_SIG(LCD_E); |
143 |
|
- |
- uint8_t data; |
+ 375 |
+ } |
144 |
|
|
- LCD->set_SIG(LCD_E); |
+ |
145 |
|
- |
- data = LCD->read_data(); |
+ 8118 |
+ void lcd_write_4bit_data(uint8_t data) |
146 |
|
|
- LCD->reset_SIG(LCD_E); |
+ { |
147 |
|
- |
- return data; |
+ 8118 |
+ LCD->set_SIG(LCD_E); |
148 |
|
- |
- } |
+ 8118 |
+ data &= 0x0F; |
149 |
|
- |
- #endif |
+ 8118 |
+ LCD->write_data(data); |
150 |
|
- |
- |
+ 8118 |
+ LCD->reset_SIG(LCD_E); |
151 |
|
- |
- /** |
+ 8118 |
+ } |
152 |
|
|
- * @brief Function that initialize LCD in 4-bit mode with or without LCD R/W Pin handling. |
+ |
153 |
|
- |
- * @attention LCD R/W handling should be configured in lcd_hd44780_config.h by setting USE_RW_PIN to 1 (Enable R/W Pin |
+ 2100 |
+ static void lcd_write_cmd(uint8_t cmd) |
154 |
|
|
- * handling) or 0 (disable R/W Pin handling). |
+ { |
155 |
|
- |
- */ |
+ 2100 |
+ LCD->reset_SIG(LCD_RS); |
156 |
|
- 14 |
- void lcd_init(void) |
+ 2100 |
+ lcd_write_byte(cmd); |
157 |
|
- |
- { |
+ 2100 |
+ } |
158 |
|
- 14 |
- register_LCD_IO_driver(); |
+ |
+ |
159 |
|
- 14 |
- LCD->init_LCD_pins(); |
+ 1209 |
+ void lcd_write_data(uint8_t data) |
160 |
|
|
- /**************************BASIC LCD INIT - basing on DS init procedure***************************************/ |
+ { |
161 |
|
- |
- // set all LCD signals to High for more than 15ms ->bit different then in DS base on other implementation from internet |
+ 1209 |
+ LCD->set_SIG(LCD_RS); |
162 |
|
- 14 |
- lcd_set_all_SIG(); |
+ 1209 |
+ lcd_write_byte(data); |
163 |
|
- 14 |
- LCD->delay_us(15000); |
+ 1209 |
+ } |
164 |
|
- 14 |
- lcd_reset_all_SIG(); |
+ |
+ |
165 |
|
- |
- // send 0x03 & wait more then 4,1ms |
+ 3309 |
+ void lcd_write_byte(uint8_t byte) |
166 |
|
- 14 |
- lcd_write_4bit_data(0x03); |
+ |
+ { |
167 |
|
- 14 |
- LCD->delay_us(4500); |
+ |
+ #if USE_RW_PIN == ON |
168 |
|
|
- // send 0x03 & wait more then 100us |
+ LCD->reset_SIG(LCD_RW); |
169 |
|
- 14 |
- lcd_write_4bit_data(0x03); |
+ |
+ #endif |
170 |
|
- 14 |
- LCD->delay_us(110); |
+ 3309 |
+ lcd_write_4bit_data((byte) >> 4); |
171 |
|
- |
- // send 0x03 & wait more then 100us |
+ 3309 |
+ lcd_write_4bit_data((byte) & 0x0F); |
172 |
|
- 14 |
- lcd_write_4bit_data(0x03); |
+ |
+ #if USE_RW_PIN == ON |
173 |
|
- 14 |
- LCD->delay_us(110); |
+ |
+ // check_BUSSY_FALG |
174 |
|
|
- // send 0x02 & wait more then 100us |
+ LCD->set_data_pins_as_inputs(); |
175 |
|
- 14 |
- lcd_write_4bit_data(0x02); |
+ |
+ LCD->reset_SIG(LCD_RS); |
176 |
|
- 14 |
- LCD->delay_us(110); |
+ |
+ LCD->set_SIG(LCD_RW); |
177 |
|
|
- // FUNCTION SET ->send cmd -> LCD in 4-bit mode, 2 rows, char size 5x7 |
+ while (lcd_read_byte() & BUSY_FLAG) |
178 |
|
- 14 |
- lcd_write_cmd(LCDC_FUNC | LCDC_FUNC4B | LCDC_FUNC2L | LCDC_FUNC5x7); |
+ |
+ { |
179 |
|
|
- // DISPLAY_ON_OFF send cmd -> enable lcd |
+ } |
180 |
|
- 14 |
- lcd_write_cmd(LCDC_ONOFF | LCDC_CURSOROFF | LCDC_DISPLAYON); |
+ |
+ LCD->reset_SIG(LCD_RW); |
181 |
|
|
- // LCD clear screen |
+ LCD->set_data_pins_as_outputs(); |
182 |
|
- 14 |
- lcd_cls(); |
+ |
+ |
183 |
|
|
- // ENTRY MODe SET do not shift LCD shift cursor right after placing a char |
+ #else |
184 |
|
- 14 |
- lcd_write_cmd(LCDC_ENTRY_MODE | LCDC_ENTRYR); |
+ 3309 |
+ LCD->delay_us(120); |
185 |
|
|
- /*********************************END of BASIC LCD INIT***************************************/ |
+ #endif |
186 |
|
- |
- |
+ 3309 |
+ } |
187 |
|
|
- // ToDo define sepcial characters in LCD CGRAM |
+ |
188 |
|
|
- |
+ #if USE_RW_PIN == ON |
189 |
|
- 14 |
- } |
+ |
+ uint8_t lcd_read_byte(void) |
190 |
|
|
- |
+ { |
191 |
|
|
- /** |
+ uint8_t data; |
192 |
|
|
- * @brief Function that clear the LCD screen and set the cursor on the position of first character in first line of LCD |
+ // read 4 MSB |
193 |
|
|
- * screen. |
+ data = (lcd_read_4bit_data() << 4); |
194 |
|
|
- */ |
+ // read 4 LSB |
195 |
|
- 16 |
- void lcd_cls(void) |
+ |
+ data |= (lcd_read_4bit_data() & 0x0F); |
196 |
|
|
- { |
+ return data; |
197 |
|
- 16 |
- lcd_write_cmd (LCDC_CLS); |
+ |
+ } |
198 |
|
- 16 |
- LCD->delay_us(4900); |
+ |
+ |
199 |
|
- 16 |
- } |
+ |
+ uint8_t lcd_read_4bit_data(void) |
200 |
|
|
- |
+ { |
201 |
|
|
- /** |
+ uint8_t data; |
202 |
|
|
- * @brief Function for defining custom user characters in CGRAM of the LCD. |
+ LCD->set_SIG(LCD_E); |
203 |
|
|
- * @param CGRAM_char_index Position/addres of the character in CGRAM of the LCD where defined char should be written. |
+ data = LCD->read_data(); |
204 |
|
|
- * For the predefined example of special characters, taken values are defined in the type enum LCD_CGRAM that is defined |
+ LCD->reset_SIG(LCD_E); |
205 |
|
|
- * in lcd-hd44780.h |
+ return data; |
206 |
|
|
- * @param def_char Pointer to the predefined special character. |
+ } |
207 |
|
|
- * @note CGRAM_char_index - This Parameter can take values from 0 to 7. For the predefined example of special |
+ #endif |
208 |
|
|
- * characters, taken values are defined in the type enum LCD_CGRAM that is defined in lcd-hd44780.h |
+ #ifdef AVR |
209 |
|
|
- */ |
+ #if ((USE_LCD_INT == ON) || (USE_LCD_HEX == ON)) |
210 |
|
- 18 |
- void lcd_def_char(enum LCD_CGRAM CGRAM_char_index, const uint8_t *def_char) |
+ |
+ static void lcd_put_spaces(uint8_t empty_spaces) |
211 |
@@ -1700,231 +1953,5015 @@ GCC Code Coverage Report
212 |
|
- 18 |
- lcd_write_cmd(LCDC_SET_CGRAM | ((DEF_CHAR_ADR_MASK & CGRAM_char_index) * LCD_CGRAM_BYTES_PER_CHAR)); |
+ |
+ for (uint8_t i = 0; i < empty_spaces; i++) |
213 |
-
- 2/2
-
- ✓ Branch 0 taken 144 times.
- ✓ Branch 1 taken 18 times.
-
-
|
- 162 |
- for (uint8_t j = 0; j < LCD_CGRAM_BYTES_PER_CHAR; j++) |
+ |
+ { |
214 |
|
|
- { |
+ lcd_char(' '); |
215 |
|
- 144 |
- lcd_write_data(def_char[j]); |
+ |
+ } |
216 |
|
|
- } |
+ } |
217 |
|
- 18 |
- lcd_write_cmd(LCDC_SET_DDRAM); |
+ |
+ #endif |
218 |
|
- 18 |
- } |
+ |
+ #if USE_LCD_INT == ON |
219 |
|
|
- |
+ static void lcd_int_AVR(int val, uint8_t width, enum alignment alignment) |
220 |
|
- 2 |
- void lcd_load_char_bank(const struct char_bank_struct *char_bank) |
+ |
+ { |
221 |
|
|
- { |
+ uint8_t buf_lenght = 0; |
222 |
|
- 2 |
- lcd_def_char(0,char_bank->char_0); |
+ |
+ char buffer[20]; // 19chars for 64 bit int + end char '\0' |
223 |
|
- 2 |
- lcd_def_char(1,char_bank->char_1); |
+ |
+ buffer[0] = '\0'; |
224 |
|
- 2 |
- lcd_def_char(2,char_bank->char_2); |
+ |
+ itoa(val, buffer, 10); |
225 |
|
- 2 |
- lcd_def_char(3,char_bank->char_3); |
+ |
+ buf_lenght = strlen(buffer); |
226 |
|
- 2 |
- lcd_def_char(4,char_bank->char_4); |
+ |
+ if (buf_lenght >= (width)) |
227 |
|
- 2 |
- lcd_def_char(5,char_bank->char_5); |
+ |
+ { |
228 |
|
- 2 |
- lcd_def_char(6,char_bank->char_6); |
+ |
+ lcd_str(buffer); |
229 |
|
- 2 |
- lcd_def_char(7,char_bank->char_7); |
+ |
+ } |
230 |
|
- 2 |
- } |
+ |
+ else |
231 |
|
|
- |
+ { |
232 |
|
|
- /** |
+ uint8_t empty_spaces_qty = width - buf_lenght; |
233 |
|
|
- * @brief Function for print the char on the LCD screen under current position of the LCD cursor. |
+ if (alignment == right) |
234 |
|
|
- * @param C char (for example '1') or it's ASCI code (0x31). |
+ { |
235 |
|
|
- * @note For user defined char, place CGRAM_char_index (Position/addres of the character in CGRAM of the LCD where |
+ lcd_put_spaces(empty_spaces_qty); |
236 |
|
|
- * defined char was written). |
+ lcd_str(buffer); |
237 |
|
|
- */ |
+ } |
238 |
|
- 2 |
- void lcd_char(char C) |
+ |
+ else |
239 |
|
|
- { |
+ { |
240 |
|
- 2 |
- uint8_t data = (uint8_t)(C); |
+ |
+ lcd_str(buffer); |
241 |
|
- 2 |
- lcd_write_data(data); |
+ |
+ lcd_put_spaces(empty_spaces_qty); |
242 |
|
- 2 |
- } |
+ |
+ } |
243 |
|
|
+ } |
+
+
+ 244 |
+
+ |
+ |
+ } |
+
+
+ 245 |
+
+ |
+ |
+ #endif |
+
+
+ 246 |
+
+ |
+ |
+ #if USE_LCD_HEX == ON |
+
+
+ 247 |
+
+ |
+ |
+ static void lcd_hex_AVR(int val, uint8_t width, enum alignment alignment) |
+
+
+ 248 |
+
+ |
+ |
+ { |
+
+
+ 249 |
+
+ |
+ |
+ char buffer[17]; |
+
+
+ 250 |
+
+ |
+ |
+ buffer[0] = '\0'; |
+
+
+ 251 |
+
+ |
+ |
+ itoa(val, buffer, 16); |
+
+
+ 252 |
+
+ |
+ |
+ static const char *prefix = {"0x"}; |
+
+
+ 253 |
+
+ |
+ |
+ if (width <= (strlen(buffer) + VAL_PREFIX_LENGHT)) |
+
+
+ 254 |
+
+ |
+ |
+ { |
+
+
+ 255 |
+
+ |
+ |
+ lcd_str(prefix); |
+
+
+ 256 |
+
+ |
+ |
+ lcd_str(buffer); |
+
+
+ 257 |
+
+ |
+ |
+ } |
+
+
+ 258 |
+
+ |
+ |
+ else |
+
+
+ 259 |
+
+ |
+ |
+ { |
+
+
+ 260 |
+
+ |
+ |
+ uint8_t empty_spaces_qty = width - (VAL_PREFIX_LENGHT + strlen(buffer)); |
+
+
+ 261 |
+
+ |
+ |
+ |
+
+
+ 262 |
+
+ |
+ |
+ if (alignment == right) |
+
+
+ 263 |
+
+ |
+ |
+ { |
+
+
+ 264 |
+
+ |
+ |
+ lcd_put_spaces(empty_spaces_qty); |
+
+
+ 265 |
+
+ |
+ |
+ lcd_str(prefix); |
+
+
+ 266 |
+
+ |
+ |
+ lcd_str(buffer); |
+
+
+ 267 |
+
+ |
+ |
+ } |
+
+
+ 268 |
+
+ |
+ |
+ else |
+
+
+ 269 |
+
+ |
+ |
+ { |
+
+
+ 270 |
+
+ |
+ |
+ lcd_str(prefix); |
+
+
+ 271 |
+
+ |
+ |
+ lcd_str(buffer); |
+
+
+ 272 |
+
+ |
+ |
+ lcd_put_spaces(empty_spaces_qty); |
+
+
+ 273 |
+
+ |
+ |
+ } |
+
+
+ 274 |
+
+ |
+ |
+ } |
+
+
+ 275 |
+
+ |
+ |
+ } |
+
+
+ 276 |
+
+ |
+ |
+ #endif |
+
+
+ 277 |
+
+ |
+ |
+ #if USE_LCD_BIN == ON |
+
+
+ 278 |
+
+ |
+ |
+ static void lcd_bin_AVR(int val, uint8_t width) |
+
+
+ 279 |
+
+ |
+ |
+ { |
+
+
+ 280 |
+
+ |
+ |
+ char buffer[35]; // 0b 0000 0000 0000 0000 0000 0000 0000 0000 |
+
+
+ 281 |
+
+ |
+ |
+ static const char *prefix = {"0b"}; |
+
+
+ 282 |
+
+ |
+ |
+ buffer[0] = '\0'; |
+
+
+ 283 |
+
+ |
+ |
+ |
+
+
+ 284 |
+
+ |
+ |
+ itoa(val, buffer, 2); |
+
+
+ 285 |
+
+ |
+ |
+ // if (buf_lenght < (width - VAL_PREFIX_LENGHT)) |
+
+
+ 286 |
+
+ |
+ |
+ if (width <= (strlen(buffer) + VAL_PREFIX_LENGHT)) |
+
+
+ 287 |
+
+ |
+ |
+ { |
+
+
+ 288 |
+
+ |
+ |
+ lcd_str(prefix); |
+
+
+ 289 |
+
+ |
+ |
+ lcd_str(buffer); |
+
+
+ 290 |
+
+ |
+ |
+ } |
+
+
+ 291 |
+
+ |
+ |
+ else |
+
+
+ 292 |
+
+ |
+ |
+ { |
+
+
+ 293 |
+
+ |
+ |
+ uint8_t zeros_qty = (width - (VAL_PREFIX_LENGHT + strlen(buffer))); |
+
+
+ 294 |
+
+ |
+ |
+ lcd_str(prefix); |
+
+
+ 295 |
+
+ |
+ |
+ for (uint8_t i = 0; i < zeros_qty; i++) |
+
+
+ 296 |
+
+ |
+ |
+ { |
+
+
+ 297 |
+
+ |
+ |
+ lcd_char('0'); |
+
+
+ 298 |
+
+ |
+ |
+ } |
+
+
+ 299 |
+
+ |
+ |
+ lcd_str(buffer); |
+
+
+ 300 |
+
+ |
+ |
+ } |
+
+
+ 301 |
+
+ |
+ |
+ } |
+
+
+ 302 |
+
+ |
+ |
+ #endif |
+
+
+ 303 |
+
+ |
+ |
+ |
+
+
+ 304 |
+
+ |
+ |
+ #if LCD_BUFFERING== ON |
+
+
+ 305 |
+
+ |
+ |
+ #if ((USE_LCD_BUF_INT == ON) || (USE_LCD_BUF_HEX == ON)) |
+
+
+ 306 |
+
+ |
+ |
+ static void lcd_buf_put_spaces(uint8_t empty_spaces) |
+
+
+ 307 |
+
+ |
+ |
+ { |
+
+
+ 308 |
+
+ |
+ |
+ for (uint8_t i = 0; i < empty_spaces; i++) |
+
+
+ 309 |
+
+ |
+ |
+ { |
+
+
+ 310 |
+
+ |
+ |
+ lcd_buf_char(' '); |
+
+
+ 311 |
+
+ |
+ |
+ } |
+
+
+ 312 |
+
+ |
+ |
+ } |
+
+
+ 313 |
+
+ |
+ |
+ #endif |
+
+
+ 314 |
+
+ |
+ |
+ #if USE_LCD_BUF_INT == ON |
+
+
+ 315 |
+
+ |
+ |
+ static void lcd_buf_int_AVR(int val, uint8_t width, enum alignment alignment) |
+
+
+ 316 |
+
+ |
+ |
+ { |
+
+
+ 317 |
+
+ |
+ |
+ uint8_t buf_lenght = 0; |
+
+
+ 318 |
+
+ |
+ |
+ char buffer[20]; // 19chars for 64 bit int + end char '\0' |
+
+
+ 319 |
+
+ |
+ |
+ buffer[0] = '\0'; |
+
+
+ 320 |
+
+ |
+ |
+ itoa(val, buffer, 10); |
+
+
+ 321 |
+
+ |
+ |
+ buf_lenght = strlen(buffer); |
+
+
+ 322 |
+
+ |
+ |
+ if (buf_lenght >= (width)) |
+
+
+ 323 |
+
+ |
+ |
+ { |
+
+
+ 324 |
+
+ |
+ |
+ lcd_buf_str(buffer); |
+
+
+ 325 |
+
+ |
+ |
+ } |
+
+
+ 326 |
+
+ |
+ |
+ else |
+
+
+ 327 |
+
+ |
+ |
+ { |
+
+
+ 328 |
+
+ |
+ |
+ uint8_t empty_spaces_qty = width - buf_lenght; |
+
+
+ 329 |
+
+ |
+ |
+ if (alignment == right) |
+
+
+ 330 |
+
+ |
+ |
+ { |
+
+
+ 331 |
+
+ |
+ |
+ lcd_buf_put_spaces(empty_spaces_qty); |
+
+
+ 332 |
+
+ |
+ |
+ lcd_buf_str(buffer); |
+
+
+ 333 |
+
+ |
+ |
+ } |
+
+
+ 334 |
+
+ |
+ |
+ else |
+
+
+ 335 |
+
+ |
+ |
+ { |
+
+
+ 336 |
+
+ |
+ |
+ lcd_buf_str(buffer); |
+
+
+ 337 |
+
+ |
+ |
+ lcd_buf_put_spaces(empty_spaces_qty); |
+
+
+ 338 |
+
+ |
+ |
+ } |
+
+
+ 339 |
+
+ |
+ |
+ } |
+
+
+ 340 |
+
+ |
+ |
+ } |
+
+
+ 341 |
+
+ |
+ |
+ #endif |
+
+
+ 342 |
+
+ |
+ |
+ |
+
+
+ 343 |
+
+ |
+ |
+ #if USE_LCD_BUF_HEX == ON |
+
+
+ 344 |
+
+ |
+ |
+ void lcd_buf_hex_AVR(int val, uint8_t width, enum alignment alignment) |
+
+
+ 345 |
+
+ |
+ |
+ { |
+
+
+ 346 |
+
+ |
+ |
+ char buffer[17]; |
+
+
+ 347 |
+
+ |
+ |
+ buffer[0] = '\0'; |
+
+
+ 348 |
+
+ |
+ |
+ itoa(val, buffer, 16); |
+
+
+ 349 |
+
+ |
+ |
+ static const char *prefix = {"0x"}; |
+
+
+ 350 |
+
+ |
+ |
+ if (width <= (strlen(buffer) + VAL_PREFIX_LENGHT)) |
+
+
+ 351 |
+
+ |
+ |
+ { |
+
+
+ 352 |
+
+ |
+ |
+ lcd_buf_str(prefix); |
+
+
+ 353 |
+
+ |
+ |
+ lcd_buf_str(buffer); |
+
+
+ 354 |
+
+ |
+ |
+ } |
+
+
+ 355 |
+
+ |
+ |
+ else |
+
+
+ 356 |
+
+ |
+ |
+ { |
+
+
+ 357 |
+
+ |
+ |
+ uint8_t empty_spaces_qty = width - (VAL_PREFIX_LENGHT + strlen(buffer)); |
+
+
+ 358 |
+
+ |
+ |
+ |
+
+
+ 359 |
+
+ |
+ |
+ if (alignment == right) |
+
+
+ 360 |
+
+ |
+ |
+ { |
+
+
+ 361 |
+
+ |
+ |
+ lcd_buf_put_spaces(empty_spaces_qty); |
+
+
+ 362 |
+
+ |
+ |
+ lcd_buf_str(prefix); |
+
+
+ 363 |
+
+ |
+ |
+ lcd_buf_str(buffer); |
+
+
+ 364 |
+
+ |
+ |
+ } |
+
+
+ 365 |
+
+ |
+ |
+ else |
+
+
+ 366 |
+
+ |
+ |
+ { |
+
+
+ 367 |
+
+ |
+ |
+ lcd_buf_str(prefix); |
+
+
+ 368 |
+
+ |
+ |
+ lcd_buf_str(buffer); |
+
+
+ 369 |
+
+ |
+ |
+ lcd_buf_put_spaces(empty_spaces_qty); |
+
+
+ 370 |
+
+ |
+ |
+ } |
+
+
+ 371 |
+
+ |
+ |
+ } |
+
+
+ 372 |
+
+ |
+ |
+ } |
+
+
+ 373 |
+
+ |
+ |
+ #endif |
+
+
+ 374 |
+
+ |
+ |
+ #if USE_LCD_BUF_BIN == ON |
+
+
+ 375 |
+
+ |
+ |
+ static void lcd_buf_bin_AVR(int val, uint8_t width) |
+
+
+ 376 |
+
+ |
+ |
+ { |
+
+
+ 377 |
+
+ |
+ |
+ char buffer[35]; // 0b 0000 0000 0000 0000 0000 0000 0000 0000 |
+
+
+ 378 |
+
+ |
+ |
+ static const char *prefix = {"0b"}; |
+
+
+ 379 |
+
+ |
+ |
+ buffer[0] = '\0'; |
+
+
+ 380 |
+
+ |
+ |
+ |
+
+
+ 381 |
+
+ |
+ |
+ itoa(val, buffer, 2); |
+
+
+ 382 |
+
+ |
+ |
+ // if (buf_lenght < (width - VAL_PREFIX_LENGHT)) |
+
+
+ 383 |
+
+ |
+ |
+ if (width <= (strlen(buffer) + VAL_PREFIX_LENGHT)) |
+
+
+ 384 |
+
+ |
+ |
+ { |
+
+
+ 385 |
+
+ |
+ |
+ lcd_buf_str(prefix); |
+
+
+ 386 |
+
+ |
+ |
+ lcd_buf_str(buffer); |
+
+
+ 387 |
+
+ |
+ |
+ } |
+
+
+ 388 |
+
+ |
+ |
+ else |
+
+
+ 389 |
+
+ |
+ |
+ { |
+
+
+ 390 |
+
+ |
+ |
+ uint8_t zeros_qty = (width - (VAL_PREFIX_LENGHT + strlen(buffer))); |
+
+
+ 391 |
+
+ |
+ |
+ lcd_buf_str(prefix); |
+
+
+ 392 |
+
+ |
+ |
+ for (uint8_t i = 0; i < zeros_qty; i++) |
+
+
+ 393 |
+
+ |
+ |
+ { |
+
+
+ 394 |
+
+ |
+ |
+ lcd_buf_char('0'); |
+
+
+ 395 |
+
+ |
+ |
+ } |
+
+
+ 396 |
+
+ |
+ |
+ lcd_buf_str(buffer); |
+
+
+ 397 |
+
+ |
+ |
+ } |
+
+
+ 398 |
+
+ |
+ |
+ } |
+
+
+ 399 |
+
+ |
+ |
+ #endif |
+
+
+ 400 |
+
+ |
+ |
+ #endif |
+
+
+ 401 |
+
+ |
+ |
+ #else |
+
+
+ 402 |
+
+ |
+ |
+ #if USE_LCD_BIN == ON |
+
+
+ 403 |
+
+ |
+ 27 |
+ static void fill_bin_value_buffer(int val, char *bin_val_buffer) |
+
+
+ 404 |
+
+ |
+ |
+ { |
+
+
+ 405 |
+
+ |
+ 27 |
+ uint32_t bit_mask = 0x80000000; |
+
+
+ 406 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 864 times.
+ ✓ Branch 1 taken 27 times.
+
+
+ |
+ 891 |
+ while (bit_mask != 0) |
+
+
+ 407 |
+
+ |
+ |
+ { |
+
+
+ 408 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 54 times.
+ ✓ Branch 1 taken 810 times.
+
+
+ |
+ 864 |
+ if ((bit_mask & val) != 0) |
+
+
+ 409 |
+
+ |
+ |
+ { |
+
+
+ 410 |
+
+ |
+ 54 |
+ strcat(bin_val_buffer, "1"); |
+
+
+ 411 |
+
+ |
+ |
+ } |
+
+
+ 412 |
+
+ |
+ |
+ else |
+
+
+ 413 |
+
+ |
+ |
+ { |
+
+
+ 414 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 27 times.
+ ✓ Branch 1 taken 783 times.
+
+
+ |
+ 810 |
+ if (strlen(bin_val_buffer) != 0) |
+
+
+ 415 |
+
+ |
+ |
+ { |
+
+
+ 416 |
+
+ |
+ 27 |
+ strcat(bin_val_buffer, "0"); |
+
+
+ 417 |
+
+ |
+ |
+ } |
+
+
+ 418 |
+
+ |
+ |
+ } |
+
+
+ 419 |
+
+ |
+ 864 |
+ bit_mask = bit_mask >> 1; |
+
+
+ 420 |
+
+ |
+ |
+ } |
+
+
+ 421 |
+
+ |
+ 27 |
+ } |
+
+
+ 422 |
+
+ |
+ |
+ |
+
+
+ 423 |
+
+ |
+ 27 |
+ static void fill_zeros_buffer(const char *buffer, uint8_t width, char *zeros_buf) |
+
+
+ 424 |
+
+ |
+ |
+ { |
+
+
+ 425 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 15 times.
+ ✓ Branch 1 taken 12 times.
+
+
+ |
+ 27 |
+ if (strlen(buffer) < (width + VAL_PREFIX_LENGHT)) |
+
+
+ 426 |
+
+ |
+ |
+ { |
+
+
+ 427 |
+
+ |
+ 15 |
+ uint8_t zeros_qty = width - ((strlen(buffer) + VAL_PREFIX_LENGHT)); |
+
+
+ 428 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 15 times.
+ ✓ Branch 1 taken 15 times.
+
+
+ |
+ 30 |
+ for (uint8_t t = 0; t < zeros_qty; t++) |
+
+
+ 429 |
+
+ |
+ |
+ { |
+
+
+ 430 |
+
+ |
+ 15 |
+ strcat(zeros_buf, "0"); |
+
+
+ 431 |
+
+ |
+ |
+ } |
+
+
+ 432 |
+
+ |
+ |
+ } |
+
+
+ 433 |
+
+ |
+ 27 |
+ } |
+
+
+ 434 |
+
+ |
+ |
+ #endif |
+
+
+ 435 |
+
+ |
+ |
+ #endif |
+
+
+ 436 |
+
+ |
+ |
+ |
+
+
+ 437 |
+
+ |
+ |
+ #if LCD_BUFFERING==ON |
+
+
+ 438 |
+
+ |
+ 837 |
+ static void check_lcd_buf_possition_ptr_overflow(void) |
+
+
+ 439 |
+
+ |
+ |
+ { |
+
+
+ 440 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 21 times.
+ ✓ Branch 1 taken 816 times.
+
+
+ |
+ 837 |
+ if(++lcd_buf_position_ptr>&lcd_buffer[LAST_LCD_LINE][LAST_CHAR_IN_LCD_LINE]) |
+
+
+ 441 |
+
+ |
+ |
+ { |
+
+
+ 442 |
+
+ |
+ 21 |
+ lcd_buf_position_ptr=&lcd_buffer[LINE_1][C1]; |
+
+
+ 443 |
+
+ |
+ |
+ } |
+
+
+ 444 |
+
+ |
+ 837 |
+ } |
+
+
+ 445 |
+
+ |
+ 469 |
+ static void copy_lcd_buf_2_prev_lcd_buf(void) |
+
+
+ 446 |
+
+ |
+ |
+ { |
+
+
+ 447 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 1876 times.
+ ✓ Branch 1 taken 469 times.
+
+
+ |
+ 2345 |
+ for(uint8_t y=0;y<LCD_Y;y++) |
+
+
+ 448 |
+
+ |
+ |
+ { |
+
+
+ 449 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 37520 times.
+ ✓ Branch 1 taken 1876 times.
+
+
+ |
+ 39396 |
+ for(uint8_t x=0;x<LCD_X;x++) |
+
+
+ 450 |
+
+ |
+ |
+ { |
+
+
+ 451 |
+
+ |
+ 37520 |
+ prev_lcd_buffer[y][x]=lcd_buffer[y][x]; |
+
+
+ 452 |
+
+ |
+ |
+ } |
+
+
+ 453 |
+
+ |
+ |
+ } |
+
+
+ 454 |
+
+ |
+ 469 |
+ } |
+
+
+ 455 |
+
+ |
+ 7520 |
+ static void update_lcd_curosr_possition(uint8_t *lcd_cursor_position,uint8_t *lcd_line, uint8_t *missed_char_counter_in_LCD_line) |
+
+
+ 456 |
+
+ |
+ |
+ { |
+
+
+ 457 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 376 times.
+ ✓ Branch 1 taken 7144 times.
+
+
+ |
+ 7520 |
+ if((++(*lcd_cursor_position))>=LCD_X) |
+
+
+ 458 |
+
+ |
+ |
+ { |
+
+
+ 459 |
+
+ |
+ 376 |
+ *lcd_cursor_position=0; |
+
+
+ 460 |
+
+ |
+ 376 |
+ (*lcd_line)++; |
+
+
+ 461 |
+
+ |
+ 376 |
+ *missed_char_counter_in_LCD_line=0; |
+
+
+ 462 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 94 times.
+ ✓ Branch 1 taken 282 times.
+
+
+ |
+ 376 |
+ if(*lcd_line==LCD_Y) |
+
+
+ 463 |
+
+ |
+ |
+ { |
+
+
+ 464 |
+
+ |
+ 94 |
+ *lcd_line=LINE_1; |
+
+
+ 465 |
+
+ |
+ |
+ } |
+
+
+ 466 |
+
+ |
+ 376 |
+ lcd_locate(*lcd_line,*lcd_cursor_position); |
+
+
+ 467 |
+
+ |
+ |
+ |
+
+
+ 468 |
+
+ |
+ |
+ } |
+
+
+ 469 |
+
+ |
+ 7520 |
+ } |
+
+
+ 470 |
+
+ |
+ |
+ |
+
+
+ 471 |
+
+ |
+ 7520 |
+ void write_lcd_buf_2_lcd(const uint8_t * lcd_cursor_position, const uint8_t *lcd_line, uint8_t * missed_char_counter_in_LCD_line, const lcd_pos_t *prev_lcd_buff_pos_ptr) |
+
+
+ 472 |
+
+ |
+ |
+ { |
+
+
+ 473 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 341 times.
+ ✓ Branch 1 taken 7179 times.
+
+
+ |
+ 7520 |
+ if(*lcd_buf_position_ptr!=*prev_lcd_buff_pos_ptr) |
+
+
+ 474 |
+
+ |
+ |
+ { |
+
+
+ 475 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 28 times.
+ ✓ Branch 1 taken 313 times.
+
+
+ |
+ 341 |
+ if (*missed_char_counter_in_LCD_line!=0) |
+
+
+ 476 |
+
+ |
+ |
+ { |
+
+
+ 477 |
+
+ |
+ 28 |
+ lcd_locate(*lcd_line,*lcd_cursor_position); |
+
+
+ 478 |
+
+ |
+ 28 |
+ *missed_char_counter_in_LCD_line=0; |
+
+
+ 479 |
+
+ |
+ |
+ } |
+
+
+ 480 |
+
+ |
+ 341 |
+ lcd_char(*lcd_buf_position_ptr); |
+
+
+ 481 |
+
+ |
+ |
+ } |
+
+
+ 482 |
+
+ |
+ |
+ else |
+
+
+ 483 |
+
+ |
+ |
+ { |
+
+
+ 484 |
+
+ |
+ 7179 |
+ (*missed_char_counter_in_LCD_line)++; |
+
+
+ 485 |
+
+ |
+ |
+ } |
+
+
+ 486 |
+
+ |
+ 7520 |
+ } |
+
+
+ 487 |
+
+ |
+ |
+ |
+
+
+ 488 |
+
+ |
+ |
+ #endif |
+
+
+ 489 |
+
+ |
+ |
+ |
+
+
+ 490 |
+
+ |
+ |
+ /** |
+
+
+ 491 |
+
+ |
+ |
+ * @brief Function that initialize LCD in 4-bit mode with or without LCD R/W Pin handling. |
+
+
+ 492 |
+
+ |
+ |
+ * @attention LCD R/W handling should be configured in lcd_hd44780_config.h by setting USE_RW_PIN to 1 (Enable R/W Pin |
+
+
+ 493 |
+
+ |
+ |
+ * handling) or 0 (disable R/W Pin handling). |
+
+
+ 494 |
+
+ |
+ |
+ */ |
+
+
+ 495 |
+
+ |
+ 375 |
+ void lcd_init(void) |
+
+
+ 496 |
+
+ |
+ |
+ { |
+
+
+ 497 |
+
+ |
+ 375 |
+ register_LCD_IO_driver(); |
+
+
+ 498 |
+
+ |
+ 375 |
+ LCD->init_LCD_pins(); |
+
+
+ 499 |
+
+ |
+ |
+ /**************************BASIC LCD INIT - basing on DS init procedure***************************************/ |
+
+
+ 500 |
+
+ |
+ |
+ // set all LCD signals to High for more than 15ms ->bit different then in DS base on other implementation from internet |
+
+
+ 501 |
+
+ |
+ 375 |
+ lcd_set_all_SIG(); |
+
+
+ 502 |
+
+ |
+ 375 |
+ LCD->delay_us(15000); |
+
+
+ 503 |
+
+ |
+ 375 |
+ lcd_reset_all_SIG(); |
+
+
+ 504 |
+
+ |
+ |
+ // send 0x03 & wait more then 4,1ms |
+
+
+ 505 |
+
+ |
+ 375 |
+ lcd_write_4bit_data(0x03); |
+
+
+ 506 |
+
+ |
+ 375 |
+ LCD->delay_us(4500); |
+
+
+ 507 |
+
+ |
+ |
+ // send 0x03 & wait more then 100us |
+
+
+ 508 |
+
+ |
+ 375 |
+ lcd_write_4bit_data(0x03); |
+
+
+ 509 |
+
+ |
+ 375 |
+ LCD->delay_us(110); |
+
+
+ 510 |
+
+ |
+ |
+ // send 0x03 & wait more then 100us |
+
+
+ 511 |
+
+ |
+ 375 |
+ lcd_write_4bit_data(0x03); |
+
+
+ 512 |
+
+ |
+ 375 |
+ LCD->delay_us(110); |
+
+
+ 513 |
+
+ |
+ |
+ // send 0x02 & wait more then 100us |
+
+
+ 514 |
+
+ |
+ 375 |
+ lcd_write_4bit_data(0x02); |
+
+
+ 515 |
+
+ |
+ 375 |
+ LCD->delay_us(110); |
+
+
+ 516 |
+
+ |
+ |
+ // FUNCTION SET ->send cmd -> LCD in 4-bit mode, 2 rows, char size 5x7 |
+
+
+ 517 |
+
+ |
+ 375 |
+ lcd_write_cmd(LCDC_FUNC | LCDC_FUNC4B | LCDC_FUNC2L | LCDC_FUNC5x7); |
+
+
+ 518 |
+
+ |
+ |
+ // DISPLAY_ON_OFF send cmd -> enable lcd |
+
+
+ 519 |
+
+ |
+ 375 |
+ lcd_write_cmd(LCDC_ONOFF | LCDC_CURSOROFF | LCDC_DISPLAYON); |
+
+
+ 520 |
+
+ |
+ |
+ // LCD clear screen |
+
+
+ 521 |
+
+ |
+ 375 |
+ lcd_cls(); |
+
+
+ 522 |
+
+ |
+ |
+ // ENTRY MODe SET do not shift LCD shift cursor right after placing a char |
+
+
+ 523 |
+
+ |
+ 375 |
+ lcd_write_cmd(LCDC_ENTRY_MODE | LCDC_ENTRYR); |
+
+
+ 524 |
+
+ |
+ |
+ /*********************************END of BASIC LCD INIT***************************************/ |
+
+
+ 525 |
+
+ |
+ |
+ #if LCD_BUFFERING == ON |
+
+
+ 526 |
+
+ |
+ |
+ //clear lcd_buffer by putting spaces inside of the buffer |
+
+
+ 527 |
+
+ |
+ 375 |
+ lcd_buf_cls(); |
+
+
+ 528 |
+
+ |
+ |
+ //copy lcd_buffer with spaces to prev_lcd_buffer |
+
+
+ 529 |
+
+ |
+ 375 |
+ copy_lcd_buf_2_prev_lcd_buf(); |
+
+
+ 530 |
+
+ |
+ |
+ // clear flag due to init procedure that reset lcd screan and buffers |
+
+
+ 531 |
+
+ |
+ 375 |
+ LCD_UPDATE_EVENT=false; |
+
+
+ 532 |
+
+ |
+ |
+ #endif |
+
+
+ 533 |
+
+ |
+ |
+ |
+
+
+ 534 |
+
+ |
+ 375 |
+ } |
+
+
+ 535 |
+
+ |
+ |
+ |
+
+
+ 536 |
+
+ |
+ |
+ /** |
+
+
+ 537 |
+
+ |
+ |
+ * @brief Function that clear the LCD screen and set the cursor on the position of first character in first line of LCD |
+
+
+ 538 |
+
+ |
+ |
+ * screen. |
+
+
+ 539 |
+
+ |
+ |
+ */ |
+
+
+ 540 |
+
+ |
+ 382 |
+ void lcd_cls(void) |
+
+
+ 541 |
+
+ |
+ |
+ { |
+
+
+ 542 |
+
+ |
+ 382 |
+ lcd_write_cmd(LCDC_CLS); |
+
+
+ 543 |
+
+ |
+ |
+ #if USE_RW_PIN == OFF |
+
+
+ 544 |
+
+ |
+ 382 |
+ LCD->delay_us(4900); |
+
+
+ 545 |
+
+ |
+ |
+ #endif |
+
+
+ 546 |
+
+ |
+ 382 |
+ } |
+
+
+ 547 |
+
+ |
+ |
+ |
+
+
+ 548 |
+
+ |
+ |
+ #if USE_DEF_CHAR_FUNCTION == ON |
+
+
+ 549 |
+
+ |
+ |
+ /** |
+
+
+ 550 |
+
+ |
+ |
+ * @brief Function for defining custom user characters in CGRAM of the LCD. |
+
+
+ 551 |
+
+ |
+ |
+ * @param CGRAM_char_index Position/addres of the character in CGRAM of the LCD where defined char should be written. |
+
+
+ 552 |
+
+ |
+ |
+ * For the predefined example of special characters, taken values are defined in the type enum LCD_CGRAM that is defined |
+
+
+ 553 |
+
+ |
+ |
+ * in lcd-hd44780.h |
+
+
+ 554 |
+
+ |
+ |
+ * @param def_char Pointer to the predefined special character. |
+
+
+ 555 |
+
+ |
+ |
+ * @note CGRAM_char_index - This Parameter can take values from 0 to 7. For the predefined example of special |
+
+
+ 556 |
+
+ |
+ |
+ * characters, taken values are defined in the type enum LCD_CGRAM that is defined in lcd-hd44780.h |
+
+
+ 557 |
+
+ |
+ |
+ */ |
+
+
+ 558 |
+
+ |
+ 63 |
+ void lcd_def_char(const uint8_t CGRAM_bank_x_char_adr, const uint8_t *def_char) |
+
+
+ 559 |
+
+ |
+ |
+ { |
+
+
+ 560 |
+
+ |
+ 63 |
+ lcd_write_cmd(LCDC_SET_CGRAM | ((DEF_CHAR_ADR_MASK & CGRAM_bank_x_char_adr) * LCD_CGRAM_BYTES_PER_CHAR)); |
+
+
+ 561 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 504 times.
+ ✓ Branch 1 taken 63 times.
+
+
+ |
+ 567 |
+ for (uint8_t j = 0; j < LCD_CGRAM_BYTES_PER_CHAR; j++) |
+
+
+ 562 |
+
+ |
+ |
+ { |
+
+
+ 563 |
+
+ |
+ 504 |
+ lcd_write_data(def_char[j]); |
+
+
+ 564 |
+
+ |
+ |
+ } |
+
+
+ 565 |
+
+ |
+ 63 |
+ lcd_write_cmd(LCDC_SET_DDRAM); |
+
+
+ 566 |
+
+ |
+ 63 |
+ } |
+
+
+ 567 |
+
+ |
+ |
+ |
+
+
+ 568 |
+
+ |
+ 7 |
+ void lcd_load_char_bank(const struct char_bank_struct *char_bank) |
+
+
+ 569 |
+
+ |
+ |
+ { |
+
+
+ 570 |
+
+ |
+ 7 |
+ lcd_def_char(0, char_bank->char_0); |
+
+
+ 571 |
+
+ |
+ 7 |
+ lcd_def_char(1, char_bank->char_1); |
+
+
+ 572 |
+
+ |
+ 7 |
+ lcd_def_char(2, char_bank->char_2); |
+
+
+ 573 |
+
+ |
+ 7 |
+ lcd_def_char(3, char_bank->char_3); |
+
+
+ 574 |
+
+ |
+ 7 |
+ lcd_def_char(4, char_bank->char_4); |
+
+
+ 575 |
+
+ |
+ 7 |
+ lcd_def_char(5, char_bank->char_5); |
+
+
+ 576 |
+
+ |
+ 7 |
+ lcd_def_char(6, char_bank->char_6); |
+
+
+ 577 |
+
+ |
+ 7 |
+ lcd_def_char(7, char_bank->char_7); |
+
+
+ 578 |
+
+ |
+ 7 |
+ } |
+
+
+ 579 |
+
+ |
+ |
+ #endif |
+
+
+ 580 |
+
+ |
+ |
+ |
+
+
+ 581 |
+
+ |
+ |
+ /** |
+
+
+ 582 |
+
+ |
+ |
+ * @brief Function for print the char on the LCD screen under current position of the LCD cursor. |
+
+
+ 583 |
+
+ |
+ |
+ * @param C char (for example '1') or it's ASCI code (0x31). |
+
+
+ 584 |
+
+ |
+ |
+ * @note For user defined char, place CGRAM_char_index (Position/addres of the character in CGRAM of the LCD where |
+
+
+ 585 |
+
+ |
+ |
+ * defined char was written). |
+
+
+ 586 |
+
+ |
+ |
+ */ |
+
+
+ 587 |
+
+ |
+ 348 |
+ void lcd_char(const char C) |
+
+
+ 588 |
+
+ |
+ |
+ { |
+
+
+ 589 |
+
+ |
+ 348 |
+ uint8_t data = (uint8_t)(C); |
+
+
+ 590 |
+
+ |
+ 348 |
+ lcd_write_data(data); |
+
+
+ 591 |
+
+ |
+ 348 |
+ } |
+
+
+ 592 |
+
+ |
+ |
+ |
+
+
+ 593 |
+
+ |
+ |
+ /** |
+
+
+ 594 |
+
+ |
+ |
+ * @brief Function for printing/writing string on LCD screen. Writing the string on LCD screen start from current LCD |
+
+
+ 595 |
+
+ |
+ |
+ * cursor position. |
+
+
+ 596 |
+
+ |
+ |
+ * @param str string that should be printed/written on the LCD screen |
+
+
+ 597 |
+
+ |
+ |
+ */ |
+
+
+ 598 |
+
+ |
+ 77 |
+ void lcd_str(const char *str) |
+
+
+ 599 |
+
+ |
+ |
+ { |
+
+
+ 600 |
+
+ |
+ |
+ register char znak; |
+
+
+ 601 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 357 times.
+ ✓ Branch 1 taken 77 times.
+
+
+ |
+ 434 |
+ while ((znak = *(str++))) |
+
+
+ 602 |
+
+ |
+ |
+ { |
+
+
+ 603 |
+
+ |
+ 357 |
+ lcd_write_data((uint8_t)(znak)); |
+
+
+ 604 |
+
+ |
+ |
+ } |
+
+
+ 605 |
+
+ |
+ 77 |
+ } |
+
+
+ 606 |
+
+ |
+ |
+ |
+
+
+ 607 |
+
+ |
+ |
+ #if USE_LCD_INT == ON |
+
+
+ 608 |
+
+ |
+ |
+ /** |
+
+
+ 609 |
+
+ |
+ |
+ * @brief Function for print the integer value on the LCD screen under current position of the LCD cursor. |
+
+
+ 610 |
+
+ |
+ |
+ * @param val int type value to print on LCD screen |
+
+
+ 611 |
+
+ |
+ |
+ * @param width Minimum number of characters to be printed. If the value to be printed is shorter than this number, the |
+
+
+ 612 |
+
+ |
+ |
+ * result is padded with blank spaces. The value is not truncated even if the result is larger. |
+
+
+ 613 |
+
+ |
+ |
+ * @param alignment If the value to be printed is shorter than width, this parmaeter will specify aligment of the |
+
+
+ 614 |
+
+ |
+ |
+ * printed tekst value. This parameter can be set to "left" or "right" |
+
+
+ 615 |
+
+ |
+ |
+ * @attention to compile for AVR ucontrollers definition of flag AVR is required. |
+
+
+ 616 |
+
+ |
+ |
+ */ |
+
+
+ 617 |
+
+ |
+ 28 |
+ void lcd_int(int val, uint8_t width, enum alignment alignment) |
+
+
+ 618 |
+
+ |
+ |
+ { |
+
+
+ 619 |
+
+ |
+ |
+ #ifdef AVR |
+
+
+ 620 |
+
+ |
+ |
+ lcd_int_AVR(val, width, alignment); |
+
+
+ 621 |
+
+ |
+ |
+ #else |
+
+
+ 622 |
+
+ |
+ |
+ char buffer[20]; // 19chars for 64 bit int + end char '\0' |
+
+
+ 623 |
+
+ |
+ 28 |
+ buffer[0] = '\0'; |
+
+
+ 624 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 21 times.
+ ✓ Branch 1 taken 7 times.
+
+
+ |
+ 28 |
+ if (alignment == right) |
+
+
+ 625 |
+
+ |
+ 21 |
+ sprintf(buffer, "%*i", width, val); |
+
+
+ 626 |
+
+ |
+ |
+ else |
+
+
+ 627 |
+
+ |
+ 7 |
+ sprintf(buffer, "%-*i", width, val); |
+
+
+ 628 |
+
+ |
+ 28 |
+ lcd_str(buffer); |
+
+
+ 629 |
+
+ |
+ |
+ #endif |
+
+
+ 630 |
+
+ |
+ 28 |
+ } |
+
+
+ 631 |
+
+ |
+ |
+ #endif |
+
+
+ 632 |
+
+ |
+ |
+ |
+
+
+ 633 |
+
+ |
+ |
+ #if USE_LCD_HEX == ON |
+
+
+ 634 |
+
+ |
+ |
+ /** |
+
+
+ 635 |
+
+ |
+ |
+ * @brief Function for print the integer value in hexadecimal format on the LCD screen under current position of the LCD |
+
+
+ 636 |
+
+ |
+ |
+ * cursor. |
+
+
+ 637 |
+
+ |
+ |
+ * @param val int type value to print on LCD screen in hexadecimal format |
+
+
+ 638 |
+
+ |
+ |
+ * @param width Minimum number of characters to be printed. If the value to be printed is shorter than this number, the |
+
+
+ 639 |
+
+ |
+ |
+ * result is padded with blank spaces. The value is not truncated even if the result is larger. Width should contain |
+
+
+ 640 |
+
+ |
+ |
+ * additional 2 characters for '0x' at the begining of the printed value. |
+
+
+ 641 |
+
+ |
+ |
+ * @param alignment If the value to be printed is shorter than width, this parmaeter will specify aligment of the |
+
+
+ 642 |
+
+ |
+ |
+ * printed tekst value. This parameter can be set to "left" or "right" |
+
+
+ 643 |
+
+ |
+ |
+ * @attention to compile for AVR ucontrollers definition of flag AVR is required. |
+
+
+ 644 |
+
+ |
+ |
+ */ |
+
+
+ 645 |
+
+ |
+ 28 |
+ void lcd_hex(int val, uint8_t width, enum alignment alignment) |
+
+
+ 646 |
+
+ |
+ |
+ { |
+
+
+ 647 |
+
+ |
+ |
+ #ifdef AVR |
+
+
+ 648 |
+
+ |
+ |
+ lcd_hex_AVR(val, width, alignment); |
+
+
+ 649 |
+
+ |
+ |
+ #else |
+
+
+ 650 |
+
+ |
+ |
+ char buffer[17]; |
+
+
+ 651 |
+
+ |
+ 28 |
+ buffer[0] = '\0'; |
+
+
+ 652 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 21 times.
+ ✓ Branch 1 taken 7 times.
+
+
+ |
+ 28 |
+ if (alignment == right) |
+
+
+ 653 |
+
+ |
+ 21 |
+ sprintf(buffer, "%#*x", width, val); |
+
+
+ 654 |
+
+ |
+ |
+ else |
+
+
+ 655 |
+
+ |
+ 7 |
+ sprintf(buffer, "%-#*x", width, val); |
+
+
+ 656 |
+
+ |
+ 28 |
+ lcd_str(buffer); |
+
+
+ 657 |
+
+ |
+ |
+ #endif |
+
+
+ 658 |
+
+ |
+ 28 |
+ } |
+
+
+ 659 |
+
+ |
+ |
+ #endif |
+
+
+ 660 |
+
+ |
+ |
+ |
+
+
+ 661 |
+
+ |
+ |
+ #if USE_LCD_BIN == ON |
+
+
+ 662 |
+
+ |
+ |
+ /** |
+
+
+ 663 |
+
+ |
+ |
+ * @brief Function for print the integer value in hexadecimal format on the LCD screen under current position of the LCD |
+
+
+ 664 |
+
+ |
+ |
+ * cursor. |
+
+
+ 665 |
+
+ |
+ |
+ * @param val int type value to print on LCD screen in hexadecimal format |
+
+
+ 666 |
+
+ |
+ |
+ * @param width Minimum number of characters to be printed. If the value to be printed is shorter than this number, the |
+
+
+ 667 |
+
+ |
+ |
+ * result is padded with blank spaces. The value is not truncated even if the result is larger. Width should contain |
+
+
+ 668 |
+
+ |
+ |
+ * additional 2 characters for '0x' at the begining of the printed value. |
+
+
+ 669 |
+
+ |
+ |
+ * @attention to compile for AVR ucontrollers definition of flag AVR is required. |
+
+
+ 670 |
+
+ |
+ |
+ */ |
+
+
+ 671 |
+
+ |
+ 14 |
+ void lcd_bin(int val, uint8_t width) |
+
+
+ 672 |
+
+ |
+ |
+ { |
+
+
+ 673 |
+
+ |
+ |
+ #ifdef AVR |
+
+
+ 674 |
+
+ |
+ |
+ lcd_bin_AVR(val, width); |
+
+
+ 675 |
+
+ |
+ |
+ #else |
+
+
+ 676 |
+
+ |
+ |
+ char buffer[35]; |
+
+
+ 677 |
+
+ |
+ |
+ char bin_val_buffer[35]; |
+
+
+ 678 |
+
+ |
+ |
+ char zeros_buf[35]; |
+
+
+ 679 |
+
+ |
+ 14 |
+ buffer[0] = '\0'; |
+
+
+ 680 |
+
+ |
+ 14 |
+ bin_val_buffer[0] = '\0'; |
+
+
+ 681 |
+
+ |
+ 14 |
+ zeros_buf[0] = '\0'; |
+
+
+ 682 |
+
+ |
+ |
+ |
+
+
+ 683 |
+
+ |
+ 14 |
+ fill_bin_value_buffer(val, bin_val_buffer); |
+
+
+ 684 |
+
+ |
+ 14 |
+ fill_zeros_buffer(bin_val_buffer, width, zeros_buf); |
+
+
+ 685 |
+
+ |
+ 14 |
+ strcat(buffer, "0b"); |
+
+
+ 686 |
+
+ |
+ 14 |
+ strcat(buffer, zeros_buf); |
+
+
+ 687 |
+
+ |
+ 14 |
+ strcat(buffer, bin_val_buffer); |
+
+
+ 688 |
+
+ |
+ 14 |
+ lcd_str(buffer); |
+
+
+ 689 |
+
+ |
+ |
+ #endif |
+
+
+ 690 |
+
+ |
+ 14 |
+ } |
+
+
+ 691 |
+
+ |
+ |
+ |
+
+
+ 692 |
+
+ |
+ |
+ #endif |
+
+
+ 693 |
+
+ |
+ |
+ |
+
+
+ 694 |
+
+ |
+ |
+ /** |
+
+
+ 695 |
+
+ |
+ |
+ * @brief Function that move LCD cursor to specific posiotion located under x and y coordinate |
+
+
+ 696 |
+
+ |
+ |
+ * @param y LCD row/line number. Defined enum value LINE_1, LINE_2,... etc. |
+
+
+ 697 |
+
+ |
+ |
+ * @param x LCD column number. Defined enum value C1, C2, C3,... etc. |
+
+
+ 698 |
+
+ |
+ |
+ */ |
+
+
+ 699 |
+
+ |
+ 439 |
+ void lcd_locate(enum LCD_LINES y, enum LCD_COLUMNS x) |
+
+
+ 700 |
+
+ |
+ |
+ { |
+
+
+ 701 |
+
+
+ 4/5
+
+ ✓ Branch 0 taken 122 times.
+ ✓ Branch 1 taken 108 times.
+ ✓ Branch 2 taken 101 times.
+ ✓ Branch 3 taken 108 times.
+ ✗ Branch 4 not taken.
+
+
+ |
+ 439 |
+ switch (y) |
+
+
+ 702 |
+
+ |
+ |
+ { |
+
+
+ 703 |
+
+ |
+ 122 |
+ case 0: |
+
+
+ 704 |
+
+ |
+ 122 |
+ y = LCD_LINE1_ADR; |
+
+
+ 705 |
+
+ |
+ 122 |
+ break; |
+
+
+ 706 |
+
+ |
+ |
+ |
+
+
+ 707 |
+
+ |
+ |
+ #if (LCD_Y > 1) |
+
+
+ 708 |
+
+ |
+ 108 |
+ case 1: |
+
+
+ 709 |
+
+ |
+ 108 |
+ y = LCD_LINE2_ADR; |
+
+
+ 710 |
+
+ |
+ 108 |
+ break; |
+
+
+ 711 |
+
+ |
+ |
+ #endif |
+
+
+ 712 |
+
+ |
+ |
+ #if (LCD_Y > 2) |
+
+
+ 713 |
+
+ |
+ 101 |
+ case 2: |
+
+
+ 714 |
+
+ |
+ 101 |
+ y = LCD_LINE3_ADR; |
+
+
+ 715 |
+
+ |
+ 101 |
+ break; |
+
+
+ 716 |
+
+ |
+ |
+ #endif |
+
+
+ 717 |
+
+ |
+ |
+ #if (LCD_Y > 3) |
+
+
+ 718 |
+
+ |
+ 108 |
+ case 3: |
+
+
+ 719 |
+
+ |
+ 108 |
+ y = LCD_LINE4_ADR; |
+
+
+ 720 |
+
+ |
+ 108 |
+ break; |
+
+
+ 721 |
+
+ |
+ |
+ #endif |
+
+
+ 722 |
+
+ |
+ ✗ |
+ default: |
+
+
+ 723 |
+
+ |
+ ✗ |
+ break; |
+
+
+ 724 |
+
+ |
+ |
+ } |
+
+
+ 725 |
+
+ |
+ 439 |
+ lcd_write_cmd((uint8_t)(LCDC_SET_DDRAM + y + x)); |
+
+
+ 726 |
+
+ |
+ 439 |
+ } |
+
+
+ 727 |
+
+ |
+ |
+ #if USE_LCD_CURSOR_HOME == ON |
+
+
+ 728 |
+
+ |
+ |
+ /** |
+
+
+ 729 |
+
+ |
+ |
+ * @brief Function that move lcd cursor to the first posision at first row of LCD screen |
+
+
+ 730 |
+
+ |
+ |
+ */ |
+
+
+ 731 |
+
+ |
+ 7 |
+ void lcd_home(void) |
+
+
+ 732 |
+
+ |
+ |
+ { |
+
+
+ 733 |
+
+ |
+ 7 |
+ lcd_write_cmd(LCDC_CLS | LCDC_HOME); |
+
+
+ 734 |
+
+ |
+ |
+ #if USE_RW_PIN == OFF |
+
+
+ 735 |
+
+ |
+ 7 |
+ LCD->delay_us(4900); |
+
+
+ 736 |
+
+ |
+ |
+ #endif |
+
+
+ 737 |
+
+ |
+ 7 |
+ } |
+
+
+ 738 |
+
+ |
+ |
+ #endif |
+
+
+ 739 |
+
+ |
+ |
+ |
+
+
+ 740 |
+
+ |
+ |
+ #if USE_LCD_CURSOR_ON == ON |
+
+
+ 741 |
+
+ |
+ |
+ /** |
+
+
+ 742 |
+
+ |
+ |
+ * @brief Function that activates the visibility of the LCD cursor. |
+
+
+ 743 |
+
+ |
+ |
+ */ |
+
+
+ 744 |
+
+ |
+ 7 |
+ void lcd_cursor_on(void) |
+
+
+ 745 |
+
+ |
+ |
+ { |
+
+
+ 746 |
+
+ |
+ 7 |
+ lcd_write_cmd(LCDC_ONOFF | LCDC_DISPLAYON | LCDC_CURSORON); |
+
+
+ 747 |
+
+ |
+ 7 |
+ } |
+
+
+ 748 |
+
+ |
+ |
+ #endif |
+
+
+ 749 |
+
+ |
+ |
+ |
+
+
+ 750 |
+
+ |
+ |
+ #if USE_LCD_CURSOR_OFF == ON |
+
+
+ 751 |
+
+ |
+ |
+ /** |
+
+
+ 752 |
+
+ |
+ |
+ * @brief Function that deactivates the visibility and blinking of the LCD cursor. |
+
+
+ 753 |
+
+ |
+ |
+ */ |
+
+
+ 754 |
+
+ |
+ 7 |
+ void lcd_cursor_off(void) |
+
+
+ 755 |
+
+ |
+ |
+ { |
+
+
+ 756 |
+
+ |
+ 7 |
+ lcd_write_cmd(LCDC_ONOFF | LCDC_DISPLAYON); |
+
+
+ 757 |
+
+ |
+ 7 |
+ } |
+
+
+ 758 |
+
+ |
+ |
+ #endif |
+
+
+ 759 |
+
+ |
+ |
+ #if USE_LCD_BLINKING_CURSOR_ON == ON |
+
+
+ 760 |
+
+ |
+ |
+ /** |
+
+
+ 761 |
+
+ |
+ |
+ * @brief Function that activates the visibility and blinking of the LCD cursor. |
+
+
+ 762 |
+
+ |
+ |
+ */ |
+
+
+ 763 |
+
+ |
+ 7 |
+ void lcd_blinking_cursor_on(void) |
+
+
+ 764 |
+
+ |
+ |
+ { |
+
+
+ 765 |
+
+ |
+ 7 |
+ lcd_write_cmd(LCDC_ONOFF | LCDC_DISPLAYON | LCDC_CURSORON | LCDC_BLINKON); |
+
+
+ 766 |
+
+ |
+ 7 |
+ } |
+
+
+ 767 |
+
+ |
+ |
+ #endif |
+
+
+ 768 |
+
+ |
+ |
+ |
+
+
+ 769 |
+
+ |
+ |
+ #if LCD_BUFFERING == ON |
+
+
+ 770 |
+
+ |
+ 382 |
+ void lcd_buf_cls(void) |
+
+
+ 771 |
+
+ |
+ |
+ { |
+
+
+ 772 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 30560 times.
+ ✓ Branch 1 taken 382 times.
+
+
+ |
+ 30942 |
+ for(lcd_buf_position_ptr=&lcd_buffer[LINE_1][C1]; lcd_buf_position_ptr<=&lcd_buffer[LAST_LCD_LINE][LAST_CHAR_IN_LCD_LINE]; lcd_buf_position_ptr++) |
+
+
+ 773 |
+
+ |
+ |
+ { |
+
+
+ 774 |
+
+ |
+ 30560 |
+ *lcd_buf_position_ptr=' '; |
+
+
+ 775 |
+
+ |
+ |
+ } |
+
+
+ 776 |
+
+ |
+ 382 |
+ lcd_buf_position_ptr=&lcd_buffer[LINE_1][C1]; |
+
+
+ 777 |
+
+ |
+ 382 |
+ LCD_UPDATE_EVENT=true; |
+
+
+ 778 |
+
+ |
+ 382 |
+ } |
+
+
+ 779 |
+
+ |
+ |
+ |
+
+
+ 780 |
+
+ |
+ 63 |
+ void lcd_buf_char(const char c) |
+
+
+ 781 |
+
+ |
+ |
+ { |
+
+
+ 782 |
+
+ |
+ 63 |
+ *lcd_buf_position_ptr=c; |
+
+
+ 783 |
+
+ |
+ 63 |
+ check_lcd_buf_possition_ptr_overflow(); |
+
+
+ 784 |
+
+ |
+ 63 |
+ LCD_UPDATE_EVENT=true; |
+
+
+ 785 |
+
+ |
+ 63 |
+ } |
+
+
+ 786 |
+
+ |
+ |
+ |
+
+
+ 787 |
+
+ |
+ 87 |
+ void lcd_buf_locate(enum LCD_LINES y, enum LCD_COLUMNS x) |
+
+
+ 788 |
+
+ |
+ |
+ { |
+
+
+ 789 |
+
+ |
+ 87 |
+ lcd_buf_position_ptr=&lcd_buffer[y][x]; |
+
+
+ 790 |
+
+ |
+ 87 |
+ } |
+
+
+ 791 |
+
+ |
+ |
+ |
+
+
+ 792 |
+
+ |
+ 160 |
+ void lcd_buf_str(const char *str) |
+
+
+ 793 |
+
+ |
+ |
+ { |
+
+
+ 794 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 774 times.
+ ✓ Branch 1 taken 160 times.
+
+
+ |
+ 934 |
+ while (*str) |
+
+
+ 795 |
+
+ |
+ |
+ { |
+
+
+ 796 |
+
+ |
+ 774 |
+ *(lcd_buf_position_ptr)=*(str++); |
+
+
+ 797 |
+
+ |
+ 774 |
+ check_lcd_buf_possition_ptr_overflow(); |
+
+
+ 798 |
+
+ |
+ |
+ } |
+
+
+ 799 |
+
+ |
+ 160 |
+ LCD_UPDATE_EVENT=true; |
+
+
+ 800 |
+
+ |
+ 160 |
+ } |
+
+
+ 801 |
+
+ |
+ |
+ |
+
+
+ 802 |
+
+ |
+ 94 |
+ void lcd_update(void) |
+
+
+ 803 |
+
+ |
+ |
+ { |
+
+
+ 804 |
+
+ |
+ |
+ static uint8_t lcd_cursor_position=0; |
+
+
+ 805 |
+
+ |
+ |
+ static uint8_t lcd_line=0; |
+
+
+ 806 |
+
+ |
+ |
+ static uint8_t missed_char_counter_in_LCD_line=0; |
+
+
+ 807 |
+
+ |
+ |
+ // static const lcd_pos_t *prev_lcd_buff_pos_ptr=&prev_lcd_buffer[LINE_1][C1]; |
+
+
+ 808 |
+
+ |
+ |
+ |
+
+
+ 809 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 7520 times.
+ ✓ Branch 1 taken 94 times.
+
+
+ |
+ 7614 |
+ for(lcd_buf_position_ptr=&lcd_buffer[LINE_1][C1]; lcd_buf_position_ptr<=&lcd_buffer[LAST_LCD_LINE][LAST_CHAR_IN_LCD_LINE]; lcd_buf_position_ptr++) |
+
+
+ 810 |
+
+ |
+ |
+ { |
+
+
+ 811 |
+
+ |
+ 7520 |
+ write_lcd_buf_2_lcd(&lcd_cursor_position,&lcd_line,&missed_char_counter_in_LCD_line,&prev_lcd_buffer[LINE_1][C1]); |
+
+
+ 812 |
+
+ |
+ 7520 |
+ update_lcd_curosr_possition(&lcd_cursor_position,&lcd_line,&missed_char_counter_in_LCD_line); |
+
+
+ 813 |
+
+ |
+ |
+ } |
+
+
+ 814 |
+
+ |
+ 94 |
+ lcd_buf_position_ptr=&lcd_buffer[LINE_1][C1]; |
+
+
+ 815 |
+
+ |
+ 94 |
+ copy_lcd_buf_2_prev_lcd_buf(); |
+
+
+ 816 |
+
+ |
+ 94 |
+ LCD_UPDATE_EVENT=false; |
+
+
+ 817 |
+
+ |
+ 94 |
+ } |
+
+
+ 818 |
+
+ |
+ |
+ |
+
+
+ 819 |
+
+ |
+ |
+ #if USE_LCD_BUF_INT == ON |
+
+
+ 820 |
+
+ |
+ |
+ /** |
+
+
+ 821 |
+
+ |
+ |
+ * @brief Function for adding intiger value as string to the LCD buffer under current position of the LCD buffer pointer. |
+
+
+ 822 |
+
+ |
+ |
+ * @param val int type value to add to LCD buffer |
+
+
+ 823 |
+
+ |
+ |
+ * @param width Minimum number of characters to be added to LCD buffer. If the value to be added to the LCD buffer is shorter than width, the |
+
+
+ 824 |
+
+ |
+ |
+ * result is padded with blank spaces. The value to be added to buffer as string is not truncated if the string lenght is larger then width value. |
+
+
+ 825 |
+
+ |
+ |
+ * @param alignment If the value to be added to LCD buffer as string is shorter than width, this parameter will specify alignment of the |
+
+
+ 826 |
+
+ |
+ |
+ * tekst represented the value. This parameter can be set to "left" or "right" |
+
+
+ 827 |
+
+ |
+ |
+ * @attention to compile for AVR ucontrollers definition of flag AVR is required. |
+
+
+ 828 |
+
+ |
+ |
+ */ |
+
+
+ 829 |
+
+ |
+ 28 |
+ void lcd_buf_int(int val, uint8_t width, enum alignment alignment) |
+
+
+ 830 |
+
+ |
+ |
+ { |
+
+
+ 831 |
+
+ |
+ |
+ #ifdef AVR |
+
+
+ 832 |
+
+ |
+ |
+ lcd_buf_int_AVR(val, width, alignment); |
+
+
+ 833 |
+
+ |
+ |
+ #else |
+
+
+ 834 |
+
+ |
+ |
+ char buffer[20]; // 19chars for 64 bit int + end char '\0' |
+
+
+ 835 |
+
+ |
+ 28 |
+ buffer[0] = '\0'; |
+
+
+ 836 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 21 times.
+ ✓ Branch 1 taken 7 times.
+
+
+ |
+ 28 |
+ if (alignment == right) |
+
+
+ 837 |
+
+ |
+ 21 |
+ sprintf(buffer, "%*i", width, val); |
+
+
+ 838 |
+
+ |
+ |
+ else |
+
+
+ 839 |
+
+ |
+ 7 |
+ sprintf(buffer, "%-*i", width, val); |
+
+
+ 840 |
+
+ |
+ 28 |
+ lcd_buf_str(buffer); |
+
+
+ 841 |
+
+ |
+ |
+ #endif |
+
+
+ 842 |
+
+ |
+ 28 |
+ } |
+
+
+ 843 |
+
+ |
+ |
+ #endif |
+
+
+ 844 |
+
+ |
+ |
+ |
+
+
+ 845 |
+
+ |
+ |
+ #if USE_LCD_BUF_HEX == ON |
+
+
+ 846 |
+
+ |
+ |
+ /** |
+
+
+ 847 |
+
+ |
+ |
+ * @brief Function for adding intiger value in hexadecimal format as string to the LCD buffer under current position of the LCD buffer pointer. |
+
+
+ 848 |
+
+ |
+ |
+ * @param val int type value to add to LCD buffer as string in hexadecimal format |
+
+
+ 849 |
+
+ |
+ |
+ * @param width Minimum number of characters to be added to lcd buffer. If the value to be added to buffer is shorter than width, the |
+
+
+ 850 |
+
+ |
+ |
+ * result is padded with blank spaces. The value to be added to buffer as string is not truncated if the string lenght is larger then width value. Width should contain |
+
+
+ 851 |
+
+ |
+ |
+ * additional 2 characters for "0x" at the begining of the value represented as string. example: 0x01-> width=4 |
+
+
+ 852 |
+
+ |
+ |
+ * @param alignment If the value to be added to LCD buffer as string is shorter than width, this parameter will specify alignment of the |
+
+
+ 853 |
+
+ |
+ |
+ * tekst represented the value. This parameter can be set to "left" or "right" |
+
+
+ 854 |
+
+ |
+ |
+ * @attention to compile for AVR ucontrollers definition of flag AVR is required. |
+
+
+ 855 |
+
+ |
+ |
+ */ |
+
+
+ 856 |
+
+ |
+ 32 |
+ void lcd_buf_hex(int val, uint8_t width, enum alignment alignment) |
+
+
+ 857 |
+
+ |
+ |
+ { |
+
+
+ 858 |
+
+ |
+ |
+ #ifdef AVR |
+
+
+ 859 |
+
+ |
+ |
+ lcd_buf_hex_AVR(val, width, alignment); |
+
+
+ 860 |
+
+ |
+ |
+ #else |
+
+
+ 861 |
+
+ |
+ |
+ char buffer[17]; |
+
+
+ 862 |
+
+ |
+ 32 |
+ buffer[0] = '\0'; |
+
+
+ 863 |
+
+
+ 2/2
+
+ ✓ Branch 0 taken 21 times.
+ ✓ Branch 1 taken 11 times.
+
+
+ |
+ 32 |
+ if (alignment == right) |
+
+
+ 864 |
+
+ |
+ 21 |
+ sprintf(buffer, "%#*x", width, val); |
+
+
+ 865 |
+
+ |
+ |
+ else |
+
+
+ 866 |
+
+ |
+ 11 |
+ sprintf(buffer, "%-#*x", width, val); |
+
+
+ 867 |
+
+ |
+ 32 |
+ lcd_buf_str(buffer); |
+
+
+ 868 |
+
+ |
+ |
+ #endif |
+
+
+ 869 |
+
+ |
+ 32 |
+ } |
+
+
+ 870 |
+
+ |
+ |
+ #endif |
+
+
+ 871 |
+
+ |
+ |
+ |
+
+
+ 872 |
+
+ |
+ |
+ #if USE_LCD_BUF_BIN == ON |
+
+
+ 873 |
+
+ |
+ |
+ /** |
+
+
+ 874 |
+
+ |
+ |
+ * @brief Function for adding to the LCD buffer the integer value in binary format as string under current position of the LCD buffer pointer |
+
+
+ 875 |
+
+ |
+ |
+ * @param val int type value to be added to the LCD buffer as string in hexadecimal format |
+
+
+ 876 |
+
+ |
+ |
+ * @param width Minimum number of characters to be added to LCD buffer. If the value to be added to buffer as string lenght is shorter than width, the |
+
+
+ 877 |
+
+ |
+ |
+ * result is padded with blank spaces. The value to be added to buffer as string is not truncated if the string lenght represented the value i binary format lenght |
+
+
+ 878 |
+
+ |
+ |
+ * is larger then width value. Width should contain additional 2 characters for "0b" at the begining of the value represented as string. example: 0b01-> width=4 |
+
+
+ 879 |
+
+ |
+ |
+ * @attention to compile for AVR ucontrollers definition of flag AVR is required. |
+
+
+ 880 |
+
+ |
+ |
+ */ |
+
+
+ 881 |
+
+ |
+ 13 |
+ void lcd_buf_bin(int val, uint8_t width) |
+
+
+ 882 |
+
+ |
+ |
+ { |
+
+
+ 883 |
+
+ |
+ |
+ #ifdef AVR |
+
+
+ 884 |
+
+ |
+ |
+ lcd_buf_bin_AVR(val, width); |
+
+
+ 885 |
+
+ |
+ |
+ #else |
+
+
+ 886 |
+
+ |
+ |
+ char buffer[35]; |
+
+
+ 887 |
+
+ |
+ |
+ char bin_val_buffer[35]; |
+
+
+ 888 |
+
+ |
+ |
+ char zeros_buf[35]; |
+
+
+ 889 |
+
+ |
+ 13 |
+ buffer[0] = '\0'; |
+
+
+ 890 |
+
+ |
+ 13 |
+ bin_val_buffer[0] = '\0'; |
+
+
+ 891 |
+
+ |
+ 13 |
+ zeros_buf[0] = '\0'; |
+
+
+ 892 |
+
+ |
+ |
+ |
+
+
+ 893 |
+
+ |
+ 13 |
+ fill_bin_value_buffer(val, bin_val_buffer); |
+
+
+ 894 |
+
+ |
+ 13 |
+ fill_zeros_buffer(bin_val_buffer, width, zeros_buf); |
+
+
+ 895 |
+
+ |
+ 13 |
+ strcat(buffer, "0b"); |
+
+
+ 896 |
+
+ |
+ 13 |
+ strcat(buffer, zeros_buf); |
+
+
+ 897 |
+
+ |
+ 13 |
+ strcat(buffer, bin_val_buffer); |
+
+
+ 898 |
+
+ |
+ 13 |
+ lcd_buf_str(buffer); |
+
+
+ 899 |
+
+ |
+ |
+ #endif |
+
+
+ 900 |
+
+ |
+ 13 |
+ } |
+
+
+ 901 |
+
+ |
+ |
+ |
+
+
+ 902 |
+
+ |
+ |
+ #endif |
+
+
+ 903 |
+
+ |
+ |
+ #endif |
+
+
+ 904 |
+
+ |
+ |
+ |
+
+
+ 905 |
+
+ |
+ |
|
diff --git a/reports/Cyclomatic_Complexity/Lizard_report.html b/reports/Cyclomatic_Complexity/Lizard_report.html
index 7f71479..fd3b96d 100644
--- a/reports/Cyclomatic_Complexity/Lizard_report.html
+++ b/reports/Cyclomatic_Complexity/Lizard_report.html
@@ -55,12 +55,12 @@ Code Complexity Report
- Source file: src/lcd_hd44780.c |
+ Source file: ../../../src/lcd_hd44780.c
Function name | |
Cyclomatic complexity
(12)
- | LOC (21) |
+ | LOC (30) |
Token count
@@ -248,18 +248,98 @@ Code Complexity Report
|
- lcd_init |
+ lcd_put_spaces |
|
+ 2 |
+
+
+
+ 7 |
+
+
+
+ 28 |
+
+
+
1 |
+
+
+
+ lcd_int_AVR |
+ |
+
+ 3 |
+
+
+
+ 26 |
+
+
+
+ 104 |
+
+
+
+ 3 |
+
+
+
+
+ lcd_hex_AVR |
+ |
+
+ 3 |
+
+
+
+ 28 |
+
+
+
+ 129 |
+
+
+
+ 3 |
+
+
+
+
+ lcd_bin_AVR |
+ |
+
+ 3 |
+
+
+
+ 22 |
+
+
+
+ 117 |
+
+
+
+ 2 |
+
+
+
+
+ lcd_buf_put_spaces |
+ |
+
+ 2 |
+
- 20 |
+ 7 |
- 110 |
+ 28 |
@@ -268,11 +348,211 @@ Code Complexity Report
- lcd_cls |
+ lcd_buf_int_AVR |
+ |
+
+ 3 |
+
+
+
+ 26 |
+
+
+
+ 104 |
+
+
+
+ 3 |
+
+
+
+
+ lcd_buf_hex_AVR |
+ |
+
+ 3 |
+
+
+
+ 28 |
+
+
+
+ 129 |
+
+
+
+ 3 |
+
+
+
+
+ lcd_buf_bin_AVR |
+ |
+
+ 3 |
+
+
+
+ 22 |
+
+
+
+ 117 |
+
+
+
+ 2 |
+
+
+
+
+ fill_bin_value_buffer |
+ |
+
+ 4 |
+
+
+
+ 19 |
+
+
+
+ 71 |
+
+
+
+ 2 |
+
+
+
+
+ fill_zeros_buffer |
+ |
+
+ 3 |
+
+
+
+ 11 |
+
+
+
+ 70 |
+
+
+
+ 3 |
+
+
+
+
+ check_lcd_buf_possition_ptr_overflow |
+ |
+
+ 2 |
+
+
+
+ 7 |
+
+
+
+ 33 |
+
+
+
+ 1 |
+
+
+
+
+ copy_lcd_buf_2_prev_lcd_buf |
+ |
+
+ 3 |
+
+
+
+ 10 |
+
+
+
+ 54 |
+
+
+
+ 1 |
+
+
+
+
+ update_lcd_curosr_possition |
+ |
+
+ 3 |
+
+
+
+ 14 |
+
+
+
+ 69 |
+
+
+
+ 3 |
+
+
+
+
+ write_lcd_buf_2_lcd |
+ |
+
+ 3 |
+
+
+
+ 16 |
+
+
+
+ 71 |
+
+
+
+ 4 |
+
+
+
+
+ lcd_init |
|
+ 2 |
+
+
+
+ 23 |
+
+
+
+ 122 |
+
+
+
1 |
+
+
+
+ lcd_cls |
+ |
+
+ 2 |
+
5 |
@@ -339,7 +619,27 @@ Code Complexity Report
- 22 |
+ 23 |
+
+
+
+ 1 |
+
+
+
+
+ lcd_str |
+ |
+
+ 2 |
+
+
+
+ 8 |
+
+
+
+ 37 |
@@ -347,19 +647,344 @@ Code Complexity Report
+
+ lcd_int |
+ |
+
+ 3 |
+
+
+
+ 11 |
+
+
+
+ 70 |
+
+
+
+ 3 |
+
+
+
+
+ lcd_hex |
+ |
+
+ 3 |
+
+
+
+ 11 |
+
+
+
+ 70 |
+
+
+
+ 3 |
+
+
+
+
+ lcd_bin |
+ |
+
+ 2 |
+
+
+
+ 16 |
+
+
+
+ 98 |
+
+
+
+ 2 |
+
+
+
+
+ lcd_locate |
+ |
+
+ 8 |
+
+
+
+ 21 |
+
+
+
+ 72 |
+
+
+
+ 2 |
+
+
+
+
+ lcd_home |
+ |
+
+ 2 |
+
+
+
+ 5 |
+
+
+
+ 20 |
+
+
+
+ 1 |
+
+
+
+
+ lcd_cursor_on |
+ |
+
+ 1 |
+
+
+
+ 4 |
+
+
+
+ 15 |
+
+
+
+ 1 |
+
+
+
+
+ lcd_cursor_off |
+ |
+
+ 1 |
+
+
+
+ 4 |
+
+
+
+ 13 |
+
+
+
+ 1 |
+
+
+
+
+ lcd_blinking_cursor_on |
+ |
+
+ 1 |
+
+
+
+ 4 |
+
+
+
+ 17 |
+
+
+
+ 1 |
+
+
+
+
+ lcd_buf_cls |
+ |
+
+ 2 |
+
+
+
+ 9 |
+
+
+
+ 55 |
+
+
+
+ 1 |
+
+
+
+
+ lcd_buf_char |
+ |
+
+ 1 |
+
+
+
+ 6 |
+
+
+
+ 21 |
+
+
+
+ 1 |
+
+
+
+
+ lcd_buf_locate |
+ |
+
+ 1 |
+
+
+
+ 4 |
+
+
+
+ 23 |
+
+
+
+ 2 |
+
+
+
+
+ lcd_buf_str |
+ |
+
+ 2 |
+
+
+
+ 9 |
+
+
+
+ 35 |
+
+
+
+ 1 |
+
+
+
+
+ lcd_update |
+ |
+
+ 2 |
+
+
+
+ 14 |
+
+
+
+ 105 |
+
+
+
+ 1 |
+
+
+
+
+ lcd_buf_int |
+ |
+
+ 3 |
+
+
+
+ 11 |
+
+
+
+ 70 |
+
+
+
+ 3 |
+
+
+
+
+ lcd_buf_hex |
+ |
+
+ 3 |
+
+
+
+ 11 |
+
+
+
+ 70 |
+
+
+
+ 3 |
+
+
+
+
+ lcd_buf_bin |
+ |
+
+ 2 |
+
+
+
+ 16 |
+
+
+
+ 98 |
+
+
+
+ 2 |
+
+
+
+
+
+ Source file: ../../../src/lcd_hd44780.h |
+
+
- Source file: src/lcd_hd44780.h |
+ Source file: ../../../src/lcd_hd44780_config.h
- Source file: src/lcd_hd44780_config.h |
+ Source file: ../../../src/lcd_hd44780_def_char.h
- Source file: src/lcd_hd44780_interface.h |
+ Source file: ../../../src/lcd_hd44780_interface.h
@@ -369,7 +994,7 @@ Code Complexity Report