Browse Source

Merge remote-tracking branch 'upstream/2.0.x' into fabrikator-mini

Thomas Buck 4 years ago
parent
commit
fc761bb7e8
100 changed files with 4350 additions and 56777 deletions
  1. 19
    0
      .editorconfig
  2. 0
    1
      .gitattributes
  3. 3
    0
      .github/FUNDING.yml
  4. 43
    0
      .github/ISSUE_TEMPLATE/bug_report.md
  5. 17
    0
      .github/ISSUE_TEMPLATE/config.yml
  6. 35
    0
      .github/ISSUE_TEMPLATE/feature_request.md
  7. 46
    0
      .github/code_of_conduct.md
  8. 144
    0
      .github/contributing.md
  9. 11
    31
      .github/issue_template.md
  10. 19
    0
      .github/pull_request_template.md
  11. 7
    0
      .github/workflows/bad-target.md
  12. 34
    0
      .github/workflows/bump-date.yml
  13. 27
    0
      .github/workflows/check-pr.yml
  14. 104
    0
      .github/workflows/test-builds.yml
  15. 47
    6
      .gitignore
  16. 0
    371
      .travis.yml
  17. 3
    3
      LICENSE
  18. 0
    27
      Marlin/Conditionals.h
  19. 0
    473
      Marlin/Conditionals_LCD.h
  20. 0
    1150
      Marlin/Conditionals_post.h
  21. 975
    392
      Marlin/Configuration.h
  22. 2123
    527
      Marlin/Configuration_adv.h
  23. 0
    855
      Marlin/G26_Mesh_Validation_Tool.cpp
  24. 0
    1132
      Marlin/I2CPositionEncoder.cpp
  25. 0
    346
      Marlin/I2CPositionEncoder.h
  26. 0
    333
      Marlin/M100_Free_Mem_Chk.cpp
  27. 593
    248
      Marlin/Makefile
  28. 0
    542
      Marlin/Marlin.h
  29. 53
    72
      Marlin/Marlin.ino
  30. 0
    42
      Marlin/MarlinConfig.h
  31. 0
    57
      Marlin/MarlinSPI.h
  32. 0
    654
      Marlin/MarlinSerial.cpp
  33. 0
    181
      Marlin/MarlinSerial.h
  34. 0
    14590
      Marlin/Marlin_main.cpp
  35. 0
    349
      Marlin/Max7219_Debug_LEDs.cpp
  36. 0
    90
      Marlin/Max7219_Debug_LEDs.h
  37. 0
    1577
      Marlin/SanityCheck.h
  38. 0
    715
      Marlin/Sd2Card.cpp
  39. 0
    204
      Marlin/Sd2Card.h
  40. 0
    1729
      Marlin/SdBaseFile.cpp
  41. 0
    501
      Marlin/SdBaseFile.h
  42. 0
    121
      Marlin/SdFatConfig.h
  43. 0
    615
      Marlin/SdFatStructs.h
  44. 0
    91
      Marlin/SdFatUtil.cpp
  45. 0
    51
      Marlin/SdFatUtil.h
  46. 0
    100
      Marlin/SdFile.cpp
  47. 0
    60
      Marlin/SdFile.h
  48. 0
    267
      Marlin/SdInfo.h
  49. 0
    384
      Marlin/SdVolume.cpp
  50. 0
    211
      Marlin/SdVolume.h
  51. 47
    65
      Marlin/Version.h
  52. 0
    38
      Marlin/bitmap_flags.h
  53. 0
    46
      Marlin/blinkm.cpp
  54. 0
    35
      Marlin/blinkm.h
  55. 0
    152
      Marlin/boards.h
  56. 0
    146
      Marlin/buzzer.h
  57. 0
    909
      Marlin/cardreader.cpp
  58. 0
    198
      Marlin/cardreader.h
  59. 0
    145
      Marlin/circularqueue.h
  60. 0
    2139
      Marlin/configuration_store.cpp
  61. 0
    82
      Marlin/configuration_store.h
  62. 0
    151
      Marlin/dac_mcp4728.cpp
  63. 0
    66
      Marlin/dac_mcp4728.h
  64. 0
    106
      Marlin/digipot_mcp4018.cpp
  65. 0
    79
      Marlin/digipot_mcp4451.cpp
  66. 0
    563
      Marlin/dogm_bitmaps.h
  67. 0
    180
      Marlin/dogm_font_data_6x9_marlin.h
  68. 0
    194
      Marlin/dogm_font_data_HD44780_C.h
  69. 0
    192
      Marlin/dogm_font_data_HD44780_J.h
  70. 0
    226
      Marlin/dogm_font_data_HD44780_W.h
  71. 0
    286
      Marlin/dogm_font_data_ISO10646_1.h
  72. 0
    184
      Marlin/dogm_font_data_ISO10646_1_PL.h
  73. 0
    197
      Marlin/dogm_font_data_ISO10646_1_tr.h
  74. 0
    196
      Marlin/dogm_font_data_ISO10646_5_Cyrillic.h
  75. 0
    293
      Marlin/dogm_font_data_ISO10646_CN.h
  76. 0
    192
      Marlin/dogm_font_data_ISO10646_CZ.h
  77. 0
    205
      Marlin/dogm_font_data_ISO10646_Greek.h
  78. 0
    192
      Marlin/dogm_font_data_ISO10646_Kana.h
  79. 0
    151
      Marlin/dogm_font_data_ISO10646_SK.h
  80. 0
    45
      Marlin/dogm_font_data_Marlin_symbols.h
  81. 0
    167
      Marlin/duration_t.h
  82. 0
    246
      Marlin/endstop_interrupts.h
  83. 0
    534
      Marlin/endstops.cpp
  84. 0
    117
      Marlin/endstops.h
  85. 0
    193
      Marlin/enum.h
  86. 0
    1789
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
  87. 0
    1567
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h
  88. 0
    1769
      Marlin/example_configurations/AliExpress/CL-260/Configuration.h
  89. 0
    15
      Marlin/example_configurations/AliExpress/CL-260/README.txt
  90. 0
    1928
      Marlin/example_configurations/Anet/A6/Configuration.h
  91. 0
    1567
      Marlin/example_configurations/Anet/A6/Configuration_adv.h
  92. 0
    1778
      Marlin/example_configurations/Anet/A8/Configuration.h
  93. 0
    1567
      Marlin/example_configurations/Anet/A8/Configuration_adv.h
  94. 0
    1760
      Marlin/example_configurations/BQ/Hephestos/Configuration.h
  95. 0
    1567
      Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h
  96. 0
    1770
      Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
  97. 0
    1567
      Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h
  98. 0
    22
      Marlin/example_configurations/BQ/Hephestos_2/README.md
  99. 0
    103
      Marlin/example_configurations/BQ/Hephestos_2/_Bootscreen.h
  100. 0
    0
      Marlin/example_configurations/BQ/WITBOX/Configuration.h

+ 19
- 0
.editorconfig View File

@@ -0,0 +1,19 @@
1
+# editorconfig.org
2
+root = true
3
+
4
+[{*.patch,syntax_test_*}]
5
+trim_trailing_whitespace = false
6
+
7
+[{*.c,*.cpp,*.h}]
8
+charset = utf-8
9
+
10
+[{*.c,*.cpp,*.h,Makefile}]
11
+trim_trailing_whitespace = true
12
+insert_final_newline = true
13
+end_of_line = lf
14
+indent_style = space
15
+indent_size = 2
16
+
17
+[{*.py,*.conf,*.sublime-project}]
18
+indent_style = tab
19
+indent_size = 4

+ 0
- 1
.gitattributes View File

@@ -17,4 +17,3 @@
17 17
 *.png binary
18 18
 *.jpg binary
19 19
 *.fon binary
20
-

+ 3
- 0
.github/FUNDING.yml View File

@@ -0,0 +1,3 @@
1
+github: [thinkyhead]
2
+patreon: thinkyhead
3
+custom: ["http://www.thinkyhead.com/donate-to-marlin"]

+ 43
- 0
.github/ISSUE_TEMPLATE/bug_report.md View File

@@ -0,0 +1,43 @@
1
+---
2
+name: Bug report
3
+about: Report a bug in Marlin
4
+title: "[BUG] (short description)"
5
+labels: ''
6
+assignees: ''
7
+
8
+---
9
+
10
+<!--
11
+
12
+Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
13
+
14
+Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use one of the support links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
15
+
16
+Before filing an issue be sure to test the "bugfix" branches to see whether the issue has been resolved.
17
+
18
+-->
19
+
20
+### Bug Description
21
+
22
+<!-- Description of the bug -->
23
+
24
+### My Configurations
25
+
26
+**Required:** Please include a ZIP file containing your `Configuration.h` and `Configuration_adv.h` files.
27
+
28
+### Steps to Reproduce
29
+
30
+<!-- Please describe the steps needed to reproduce the issue -->
31
+
32
+1. [First Step]
33
+2. [Second Step]
34
+3. [and so on...]
35
+
36
+**Expected behavior:** [What you expect to happen]
37
+
38
+**Actual behavior:** [What actually happens]
39
+
40
+#### Additional Information
41
+
42
+* Provide pictures or links to videos that clearly demonstrate the issue.
43
+* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.

+ 17
- 0
.github/ISSUE_TEMPLATE/config.yml View File

@@ -0,0 +1,17 @@
1
+blank_issues_enabled: false
2
+contact_links:
3
+  - name: Marlin Documentation
4
+    url: http://marlinfw.org/
5
+    about: Lots of documentation on installing and using Marlin.
6
+  - name: MarlinFirmware Facebook group
7
+    url: https://www.facebook.com/groups/1049718498464482
8
+    about: Please ask and answer questions here.
9
+  - name: Marlin on Discord
10
+    url: https://discord.gg/n5NJ59y
11
+    about: Join the Discord server for support and discussion.
12
+  - name: Marlin Discussion Forum
13
+    url: http://forums.reprap.org/list.php?415
14
+    about: A searchable web forum hosted by RepRap dot org.
15
+  - name: Marlin Videos on YouTube
16
+    url: https://www.youtube.com/results?search_query=marlin+firmware
17
+    about: Tutorials and more from Marlin users all around the world. Great for new users!

+ 35
- 0
.github/ISSUE_TEMPLATE/feature_request.md View File

@@ -0,0 +1,35 @@
1
+---
2
+name: Feature request
3
+about: Request a Feature
4
+title: "[FR] (feature request title)"
5
+labels: ''
6
+assignees: ''
7
+
8
+---
9
+
10
+<!--
11
+
12
+Have you read Marlin's Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect: https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md
13
+
14
+Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use one of the support links at https://github.com/MarlinFirmware/Marlin/issues/new/choose
15
+
16
+Before filing an issue be sure to test the "bugfix" branches to see whether the issue has been resolved.
17
+
18
+-->
19
+
20
+### Description
21
+
22
+<!-- Description of the requested feature -->
23
+
24
+### Feature Workflow
25
+
26
+<!-- Please describe the feature's behavior, user interaction, etc. -->
27
+
28
+1. [First Action]
29
+2. [Second Action]
30
+3. [and so on...]
31
+
32
+#### Additional Information
33
+
34
+* Provide pictures or links that demonstrate a similar feature or concept.
35
+* See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.

+ 46
- 0
.github/code_of_conduct.md View File

@@ -0,0 +1,46 @@
1
+# Contributor Covenant Code of Conduct
2
+
3
+## Our Pledge
4
+
5
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+## Our Standards
8
+
9
+Examples of behavior that contributes to creating a positive environment include:
10
+
11
+* Using welcoming and inclusive language
12
+* Being respectful of differing viewpoints and experiences
13
+* Gracefully accepting constructive criticism
14
+* Focusing on what is best for the community
15
+* Showing empathy towards other community members
16
+
17
+Examples of unacceptable behavior by participants include:
18
+
19
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+* Trolling, insulting/derogatory comments, and personal or political attacks
21
+* Public or private harassment
22
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+* Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+## Our Responsibilities
26
+
27
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+## Scope
32
+
33
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+## Enforcement
36
+
37
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [marlinfirmware@github.com](mailto:marlinfirmware@github.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+## Attribution
42
+
43
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
44
+
45
+[homepage]: https://contributor-covenant.org
46
+[version]: https://contributor-covenant.org/version/1/4/

+ 144
- 0
.github/contributing.md View File

@@ -0,0 +1,144 @@
1
+# Contributing to Marlin
2
+
3
+Thanks for your interest in contributing to Marlin Firmware!
4
+
5
+The following is a set of guidelines for contributing to Marlin, hosted by the [MarlinFirmware Organization](https://github.com/MarlinFirmware) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a Pull Request.
6
+
7
+#### Table Of Contents
8
+
9
+[Code of Conduct](#code-of-conduct)
10
+
11
+[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
12
+
13
+[How Can I Contribute?](#how-can-i-contribute)
14
+  * [Reporting Bugs](#reporting-bugs)
15
+  * [Suggesting Features or Changes](#suggesting-features-or-changes)
16
+  * [Your First Code Contribution](#your-first-code-contribution)
17
+  * [Pull Requests](#pull-requests)
18
+
19
+[Styleguides](#styleguides)
20
+  * [Git Commit Messages](#git-commit-messages)
21
+  * [C++ Coding Standards](#c++-coding-standards)
22
+  * [Documentation Styleguide](#documentation)
23
+
24
+[Additional Notes](#additional-notes)
25
+  * [Issue and Pull Request Labels](#issue-and-pull-request-labels)
26
+
27
+## Code of Conduct
28
+
29
+This project and everyone participating in it is governed by the [Marlin Code of Conduct](code_of_conduct.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [marlinfirmware@github.com](mailto:marlinfirmware@github.com).
30
+
31
+## I don't want to read this whole thing I just have a question!!!
32
+
33
+> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
34
+
35
+We have a Message Board and a Facebook group where our knowledgable user community can provide helpful advice if you have questions.
36
+
37
+* [Marlin RepRap forum](http://forums.reprap.org/list.php?415)
38
+* [MarlinFirmware on Facebook](https://www.facebook.com/groups/1049718498464482/)
39
+
40
+If chat is more your speed, you can join the MarlinFirmware Slack team:
41
+
42
+* Join the Marlin Slack Team
43
+  * To obtain group access, please [send a request](http://www.thinkyhead.com/contact/9) to @thinkyhead.
44
+  * Even though Slack is a chat service, sometimes it takes several hours for community members to respond &mdash; please be patient!
45
+  * Use the `#general` channel for general questions or discussion about Marlin.
46
+  * Other channels exist for certain topics. Check the channel list.
47
+
48
+## How Can I Contribute?
49
+
50
+### Reporting Bugs
51
+
52
+This section guides you through submitting a Bug Report for Marlin. Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
53
+
54
+Before creating a Bug Report, please test the "nightly" development branch, as you might find out that you don't need to create one. When you are creating a Bug Report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](issue_template.md), the information it asks for helps us resolve issues faster.
55
+
56
+> **Note:** Regressions can happen. If you find a **Closed** issue that seems like your issue, go ahead and open a new issue and include a link to the original issue in the body of your new one. All you need to create a link is the issue number, preceded by #. For example, #8888.
57
+
58
+#### How Do I Submit A (Good) Bug Report?
59
+
60
+Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Use the New Issue button to create an issue and provide the following information by filling in [the template](issue_template.md).
61
+
62
+Explain the problem and include additional details to help maintainers reproduce the problem:
63
+
64
+* **Use a clear and descriptive title** for the issue to identify the problem.
65
+* **Describe the exact steps which reproduce the problem** in as many details as possible. For example, start by explaining how you started Marlin, e.g. which command exactly you used in the terminal, or how you started Marlin otherwise. When listing steps, **don't just say what you did, but explain how you did it**. For example, if you moved the cursor to the end of a line, explain if you used the mouse, or a keyboard shortcut or an Marlin command, and if so which one?
66
+* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets or log output in the issue, use [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
67
+* **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.
68
+* **Explain which behavior you expected to see instead and why.**
69
+* **Include detailed log output** especially for probing and leveling. See below for usage of `DEBUG_LEVELING_FEATURE`.
70
+* **Include screenshots, links to videos, etc.** which clearly demonstrate the problem.
71
+* **Include G-code** (if relevant) that reliably causes the problem to show itself.
72
+* **If the problem wasn't triggered by a specific action**, describe what you were doing before the problem happened and share more information using the guidelines below.
73
+
74
+Provide more context:
75
+
76
+* **Can you reproduce the problem with a minimum of options enabled?**
77
+* **Did the problem start happening recently** (e.g. after updating to a new version of Marlin) or was this always a problem?
78
+* If the problem started happening recently, **can you reproduce the problem in an older version of Marlin?** What's the most recent version in which the problem doesn't happen? You can download older versions of Marlin from [the releases page](https://github.com/MarlinFirmware/Marlin/releases).
79
+* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
80
+
81
+Include details about your configuration and environment:
82
+
83
+* **Which version of Marlin are you using?** Marlin's exact version and build date can be seen in the startup message when a host connects to Marlin, or in the LCD Info menu (if enabled).
84
+* **What kind of 3D Printer and electronics are you using**?
85
+* **What kind of add-ons (probe, filament sensor) do you have**?
86
+* **Include your Configuration files.** Make a ZIP file containing `Configuration.h` and `Configuration_adv.h` and drop it on your reply.
87
+
88
+### Suggesting Features or Changes
89
+
90
+This section guides you through submitting a suggestion for Marlin, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
91
+
92
+Before creating a suggestion, please check [this list](#before-submitting-a-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](issue_template.md), including the steps that you imagine you would take if the feature you're requesting existed.
93
+
94
+#### Before Submitting a Feature Request
95
+
96
+* **Check the [Marlin website](http://marlinfw.org/)** for tips — you might discover that the feature is already included. Most importantly, check if you're using [the latest version of Marlin](https://github.com/MarlinFirmware/Marlin/releases) and if you can get the desired behavior by changing [Marlin's config settings](http://marlinfw.org/docs/configuration/configuration.html).
97
+* **Perform a [cursory search](https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue)** to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
98
+
99
+#### How Do I Submit A (Good) Feature Request?
100
+
101
+Feature Requests are tracked as [GitHub issues](https://guides.github.com/features/issues/). Please follow these guidelines in your request:
102
+
103
+* **Use a clear and descriptive title** for the issue to identify the suggestion.
104
+* **Provide a step-by-step description of the requested feature** in as much detail as possible.
105
+* **Provide specific examples to demonstrate the steps**.
106
+* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
107
+* **Include screenshots and links to videos** which demonstrate the feature or point out the part of Marlin to which the request is related.
108
+* **Explain why this feature would be useful** to most Marlin users.
109
+* **Name other firmwares that have this feature, if any.**
110
+
111
+### Your First Code Contribution
112
+
113
+Unsure where to begin contributing to Marlin? You can start by looking through these `good-first-issue` and `help-wanted` issues:
114
+
115
+* [Beginner issues][good-first-issue] - issues which should only require a few lines of code, and a test or two.
116
+* [Help Wanted issues][help-wanted] - issues which should be a bit more involved than `beginner` issues.
117
+
118
+### Pull Requests
119
+
120
+Pull Requests should always be targeted to working branches (e.g., `bugfix-1.1.x` and/or `bugfix-2.0.x`) and never to release branches (e.g., `1.1.x`). If this is your first Pull Request, please read our [Guide to Pull Requests](http://marlinfw.org/docs/development/getting_started_pull_requests.html) and Github's [Pull Request](https://help.github.com/articles/creating-a-pull-request/) documentation.
121
+
122
+* Fill in [the required template](pull_request_template.md).
123
+* Don't include issue numbers in the PR title.
124
+* Include pictures, diagrams, and links to videos in your Pull Request to demonstrate your changes, if needed.
125
+* Follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website.
126
+* Document new code with clear and concise comments.
127
+* End all files with a newline.
128
+
129
+## Styleguides
130
+
131
+### Git Commit Messages
132
+
133
+* Use the present tense ("Add feature" not "Added feature").
134
+* Use the imperative mood ("Move cursor to..." not "Moves cursor to...").
135
+* Limit the first line to 72 characters or fewer.
136
+* Reference issues and Pull Requests liberally after the first line.
137
+
138
+### C++ Coding Standards
139
+
140
+* Please read and follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) posted on our website. Failure to follow these guidelines will delay evaluation and acceptance of Pull Requests.
141
+
142
+### Documentation
143
+
144
+* Guidelines for documentation are still under development. In-general, be clear, concise, and to-the-point.

+ 11
- 31
.github/issue_template.md View File

@@ -1,36 +1,16 @@
1
-Thank you for submitting your feedback to the Marlin project.
2
-Please use one of the templates below to fill out this box.
1
+# NO SUPPORT REQUESTS PLEASE
3 2
 
4
-------------------------------------------------------------
5
-### Feature Request
6
-Please put [FR] in the issue title: `[FR] Add-on that goes 'ping'`
3
+Support Requests posted here will be automatically closed!
7 4
 
8
-------------------------------------------------------------
9
-### Compile Error
10
-When I compile with `FEATURE_X` I get an error:
11
-```
12
-Paste_the_error_text_here
13
-```
5
+This Issue Queue is for Marlin bug reports and development-related issues, and we prefer not to handle user-support questions here. See https://github.com/MarlinFirmware/Marlin/blob/1.1.x/.github/contributing.md#i-dont-want-to-read-this-whole-thing-i-just-have-a-question.
14 6
 
15
-------------------------------------------------------------
16
-### Bug Report
17
-- Description: ---
18
-- Expected behaviour: ---
19
-- Actual behaviour: ---
20
-- Steps to reproduce:
21
-  - Do this
22
-  - Do that
7
+For best results getting help with configuration and troubleshooting, please use the following resources:
23 8
 
24
-Attach a ZIP of `Configuration.h` and `Configuration_adv.h` by dropping here.
9
+- RepRap.org Marlin Forum http://forums.reprap.org/list.php?415
10
+- Tom's 3D Forums https://discuss.toms3d.org/
11
+- Facebook Group "Marlin Firmware" https://www.facebook.com/groups/1049718498464482/
12
+- Facebook Group "Marlin Firmware for 3D Printers" https://www.facebook.com/groups/3Dtechtalk/
13
+- Marlin Configuration https://www.youtube.com/results?search_query=marlin+configuration on YouTube
14
+- Marlin Discord server. Join link: https://discord.gg/n5NJ59y
25 15
 
26
-------------------------------------------------------------
27
-### Bug Report Tips
28
-- When troubleshooting, use `M502` followed by `M500` to reset EEPROM to defaults.
29
-- Use `DEBUG_LEVELING_FEATURE` with `M111 S247` for detailed logging of homing/leveling.
30
-- Format text with: **bold**, _italic_, `code`.
31
-- Format C++ with three backticks, plus "cpp":
32
-```cpp
33
-void my_function(bool do_it) {
34
-  // Hold this spot
35
-}
36
-```
16
+After seeking help from the community, if the consensus points to to a bug in Marlin, then you should post a Bug Report at https://github.com/MarlinFirmware/Marlin/issues/new/choose).

+ 19
- 0
.github/pull_request_template.md View File

@@ -0,0 +1,19 @@
1
+### Requirements
2
+
3
+* Filling out this template is required. Pull Requests without a clear description may be closed at the maintainers' discretion.
4
+
5
+### Description
6
+
7
+<!--
8
+
9
+We must be able to understand your proposed change from this description. If we can't understand what the code will do from this description, the Pull Request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code recently, so please walk us through the concepts.
10
+
11
+-->
12
+
13
+### Benefits
14
+
15
+<!-- What does this fix or improve? -->
16
+
17
+### Related Issues
18
+
19
+<!-- Whether this fixes a bug or fulfills a feature request, please list any related Issues here. -->

+ 7
- 0
.github/workflows/bad-target.md View File

@@ -0,0 +1,7 @@
1
+Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases.
2
+
3
+Please redo this PR starting with the `bugfix-2.0.x` branch and be careful to target `bugfix-2.0.x` when resubmitting the PR.
4
+
5
+It may help to set your fork's default branch to `bugfix-2.0.x`.
6
+
7
+See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.

+ 34
- 0
.github/workflows/bump-date.yml View File

@@ -0,0 +1,34 @@
1
+#
2
+# bump-date.yml
3
+# Bump the distribution date once per day
4
+#
5
+
6
+name: Bump Distribution Date
7
+
8
+on:
9
+  schedule:
10
+    - cron: '0 0 * * *'
11
+
12
+jobs:
13
+  bump_date:
14
+
15
+    runs-on: ubuntu-latest
16
+
17
+    steps:
18
+
19
+    - name: Check out bugfix-2.0.x
20
+      uses: actions/checkout@v2
21
+      with:
22
+        ref: bugfix-2.0.x
23
+
24
+    - name: Bump Distribution Date
25
+      run: |
26
+        # Inline Bump Script
27
+        [[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
28
+        DIST=$( date +"%Y-%m-%d" )
29
+        eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
30
+        git config user.name "${GITHUB_ACTOR}" && \
31
+        git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
32
+        git add . && \
33
+        git commit -m "[cron] Bump distribution date ($DIST)" && \
34
+        git push

+ 27
- 0
.github/workflows/check-pr.yml View File

@@ -0,0 +1,27 @@
1
+#
2
+# comment-pr.yml
3
+# Add a comment to any PR directed to a release branch
4
+#
5
+
6
+name: PR Bad Target
7
+
8
+on:
9
+  pull_request:
10
+    branches:
11
+    - 1.0.x
12
+    - 1.1.x
13
+    - 2.0.x
14
+
15
+jobs:
16
+  bad_target:
17
+
18
+    name: PR Bad Target
19
+    runs-on: ubuntu-latest
20
+
21
+    steps:
22
+      - uses: actions/checkout@v1
23
+      - uses: harupy/comment-on-pr@master
24
+        env:
25
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26
+        with:
27
+          filename: bad-target.md

+ 104
- 0
.github/workflows/test-builds.yml View File

@@ -0,0 +1,104 @@
1
+#
2
+# test-builds.yml
3
+# Do test builds to catch compile errors
4
+#
5
+
6
+name: CI
7
+
8
+on:
9
+  pull_request:
10
+    branches:
11
+    - bugfix-2.0.x
12
+    - dev-2.1.x
13
+    paths-ignore:
14
+    - config/**
15
+    - data/**
16
+    - docs/**
17
+    - '**/*.md'
18
+
19
+jobs:
20
+  test_builds:
21
+
22
+    runs-on: ubuntu-latest
23
+
24
+    strategy:
25
+      matrix:
26
+        test-platform:
27
+        # Base Environments
28
+
29
+        - DUE
30
+        - esp32
31
+        - linux_native
32
+        - mega2560
33
+        - teensy31
34
+        - teensy35
35
+        - SAMD51_grandcentral_m4
36
+
37
+        # Extended AVR Environments
38
+
39
+        - FYSETC_F6_13
40
+        - mega1280
41
+        - rambo
42
+        - sanguino1284p
43
+        - sanguino644p
44
+
45
+        # Extended STM32 Environments
46
+
47
+        - STM32F103RC_btt
48
+        - STM32F103RC_btt_USB
49
+        - STM32F103RE_btt
50
+        - STM32F103RE_btt_USB
51
+        - STM32F103RC_fysetc
52
+        - jgaurora_a5s_a1
53
+        - STM32F103VE_longer
54
+        - STM32F407VE_black
55
+        - BIGTREE_SKR_PRO
56
+        - BIGTREE_GTR_V1_0
57
+        - mks_robin
58
+        - ARMED
59
+        - FYSETC_S6
60
+
61
+        # Put lengthy tests last
62
+
63
+        - LPC1768
64
+        - LPC1769
65
+
66
+        # STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working.
67
+
68
+        #- STM32F4
69
+        #- STM32F7
70
+
71
+        # Non-working environment tests
72
+
73
+        #- BIGTREE_BTT002
74
+        #- at90usb1286_cdc
75
+        #- at90usb1286_dfu
76
+        #- STM32F103CB_malyan
77
+        #- mks_robin_lite
78
+        #- mks_robin_mini
79
+        #- mks_robin_nano
80
+
81
+    steps:
82
+
83
+    - name: Select Python 3.7
84
+      uses: actions/setup-python@v1
85
+      with:
86
+        python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
87
+        architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
88
+
89
+    - name: Install PlatformIO
90
+      run: |
91
+        pip install -U https://github.com/platformio/platformio-core/archive/master.zip
92
+        platformio update
93
+
94
+    - name: Check out the PR
95
+      uses: actions/checkout@v2
96
+
97
+    - name: Run ${{ matrix.test-platform }} Tests
98
+      run: |
99
+        # Inline tests script
100
+        [[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
101
+        chmod +x buildroot/bin/*
102
+        chmod +x buildroot/share/tests/*
103
+        export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH}
104
+        run_tests . ${{ matrix.test-platform }}

+ 47
- 6
.gitignore View File

@@ -1,9 +1,9 @@
1 1
 #
2 2
 # Marlin 3D Printer Firmware
3
-# Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+# Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
 #
5 5
 # Based on Sprinter and grbl.
6
-# Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
6
+# Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7 7
 #
8 8
 # This program is free software: you can redistribute it and/or modify
9 9
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,6 @@ _Version.h
29 29
 applet/
30 30
 *.DS_Store
31 31
 
32
-
33 32
 #
34 33
 # Misc
35 34
 #
@@ -120,11 +119,40 @@ tags
120 119
 .pio*
121 120
 .pioenvs
122 121
 .piolibdeps
123
-lib/readme.txt
122
+.clang_complete
123
+.gcc-flags.json
124
+/lib/
125
+
126
+# Workaround for Deviot+platformio quirks
127
+Marlin/lib
128
+Marlin/platformio.ini
129
+Marlin/*/platformio.ini
130
+Marlin/*/*/platformio.ini
131
+Marlin/*/*/*/platformio.ini
132
+Marlin/*/*/*/*/platformio.ini
133
+Marlin/.travis.yml
134
+Marlin/*/.travis.yml
135
+Marlin/*/*/.travis.yml
136
+Marlin/*/*/*/.travis.yml
137
+Marlin/*/*/*/*/.travis.yml
138
+Marlin/.gitignore
139
+Marlin/*/.gitignore
140
+Marlin/*/*/.gitignore
141
+Marlin/*/*/*/.gitignore
142
+Marlin/*/*/*/*/.gitignore
143
+Marlin/readme.txt
144
+Marlin/*/readme.txt
145
+Marlin/*/*/readme.txt
146
+Marlin/*/*/*/readme.txt
147
+Marlin/*/*/*/*/readme.txt
148
+
149
+# Secure Credentials
150
+Configuration_Secure.h
124 151
 
125 152
 #Visual Studio
126 153
 *.sln
127 154
 *.vcxproj
155
+*.vcxproj.user
128 156
 *.vcxproj.filters
129 157
 Release/
130 158
 Debug/
@@ -132,14 +160,27 @@ __vm/
132 160
 .vs/
133 161
 vc-fileutils.settings
134 162
 
135
-#VScode
163
+#Visual Studio Code
136 164
 .vscode
165
+.vscode/.browse.c_cpp.db*
137 166
 .vscode/c_cpp_properties.json
167
+.vscode/launch.json
168
+.vscode/*.db
138 169
 
139 170
 #cmake
140 171
 CMakeLists.txt
141
-Marlin/CMakeLists.txt
172
+src/CMakeLists.txt
142 173
 CMakeListsPrivate.txt
143 174
 
144 175
 #CLion
145 176
 cmake-build-*
177
+
178
+#Eclipse
179
+.project
180
+.cproject
181
+.pydevproject
182
+.settings
183
+.classpath
184
+
185
+#Python
186
+__pycache__

+ 0
- 371
.travis.yml View File

@@ -1,371 +0,0 @@
1
-dist: trusty
2
-sudo: true
3
-  #
4
-language: c
5
-  #
6
-notifications:
7
-  email: false
8
-  #
9
-before_install:
10
-  #
11
-  # Fetch the tag information for the current branch
12
-  - git fetch origin --tags
13
-  #
14
-  # Publish the buildroot script folder
15
-  - chmod +x ${TRAVIS_BUILD_DIR}/buildroot/bin/*
16
-  - export PATH=${TRAVIS_BUILD_DIR}/buildroot/bin/:${PATH}
17
-  #
18
-  # Start fb X server
19
-  - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16"
20
-  - sleep 3
21
-  - export DISPLAY=:1.0
22
-  #
23
-install:
24
-  #
25
-  # Install arduino 1.6.10
26
-  - wget http://downloads-02.arduino.cc/arduino-1.6.10-linux64.tar.xz
27
-  - tar xf arduino-1.6.10-linux64.tar.xz
28
-  - sudo mv arduino-1.6.10 /usr/local/share/arduino
29
-  - ln -s /usr/local/share/arduino/arduino ${TRAVIS_BUILD_DIR}/buildroot/bin/arduino
30
-  #
31
-  # Install: LiquidCrystal_I2C library
32
-  - git clone https://github.com/kiyoshigawa/LiquidCrystal_I2C.git
33
-  - mv LiquidCrystal_I2C/LiquidCrystal_I2C /usr/local/share/arduino/libraries/LiquidCrystal_I2C
34
-  #
35
-  # Install: LiquidTWI2 library
36
-  - git clone https://github.com/lincomatic/LiquidTWI2.git
37
-  - sudo mv LiquidTWI2 /usr/local/share/arduino/libraries/LiquidTWI2
38
-  #
39
-  # Install: Monochrome Graphics Library for LCDs and OLEDs
40
-  - git clone https://github.com/olikraus/U8glib_Arduino.git
41
-  - sudo mv U8glib_Arduino /usr/local/share/arduino/libraries/U8glib
42
-  #
43
-  # Install: L6470 Stepper Motor Driver library
44
-  # - git clone https://github.com/ameyer/Arduino-L6470.git
45
-  # - sudo mv Arduino-L6470/L6470 /usr/local/share/arduino/libraries/L6470
46
-  #
47
-  # Install: TMC26X Stepper Motor Controller library
48
-  # - git clone https://github.com/trinamic/TMC26XStepper.git
49
-  # - sudo mv TMC26XStepper /usr/local/share/arduino/libraries/TMC26XStepper
50
-  #
51
-  # Install: TMC2130 Stepper Motor Controller library
52
-  - git clone https://github.com/teemuatlut/TMC2130Stepper.git
53
-  - sudo mv TMC2130Stepper /usr/local/share/arduino/libraries/TMC2130Stepper
54
-  #
55
-  # Install: TMC2208 Stepper Motor Controller library
56
-  - git clone https://github.com/teemuatlut/TMC2208Stepper.git
57
-  - sudo mv TMC2208Stepper /usr/local/share/arduino/libraries/TMC2208Stepper
58
-  #
59
-  # Install: Adafruit Neopixel library
60
-  - git clone https://github.com/adafruit/Adafruit_NeoPixel.git
61
-  - sudo mv Adafruit_NeoPixel /usr/local/share/arduino/libraries/Adafruit_NeoPixel
62
-  #
63
-before_script:
64
-  #
65
-  # Change current working directory to the build dir
66
-  - cd ${TRAVIS_BUILD_DIR}
67
-  #
68
-  # Generate custom version include
69
-  - generate_version_header_for_marlin ${TRAVIS_BUILD_DIR}/Marlin
70
-  - cat ${TRAVIS_BUILD_DIR}/Marlin/_Version.h
71
-  #
72
-script:
73
-  #
74
-  # Backup Configuration.h, Configuration_adv.h, and pins_RAMPS.h
75
-  #
76
-  - cp Marlin/Configuration.h Marlin/Configuration.h.backup
77
-  - cp Marlin/Configuration_adv.h Marlin/Configuration_adv.h.backup
78
-  - cp Marlin/pins_RAMPS.h Marlin/pins_RAMPS.h.backup
79
-  #
80
-  # Build with the default configurations
81
-  #
82
-  - build_marlin
83
-  #
84
-  # Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
85
-  # Test a "Fix Mounted" Probe with Safe Homing, some arc options,
86
-  # linear bed leveling, M48, leveling debug, and firmware retraction.
87
-  #
88
-  - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
89
-  - opt_set EXTRUDERS 2
90
-  - opt_set TEMP_SENSOR_0 -2
91
-  - opt_set TEMP_SENSOR_1 1
92
-  - opt_set TEMP_SENSOR_BED 1
93
-  - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS
94
-  - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
95
-  - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_LED
96
-  - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
97
-  - opt_enable_adv FWRETRACT MAX7219_DEBUG LED_CONTROL_MENU
98
-  - opt_set ABL_GRID_POINTS_X 16
99
-  - opt_set ABL_GRID_POINTS_Y 16
100
-  - opt_set_adv FANMUX0_PIN 53
101
-  - build_marlin
102
-  #
103
-  # Test a probeless build of AUTO_BED_LEVELING_UBL
104
-  #
105
-  - restore_configs
106
-  - opt_enable AUTO_BED_LEVELING_UBL DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS EEPROM_CHITCHAT G3D_PANEL
107
-  - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING NANODLP_Z_SYNC
108
-  - build_marlin
109
-  #
110
-  # Add a Sled Z Probe, use UBL Cartesian moves
111
-  #
112
-  - opt_enable Z_PROBE_SLED SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE
113
-  - opt_disable SEGMENT_LEVELED_MOVES
114
-  - opt_enable_adv BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING
115
-  - build_marlin
116
-  #
117
-  # Test a Servo Probe
118
-  # ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
119
-  #
120
-  - restore_configs
121
-  - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
122
-  - opt_set NUM_SERVOS 1
123
-  - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
124
-  - opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
125
-  - build_marlin
126
-  #
127
-  # Test MESH_BED_LEVELING feature, with LCD
128
-  #
129
-  - restore_configs
130
-  - opt_enable MESH_BED_LEVELING G26_MESH_EDITING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
131
-  - build_marlin
132
-  #
133
-  # Test MINIRAMBO for PWM_MOTOR_CURRENT
134
-  #      PROBE_MANUALLY feature, with LCD support,
135
-  #      ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
136
-  #      PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
137
-  #      Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
138
-  #      ADVANCED_PAUSE_FEATURE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
139
-  #      EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
140
-  #      INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
141
-  #
142
-  - restore_configs
143
-  - opt_set MOTHERBOARD BOARD_MINIRAMBO
144
-  - opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR G26_MESH_EDITING LCD_BED_LEVELING ULTIMAKERCONTROLLER
145
-  - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
146
-  - opt_enable ULTIMAKERCONTROLLER SDSUPPORT
147
-  - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632 USE_XMAX_PLUG
148
-  - opt_enable_adv BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
149
-  - opt_enable_adv ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU M114_DETAIL
150
-  - opt_set_adv PWM_MOTOR_CURRENT {1300,1300,1250}
151
-  - opt_set_adv I2C_SLAVE_ADDRESS 63
152
-  - build_marlin
153
-  #
154
-  # Test 5 extruders on AZTEEG_X3_PRO (can use any board with >=5 extruders defined)
155
-  # Include a test for LIN_ADVANCE here also
156
-  #
157
-  - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
158
-  - opt_set EXTRUDERS 5
159
-  - opt_set TEMP_SENSOR_1 1
160
-  - opt_set TEMP_SENSOR_2 5
161
-  - opt_set TEMP_SENSOR_3 20
162
-  - opt_set TEMP_SENSOR_4 999
163
-  - opt_set TEMP_SENSOR_BED 1
164
-  - opt_enable_adv LIN_ADVANCE
165
-  - build_marlin
166
-  #
167
-  # Mixing Extruder with 5 steppers
168
-  #
169
-  - restore_configs
170
-  - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
171
-  - opt_enable MIXING_EXTRUDER
172
-  - opt_set MIXING_STEPPERS 5
173
-  - build_marlin
174
-  #
175
-  # Test DUAL_X_CARRIAGE
176
-  #
177
-  - restore_configs
178
-  - opt_set MOTHERBOARD BOARD_RUMBA
179
-  - opt_set EXTRUDERS 2
180
-  - opt_set TEMP_SENSOR_1 1
181
-  - opt_enable USE_XMAX_PLUG
182
-  - opt_enable_adv DUAL_X_CARRIAGE
183
-  - build_marlin
184
-  #
185
-  # Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER
186
-  #
187
-  - restore_configs
188
-  - opt_set MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D
189
-  - opt_set LCD_FEEDBACK_FREQUENCY_DURATION_MS 10
190
-  - opt_set LCD_FEEDBACK_FREQUENCY_HZ 100
191
-  - opt_enable BQ_LCD_SMART_CONTROLLER SPEAKER
192
-  #
193
-  # Test SWITCHING_EXTRUDER
194
-  #
195
-  - restore_configs
196
-  - opt_set MOTHERBOARD BOARD_RUMBA
197
-  - opt_set EXTRUDERS 2
198
-  - opt_enable NUM_SERVOS
199
-  - opt_set NUM_SERVOS 1
200
-  - opt_set TEMP_SENSOR_1 1
201
-  - opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
202
-  - build_marlin
203
-  #
204
-  # Enable COREXY
205
-  #
206
-  - restore_configs
207
-  - opt_enable COREXY
208
-  - build_marlin
209
-  #
210
-  # Test many less common options
211
-  #
212
-  - restore_configs
213
-  - opt_enable COREYX
214
-  - opt_set_adv FAN_MIN_PWM 50
215
-  - opt_set_adv FAN_KICKSTART_TIME 100
216
-  - opt_set_adv XY_FREQUENCY_LIMIT  15
217
-  - opt_enable_adv SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER FAN_KICKSTART_TIME
218
-  - opt_enable_adv ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED ADVANCED_OK
219
-  - opt_enable_adv VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS ACTION_ON_KILL
220
-  - opt_enable_adv EXTRA_FAN_SPEED FWERETRACT Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS
221
-  - opt_enable_adv MENU_ADDAUTOSTART SDCARD_SORT_ALPHA
222
-  - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER
223
-  - opt_enable FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR
224
-  - opt_enable ENDSTOP_INTERRUPTS_FEATURE FAN_SOFT_PWM SDSUPPORT
225
-  - opt_enable USE_XMAX_PLUG
226
-  - build_marlin
227
-  #
228
-  ######## Other Standard LCD/Panels ##############
229
-  #
230
-  # ULTRA_LCD
231
-  #
232
-  - restore_configs
233
-  - opt_enable ULTRA_LCD
234
-  - build_marlin
235
-  #
236
-  # DOGLCD
237
-  #
238
-  - restore_configs
239
-  - opt_enable DOGLCD
240
-  - build_marlin
241
-  #
242
-  # MAKRPANEL
243
-  # Needs to use Melzi and Sanguino hardware
244
-  #
245
-  #- restore_configs
246
-  #- opt_enable MAKRPANEL
247
-  #- build_marlin
248
-  #
249
-  # REPRAP_DISCOUNT_SMART_CONTROLLER, SDSUPPORT, BABYSTEPPING, RIGIDBOARD_V2, and DAC_MOTOR_CURRENT_DEFAULT
250
-  #
251
-  - restore_configs
252
-  - opt_set MOTHERBOARD BOARD_RIGIDBOARD_V2
253
-  - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING DAC_MOTOR_CURRENT_DEFAULT
254
-  - build_marlin
255
-  #
256
-  # G3D_PANEL with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
257
-  #
258
-  - restore_configs
259
-  - opt_enable G3D_PANEL SDSUPPORT
260
-  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
261
-  - opt_set_adv SDSORT_GCODE true
262
-  - opt_set_adv SDSORT_USES_RAM true
263
-  - opt_set_adv SDSORT_USES_STACK true
264
-  - opt_set_adv SDSORT_CACHE_NAMES true
265
-  - build_marlin
266
-  #
267
-  # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
268
-  #
269
-  - restore_configs
270
-  - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
271
-  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
272
-  - build_marlin
273
-  #
274
-  # REPRAPWORLD_KEYPAD
275
-  #
276
-  # Cant find configuration details to get it to compile
277
-  #- restore_configs
278
-  #- opt_enable ULTRA_LCD REPRAPWORLD_KEYPAD REPRAPWORLD_KEYPAD_MOVE_STEP
279
-  #- build_marlin
280
-  #
281
-  # RA_CONTROL_PANEL
282
-  #
283
-  - restore_configs
284
-  - opt_enable RA_CONTROL_PANEL PINS_DEBUGGING
285
-  - build_marlin
286
-  #
287
-  ######## I2C LCD/PANELS ##############
288
-  #
289
-  # !!!ATTENTION!!!
290
-  # Most I2C configurations are failing at the moment because they require
291
-  # a different Liquid Crystal library "LiquidTWI2".
292
-  #
293
-  # LCD_I2C_SAINSMART_YWROBOT
294
-  #
295
-  #- restore_configs
296
-  #- opt_enable LCD_I2C_SAINSMART_YWROBOT
297
-  #- build_marlin
298
-  #
299
-  # LCD_I2C_PANELOLU2
300
-  #
301
-  #- restore_configs
302
-  #- opt_enable LCD_I2C_PANELOLU2
303
-  #- build_marlin
304
-  #
305
-  # LCD_I2C_VIKI
306
-  #
307
-  #- restore_configs
308
-  #- opt_enable LCD_I2C_VIKI
309
-  #- build_marlin
310
-  #
311
-  # LCM1602
312
-  #
313
-  - restore_configs
314
-  - opt_enable LCM1602
315
-  - build_marlin
316
-  #
317
-  #
318
-  ######## Example Configurations ##############
319
-  #
320
-  # BQ Hephestos 2
321
-  #- restore_configs
322
-  #- use_example_configs Hephestos_2
323
-  #- build_marlin
324
-  #
325
-  # Delta Config (generic) + ABL bilinear + PROBE_MANUALLY
326
-  - use_example_configs delta/generic
327
-  - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY
328
-  - build_marlin
329
-  #
330
-  # Delta Config (generic) + UBL + ALLEN_KEY + OLED_PANEL_TINYBOY2 + EEPROM_SETTINGS
331
-  #
332
-  - use_example_configs delta/generic
333
-  - opt_disable DISABLE_MIN_ENDSTOPS
334
-  - opt_enable AUTO_BED_LEVELING_UBL Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY
335
-  - build_marlin
336
-  #
337
-  # Delta Config (FLSUN AC because it's complex)
338
-  #
339
-  - use_example_configs delta/FLSUN/auto_calibrate
340
-  - build_marlin
341
-  #
342
-  # Makibox Config  need to check board type for Teensy++ 2.0
343
-  #
344
-  #- use_example_configs makibox
345
-  #- build_marlin
346
-  #
347
-  # SCARA with TMC2130
348
-  #
349
-  - use_example_configs SCARA
350
-  - opt_enable AUTO_BED_LEVELING_BILINEAR FIX_MOUNTED_PROBE USE_ZMIN_PLUG EEPROM_SETTINGS EEPROM_CHITCHAT ULTIMAKERCONTROLLER
351
-  - opt_enable_adv HAVE_TMC2130 X_IS_TMC2130 Y_IS_TMC2130 Z_IS_TMC2130
352
-  - opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD TMC_DEBUG SENSORLESS_HOMING
353
-  - build_marlin
354
-  #
355
-  # TMC2208 Config
356
-  #
357
-  - restore_configs
358
-  - opt_enable_adv HAVE_TMC2208 X_IS_TMC2208 Y_IS_TMC2208 Z_IS_TMC2208
359
-  - opt_enable_adv MONITOR_DRIVER_STATUS STEALTHCHOP HYBRID_THRESHOLD TMC_DEBUG
360
-  - build_marlin
361
-  #
362
-  # tvrrug Config need to check board type for sanguino atmega644p
363
-  #
364
-  #- use_example_configs tvrrug/Round2
365
-  #- build_marlin
366
-  #
367
-  #
368
-  ######## Board Types #############
369
-  #
370
-  # To be added in nightly test branch
371
-  #

+ 3
- 3
LICENSE View File

@@ -3,7 +3,7 @@
3 3
                     GNU GENERAL PUBLIC LICENSE
4 4
                        Version 3, 29 June 2007
5 5
 
6
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
6
+ Copyright (c) 2007 Free Software Foundation, Inc. <http://fsf.org/>
7 7
  Everyone is permitted to copy and distribute verbatim copies
8 8
  of this license document, but changing it is not allowed.
9 9
 
@@ -634,7 +634,7 @@ state the exclusion of warranty; and each file should have at least
634 634
 the "copyright" line and a pointer to where the full notice is found.
635 635
 
636 636
     {one line to give the program's name and a brief idea of what it does.}
637
-    Copyright (C) {year}  {name of author}
637
+    Copyright (c) {year}  {name of author}
638 638
 
639 639
     This program is free software: you can redistribute it and/or modify
640 640
     it under the terms of the GNU General Public License as published by
@@ -654,7 +654,7 @@ Also add information on how to contact you by electronic and paper mail.
654 654
   If the program does terminal interaction, make it output a short
655 655
 notice like this when it starts in an interactive mode:
656 656
 
657
-    {project}  Copyright (C) {year}  {fullname}
657
+    {project}  Copyright (c) {year}  {fullname}
658 658
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
659 659
     This is free software, and you are welcome to redistribute it
660 660
     under certain conditions; type `show c' for details.

+ 0
- 27
Marlin/Conditionals.h View File

@@ -1,27 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Conditionals.h
25
- * OBSOLETE: Replaced by Conditionals_LCD.h and Conditionals_post.h
26
- */
27
-#error "Old configurations? Please delete all #include lines from Configuration.h and Configuration_adv.h."

+ 0
- 473
Marlin/Conditionals_LCD.h View File

@@ -1,473 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Conditionals_LCD.h
25
- * Conditionals that need to be set before Configuration_adv.h or pins.h
26
- */
27
-
28
-#ifndef CONDITIONALS_LCD_H // Get the LCD defines which are needed first
29
-#define CONDITIONALS_LCD_H
30
-
31
-  #define LCD_HAS_DIRECTIONAL_BUTTONS (BUTTON_EXISTS(UP) || BUTTON_EXISTS(DWN) || BUTTON_EXISTS(LFT) || BUTTON_EXISTS(RT))
32
-
33
-  #if ENABLED(CARTESIO_UI)
34
-
35
-    #define DOGLCD
36
-    #define ULTIPANEL
37
-    #define DEFAULT_LCD_CONTRAST 90
38
-    #define LCD_CONTRAST_MIN 60
39
-    #define LCD_CONTRAST_MAX 140
40
-
41
-  #elif ENABLED(MAKRPANEL)
42
-
43
-    #define U8GLIB_ST7565_64128N
44
-
45
-  #elif ENABLED(ZONESTAR_LCD)
46
-
47
-    #define REPRAPWORLD_KEYPAD
48
-    #define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
49
-    #define ADC_KEYPAD
50
-    #define ADC_KEY_NUM 8
51
-    #define ULTIPANEL
52
-
53
-    // this helps to implement ADC_KEYPAD menus
54
-    #define ENCODER_PULSES_PER_STEP 1
55
-    #define ENCODER_STEPS_PER_MENU_ITEM 1
56
-    #define ENCODER_FEEDRATE_DEADZONE 2
57
-    #define REVERSE_MENU_DIRECTION
58
-
59
-  #elif ENABLED(ANET_FULL_GRAPHICS_LCD)
60
-
61
-    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
62
-
63
-  #elif ENABLED(BQ_LCD_SMART_CONTROLLER)
64
-
65
-    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
66
-
67
-  #elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
68
-
69
-    #define ULTRA_LCD  //general LCD support, also 16x2
70
-    #define DOGLCD  // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
71
-    #define ULTIMAKERCONTROLLER //as available from the Ultimaker online store.
72
-
73
-    #if ENABLED(miniVIKI)
74
-      #define LCD_CONTRAST_MIN      75
75
-      #define LCD_CONTRAST_MAX     115
76
-      #define DEFAULT_LCD_CONTRAST  95
77
-      #define U8GLIB_ST7565_64128N
78
-    #elif ENABLED(VIKI2)
79
-      #define LCD_CONTRAST_MIN       0
80
-      #define LCD_CONTRAST_MAX     255
81
-      #define DEFAULT_LCD_CONTRAST 140
82
-      #define U8GLIB_ST7565_64128N
83
-    #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
84
-      #define LCD_CONTRAST_MIN      90
85
-      #define LCD_CONTRAST_MAX     130
86
-      #define DEFAULT_LCD_CONTRAST 110
87
-      #define U8GLIB_LM6059_AF
88
-      #define SD_DETECT_INVERTED
89
-    #endif
90
-
91
-  #elif ENABLED(OLED_PANEL_TINYBOY2)
92
-
93
-    #define U8GLIB_SSD1306
94
-    #define ULTIPANEL
95
-    #define REVERSE_ENCODER_DIRECTION
96
-    #define REVERSE_MENU_DIRECTION
97
-
98
-  #elif ENABLED(RA_CONTROL_PANEL)
99
-
100
-    #define LCD_I2C_TYPE_PCA8574
101
-    #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
102
-    #define ULTIPANEL
103
-
104
-  #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
105
-
106
-    #define DOGLCD
107
-    #define U8GLIB_ST7920
108
-    #define ULTIPANEL
109
-
110
-  #elif ENABLED(CR10_STOCKDISPLAY)
111
-
112
-    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
113
-    #ifndef ST7920_DELAY_1
114
-      #define ST7920_DELAY_1 DELAY_2_NOP
115
-    #endif
116
-    #ifndef ST7920_DELAY_2
117
-      #define ST7920_DELAY_2 DELAY_2_NOP
118
-    #endif
119
-    #ifndef ST7920_DELAY_3
120
-      #define ST7920_DELAY_3 DELAY_2_NOP
121
-    #endif
122
-
123
-  #elif ENABLED(MKS_12864OLED)
124
-
125
-    #define REPRAP_DISCOUNT_SMART_CONTROLLER
126
-    #define U8GLIB_SH1106
127
-
128
-  #elif ENABLED(MKS_MINI_12864)
129
-
130
-    #define MINIPANEL
131
-
132
-  #endif
133
-
134
-  #if ENABLED(MAKRPANEL) || ENABLED(MINIPANEL)
135
-    #define DOGLCD
136
-    #define ULTIPANEL
137
-    #define DEFAULT_LCD_CONTRAST 17
138
-  #endif
139
-
140
-  // Generic support for SSD1306 / SH1106 OLED based LCDs.
141
-  #if ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106)
142
-    #define ULTRA_LCD  //general LCD support, also 16x2
143
-    #define DOGLCD  // Support for I2C LCD 128x64 (Controller SSD1306 / SH1106 graphic Display Family)
144
-  #endif
145
-
146
-  #if ENABLED(PANEL_ONE) || ENABLED(U8GLIB_SH1106)
147
-
148
-    #define ULTIMAKERCONTROLLER
149
-
150
-  #elif ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
151
-
152
-    #define REPRAP_DISCOUNT_SMART_CONTROLLER
153
-    #define LCD_WIDTH 16
154
-    #define LCD_HEIGHT 2
155
-
156
-  #endif
157
-
158
-  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) || ENABLED(LCD_FOR_MELZI) || ENABLED(SILVER_GATE_GLCD_CONTROLLER)
159
-    #define DOGLCD
160
-    #define U8GLIB_ST7920
161
-    #define REPRAP_DISCOUNT_SMART_CONTROLLER
162
-  #endif
163
-
164
-  #if ENABLED(ULTIMAKERCONTROLLER)              \
165
-   || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
166
-   || ENABLED(G3D_PANEL)                        \
167
-   || ENABLED(RIGIDBOT_PANEL)
168
-    #define ULTIPANEL
169
-  #endif
170
-
171
-  #if ENABLED(REPRAPWORLD_KEYPAD)
172
-    #define NEWPANEL
173
-    #if ENABLED(ULTIPANEL) && !defined(REPRAPWORLD_KEYPAD_MOVE_STEP)
174
-      #define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
175
-    #endif
176
-  #endif
177
-
178
-  /**
179
-   * I2C PANELS
180
-   */
181
-
182
-  #if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
183
-
184
-    // Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
185
-    // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
186
-
187
-    #define LCD_I2C_TYPE_PCF8575
188
-    #define LCD_I2C_ADDRESS 0x27   // I2C Address of the port expander
189
-    #define ULTIPANEL
190
-
191
-  #elif ENABLED(LCD_I2C_PANELOLU2)
192
-
193
-    // PANELOLU2 LCD with status LEDs, separate encoder and click inputs
194
-
195
-    #define LCD_I2C_TYPE_MCP23017
196
-    #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
197
-    #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
198
-    #define ULTIPANEL
199
-
200
-  #elif ENABLED(LCD_I2C_VIKI)
201
-
202
-    /**
203
-     * Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
204
-     *
205
-     * This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 )
206
-     * Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory.
207
-     * Note: The pause/stop/resume LCD button pin should be connected to the Arduino
208
-     *       BTN_ENC pin (or set BTN_ENC to -1 if not used)
209
-     */
210
-    #define LCD_I2C_TYPE_MCP23017
211
-    #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
212
-    #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
213
-    #define ULTIPANEL
214
-
215
-    #define ENCODER_FEEDRATE_DEADZONE 4
216
-
217
-    #define STD_ENCODER_PULSES_PER_STEP 1
218
-    #define STD_ENCODER_STEPS_PER_MENU_ITEM 2
219
-
220
-  #elif ENABLED(G3D_PANEL)
221
-
222
-    #define STD_ENCODER_PULSES_PER_STEP 2
223
-    #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
224
-
225
-  #elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
226
-     || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
227
-     || ENABLED(OLED_PANEL_TINYBOY2) \
228
-     || ENABLED(BQ_LCD_SMART_CONTROLLER) \
229
-     || ENABLED(LCD_I2C_PANELOLU2) \
230
-     || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
231
-    #define STD_ENCODER_PULSES_PER_STEP 4
232
-    #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
233
-  #endif
234
-
235
-  #ifndef STD_ENCODER_PULSES_PER_STEP
236
-    #define STD_ENCODER_PULSES_PER_STEP 5
237
-  #endif
238
-  #ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
239
-    #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
240
-  #endif
241
-  #ifndef ENCODER_PULSES_PER_STEP
242
-    #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
243
-  #endif
244
-  #ifndef ENCODER_STEPS_PER_MENU_ITEM
245
-    #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
246
-  #endif
247
-  #ifndef ENCODER_FEEDRATE_DEADZONE
248
-    #define ENCODER_FEEDRATE_DEADZONE 6
249
-  #endif
250
-
251
-  // Shift register panels
252
-  // ---------------------
253
-  // 2 wire Non-latching LCD SR from:
254
-  // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
255
-
256
-  #if ENABLED(SAV_3DLCD)
257
-    #define SR_LCD_2W_NL    // Non latching 2 wire shift register
258
-    #define ULTIPANEL
259
-  #endif
260
-
261
-  #if ENABLED(DOGLCD) // Change number of lines to match the DOG graphic display
262
-    #ifndef LCD_WIDTH
263
-      #define LCD_WIDTH 22
264
-    #endif
265
-    #ifndef LCD_HEIGHT
266
-      #define LCD_HEIGHT 5
267
-    #endif
268
-  #endif
269
-
270
-  #if ENABLED(ULTIPANEL)
271
-    #define NEWPANEL  // Disable this if you actually have no click-encoder panel
272
-    #define ULTRA_LCD
273
-    #ifndef LCD_WIDTH
274
-      #define LCD_WIDTH 20
275
-    #endif
276
-    #ifndef LCD_HEIGHT
277
-      #define LCD_HEIGHT 4
278
-    #endif
279
-  #elif ENABLED(ULTRA_LCD)  // no panel but just LCD
280
-    #ifndef LCD_WIDTH
281
-      #define LCD_WIDTH 16
282
-    #endif
283
-    #ifndef LCD_HEIGHT
284
-      #define LCD_HEIGHT 2
285
-    #endif
286
-  #endif
287
-
288
-  #if ENABLED(DOGLCD)
289
-    /* Custom characters defined in font dogm_font_data_Marlin_symbols.h / Marlin_symbols.fon */
290
-    // \x00 intentionally skipped to avoid problems in strings
291
-    #define LCD_STR_REFRESH     "\x01"
292
-    #define LCD_STR_FOLDER      "\x02"
293
-    #define LCD_STR_ARROW_RIGHT "\x03"
294
-    #define LCD_STR_UPLEVEL     "\x04"
295
-    #define LCD_STR_CLOCK       "\x05"
296
-    #define LCD_STR_FEEDRATE    "\x06"
297
-    #define LCD_STR_BEDTEMP     "\x07"
298
-    #define LCD_STR_THERMOMETER "\x08"
299
-    #define LCD_STR_DEGREE      "\x09"
300
-
301
-    #define LCD_STR_SPECIAL_MAX '\x09'
302
-    // Maximum here is 0x1F because 0x20 is ' ' (space) and the normal charsets begin.
303
-    // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
304
-
305
-    // Symbol characters
306
-    #define LCD_STR_FILAM_DIA   "\xf8"
307
-    #define LCD_STR_FILAM_MUL   "\xa4"
308
-  #else
309
-    // Custom characters defined in the first 8 characters of the LCD
310
-    #define LCD_BEDTEMP_CHAR     0x00  // Print only as a char. This will have 'unexpected' results when used in a string!
311
-    #define LCD_DEGREE_CHAR      0x01
312
-    #define LCD_STR_THERMOMETER "\x02" // Still used with string concatenation
313
-    #define LCD_UPLEVEL_CHAR     0x03
314
-    #define LCD_STR_REFRESH     "\x04"
315
-    #define LCD_STR_FOLDER      "\x05"
316
-    #define LCD_FEEDRATE_CHAR    0x06
317
-    #define LCD_CLOCK_CHAR       0x07
318
-    #define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
319
-  #endif
320
-
321
-  /**
322
-   * Default LCD contrast for dogm-like LCD displays
323
-   */
324
-  #if ENABLED(DOGLCD)
325
-
326
-    #define HAS_LCD_CONTRAST ( \
327
-        ENABLED(MAKRPANEL) \
328
-     || ENABLED(CARTESIO_UI) \
329
-     || ENABLED(VIKI2) \
330
-     || ENABLED(miniVIKI) \
331
-     || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
332
-    )
333
-
334
-    #if HAS_LCD_CONTRAST
335
-      #ifndef LCD_CONTRAST_MIN
336
-        #define LCD_CONTRAST_MIN 0
337
-      #endif
338
-      #ifndef LCD_CONTRAST_MAX
339
-        #define LCD_CONTRAST_MAX 63
340
-      #endif
341
-      #ifndef DEFAULT_LCD_CONTRAST
342
-        #define DEFAULT_LCD_CONTRAST 32
343
-      #endif
344
-    #endif
345
-  #endif
346
-
347
-  // Boot screens
348
-  #if DISABLED(ULTRA_LCD)
349
-    #undef SHOW_BOOTSCREEN
350
-  #elif !defined(BOOTSCREEN_TIMEOUT)
351
-    #define BOOTSCREEN_TIMEOUT 2500
352
-  #endif
353
-
354
-  #define HAS_DEBUG_MENU ENABLED(LCD_PROGRESS_BAR_TEST)
355
-
356
-  // MK2 Multiplexer forces SINGLENOZZLE to be enabled
357
-  #if ENABLED(MK2_MULTIPLEXER)
358
-    #define SINGLENOZZLE
359
-  #endif
360
-
361
-  /**
362
-   * Extruders have some combination of stepper motors and hotends
363
-   * so we separate these concepts into the defines:
364
-   *
365
-   *  EXTRUDERS    - Number of Selectable Tools
366
-   *  HOTENDS      - Number of hotends, whether connected or separate
367
-   *  E_STEPPERS   - Number of actual E stepper motors
368
-   *  E_MANUAL     - Number of E steppers for LCD move options
369
-   *  TOOL_E_INDEX - Index to use when getting/setting the tool state
370
-   *
371
-   */
372
-  #if ENABLED(SINGLENOZZLE) || ENABLED(MIXING_EXTRUDER)         // One hotend, one thermistor, no XY offset
373
-    #define HOTENDS       1
374
-    #undef TEMP_SENSOR_1_AS_REDUNDANT
375
-    #undef HOTEND_OFFSET_X
376
-    #undef HOTEND_OFFSET_Y
377
-  #else                                                         // Two hotends
378
-    #define HOTENDS       EXTRUDERS
379
-    #if ENABLED(SWITCHING_NOZZLE) && !defined(HOTEND_OFFSET_Z)
380
-      #define HOTEND_OFFSET_Z { 0 }
381
-    #endif
382
-  #endif
383
-
384
-  #if ENABLED(SWITCHING_EXTRUDER) || ENABLED(MIXING_EXTRUDER)   // Unified E axis
385
-    #if ENABLED(MIXING_EXTRUDER)
386
-      #define E_STEPPERS  MIXING_STEPPERS
387
-    #else
388
-      #define E_STEPPERS  1                                     // One E stepper
389
-    #endif
390
-    #define E_MANUAL      1
391
-    #define TOOL_E_INDEX  0
392
-  #else
393
-    #define E_STEPPERS    EXTRUDERS
394
-    #define E_MANUAL      EXTRUDERS
395
-    #define TOOL_E_INDEX  current_block->active_extruder
396
-  #endif
397
-
398
-  /**
399
-   * DISTINCT_E_FACTORS affects how some E factors are accessed
400
-   */
401
-  #if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
402
-    #define XYZE_N (XYZ + E_STEPPERS)
403
-    #define E_AXIS_N (E_AXIS + extruder)
404
-  #else
405
-    #undef DISTINCT_E_FACTORS
406
-    #define XYZE_N XYZE
407
-    #define E_AXIS_N E_AXIS
408
-  #endif
409
-
410
-  /**
411
-   * The BLTouch Probe emulates a servo probe
412
-   * and uses "special" angles for its state.
413
-   */
414
-  #if ENABLED(BLTOUCH)
415
-    #ifndef Z_ENDSTOP_SERVO_NR
416
-      #define Z_ENDSTOP_SERVO_NR 0
417
-    #endif
418
-    #ifndef NUM_SERVOS
419
-      #define NUM_SERVOS (Z_ENDSTOP_SERVO_NR + 1)
420
-    #endif
421
-    #undef DEACTIVATE_SERVOS_AFTER_MOVE
422
-    #if NUM_SERVOS == 1
423
-      #undef SERVO_DELAY
424
-      #define SERVO_DELAY { 50 }
425
-    #endif
426
-    #ifndef BLTOUCH_DELAY
427
-      #define BLTOUCH_DELAY 375
428
-    #endif
429
-    #undef Z_SERVO_ANGLES
430
-    #define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
431
-
432
-    #define BLTOUCH_DEPLOY    10
433
-    #define BLTOUCH_STOW      90
434
-    #define BLTOUCH_SELFTEST 120
435
-    #define BLTOUCH_RESET    160
436
-    #define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING)
437
-
438
-    // Always disable probe pin inverting for BLTouch
439
-    #undef Z_MIN_PROBE_ENDSTOP_INVERTING
440
-    #define Z_MIN_PROBE_ENDSTOP_INVERTING false
441
-
442
-    #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
443
-      #undef Z_MIN_ENDSTOP_INVERTING
444
-      #define Z_MIN_ENDSTOP_INVERTING false
445
-      #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN)
446
-    #else
447
-      #define TEST_BLTOUCH() _TEST_BLTOUCH(Z_MIN_PROBE)
448
-    #endif
449
-  #endif
450
-
451
-  /**
452
-   * Set a flag for a servo probe
453
-   */
454
-  #define HAS_Z_SERVO_ENDSTOP (defined(Z_ENDSTOP_SERVO_NR) && Z_ENDSTOP_SERVO_NR >= 0)
455
-
456
-  /**
457
-   * Set a flag for any enabled probe
458
-   */
459
-  #define PROBE_SELECTED (ENABLED(PROBE_MANUALLY) || ENABLED(FIX_MOUNTED_PROBE) || ENABLED(Z_PROBE_ALLEN_KEY) || HAS_Z_SERVO_ENDSTOP || ENABLED(Z_PROBE_SLED) || ENABLED(SOLENOID_PROBE))
460
-
461
-  /**
462
-   * Clear probe pin settings when no probe is selected
463
-   */
464
-  #if !PROBE_SELECTED || ENABLED(PROBE_MANUALLY)
465
-    #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
466
-    #undef Z_MIN_PROBE_ENDSTOP
467
-  #endif
468
-
469
-  #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
470
-  #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
471
-  #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
472
-
473
-#endif // CONDITIONALS_LCD_H

+ 0
- 1150
Marlin/Conditionals_post.h
File diff suppressed because it is too large
View File


+ 975
- 392
Marlin/Configuration.h
File diff suppressed because it is too large
View File


+ 2123
- 527
Marlin/Configuration_adv.h
File diff suppressed because it is too large
View File


+ 0
- 855
Marlin/G26_Mesh_Validation_Tool.cpp View File

@@ -1,855 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Marlin Firmware -- G26 - Mesh Validation Tool
25
- */
26
-
27
-#include "MarlinConfig.h"
28
-
29
-#if ENABLED(G26_MESH_VALIDATION)
30
-
31
-  #include "Marlin.h"
32
-  #include "planner.h"
33
-  #include "stepper.h"
34
-  #include "temperature.h"
35
-  #include "ultralcd.h"
36
-  #include "gcode.h"
37
-  #include "bitmap_flags.h"
38
-
39
-  #if ENABLED(MESH_BED_LEVELING)
40
-    #include "mesh_bed_leveling.h"
41
-  #elif ENABLED(AUTO_BED_LEVELING_UBL)
42
-    #include "ubl.h"
43
-  #endif
44
-
45
-  #define EXTRUSION_MULTIPLIER 1.0
46
-  #define RETRACTION_MULTIPLIER 1.0
47
-  #define PRIME_LENGTH 10.0
48
-  #define OOZE_AMOUNT 0.3
49
-
50
-  #define SIZE_OF_INTERSECTION_CIRCLES 5
51
-  #define SIZE_OF_CROSSHAIRS 3
52
-
53
-  #if SIZE_OF_CROSSHAIRS >= SIZE_OF_INTERSECTION_CIRCLES
54
-    #error "SIZE_OF_CROSSHAIRS must be less than SIZE_OF_INTERSECTION_CIRCLES."
55
-  #endif
56
-
57
-  #define G26_OK false
58
-  #define G26_ERR true
59
-
60
-  /**
61
-   *   G26 Mesh Validation Tool
62
-   *
63
-   *   G26 is a Mesh Validation Tool intended to provide support for the Marlin Unified Bed Leveling System.
64
-   *   In order to fully utilize and benefit from the Marlin Unified Bed Leveling System an accurate Mesh must
65
-   *   be defined. G29 is designed to allow the user to quickly validate the correctness of her Mesh. It will
66
-   *   first heat the bed and nozzle. It will then print lines and circles along the Mesh Cell boundaries and
67
-   *   the intersections of those lines (respectively).
68
-   *
69
-   *   This action allows the user to immediately see where the Mesh is properly defined and where it needs to
70
-   *   be edited. The command will generate the Mesh lines closest to the nozzle's starting position. Alternatively
71
-   *   the user can specify the X and Y position of interest with command parameters. This allows the user to
72
-   *   focus on a particular area of the Mesh where attention is needed.
73
-   *
74
-   *   B #  Bed         Set the Bed Temperature. If not specified, a default of 60 C. will be assumed.
75
-   *
76
-   *   C    Current     When searching for Mesh Intersection points to draw, use the current nozzle location
77
-   *                    as the base for any distance comparison.
78
-   *
79
-   *   D    Disable     Disable the Unified Bed Leveling System. In the normal case the user is invoking this
80
-   *                    command to see how well a Mesh as been adjusted to match a print surface. In order to do
81
-   *                    this the Unified Bed Leveling System is turned on by the G26 command. The D parameter
82
-   *                    alters the command's normal behaviour and disables the Unified Bed Leveling System even if
83
-   *                    it is on.
84
-   *
85
-   *   H #  Hotend      Set the Nozzle Temperature. If not specified, a default of 205 C. will be assumed.
86
-   *
87
-   *   F #  Filament    Used to specify the diameter of the filament being used. If not specified
88
-   *                    1.75mm filament is assumed. If you are not getting acceptable results by using the
89
-   *                    'correct' numbers, you can scale this number up or down a little bit to change the amount
90
-   *                    of filament that is being extruded during the printing of the various lines on the bed.
91
-   *
92
-   *   K    Keep-On     Keep the heaters turned on at the end of the command.
93
-   *
94
-   *   L #  Layer       Layer height. (Height of nozzle above bed)  If not specified .20mm will be used.
95
-   *
96
-   *   O #  Ooooze      How much your nozzle will Ooooze filament while getting in position to print. This
97
-   *                    is over kill, but using this parameter will let you get the very first 'circle' perfect
98
-   *                    so you have a trophy to peel off of the bed and hang up to show how perfectly you have your
99
-   *                    Mesh calibrated. If not specified, a filament length of .3mm is assumed.
100
-   *
101
-   *   P #  Prime       Prime the nozzle with specified length of filament. If this parameter is not
102
-   *                    given, no prime action will take place. If the parameter specifies an amount, that much
103
-   *                    will be purged before continuing. If no amount is specified the command will start
104
-   *                    purging filament until the user provides an LCD Click and then it will continue with
105
-   *                    printing the Mesh. You can carefully remove the spent filament with a needle nose
106
-   *                    pliers while holding the LCD Click wheel in a depressed state. If you do not have
107
-   *                    an LCD, you must specify a value if you use P.
108
-   *
109
-   *   Q #  Multiplier  Retraction Multiplier. Normally not needed. Retraction defaults to 1.0mm and
110
-   *                    un-retraction is at 1.2mm   These numbers will be scaled by the specified amount
111
-   *
112
-   *   R #  Repeat      Prints the number of patterns given as a parameter, starting at the current location.
113
-   *                    If a parameter isn't given, every point will be printed unless G26 is interrupted.
114
-   *                    This works the same way that the UBL G29 P4 R parameter works.
115
-   *
116
-   *                    NOTE:  If you do not have an LCD, you -must- specify R. This is to ensure that you are
117
-   *                    aware that there's some risk associated with printing without the ability to abort in
118
-   *                    cases where mesh point Z value may be inaccurate. As above, if you do not include a
119
-   *                    parameter, every point will be printed.
120
-   *
121
-   *   S #  Nozzle      Used to control the size of nozzle diameter. If not specified, a .4mm nozzle is assumed.
122
-   *
123
-   *   U #  Random      Randomize the order that the circles are drawn on the bed. The search for the closest
124
-   *                    undrawn cicle is still done. But the distance to the location for each circle has a
125
-   *                    random number of the size specified added to it. Specifying S50 will give an interesting
126
-   *                    deviation from the normal behaviour on a 10 x 10 Mesh.
127
-   *
128
-   *   X #  X Coord.    Specify the starting location of the drawing activity.
129
-   *
130
-   *   Y #  Y Coord.    Specify the starting location of the drawing activity.
131
-   */
132
-
133
-  // External references
134
-
135
-  extern Planner planner;
136
-  #if ENABLED(ULTRA_LCD)
137
-    extern char lcd_status_message[];
138
-  #endif
139
-  inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
140
-
141
-  // Private functions
142
-
143
-  static uint16_t circle_flags[16], horizontal_mesh_line_flags[16], vertical_mesh_line_flags[16];
144
-  float g26_e_axis_feedrate = 0.020,
145
-        random_deviation = 0.0;
146
-
147
-  static bool g26_retracted = false; // Track the retracted state of the nozzle so mismatched
148
-                                     // retracts/recovers won't result in a bad state.
149
-
150
-  static float g26_extrusion_multiplier,
151
-               g26_retraction_multiplier,
152
-               g26_layer_height,
153
-               g26_prime_length,
154
-               g26_x_pos, g26_y_pos;
155
-
156
-  static int16_t g26_bed_temp,
157
-                 g26_hotend_temp;
158
-
159
-  static int8_t g26_prime_flag;
160
-
161
-  #if ENABLED(NEWPANEL)
162
-
163
-    /**
164
-     * If the LCD is clicked, cancel, wait for release, return true
165
-     */
166
-    bool user_canceled() {
167
-      if (!is_lcd_clicked()) return false; // Return if the button isn't pressed
168
-      lcd_setstatusPGM(PSTR("Mesh Validation Stopped."), 99);
169
-      #if ENABLED(ULTIPANEL)
170
-        lcd_quick_feedback();
171
-      #endif
172
-      wait_for_release();
173
-      return true;
174
-    }
175
-
176
-    bool exit_from_g26() {
177
-      lcd_setstatusPGM(PSTR("Leaving G26"), -1);
178
-      wait_for_release();
179
-      return G26_ERR;
180
-    }
181
-
182
-  #endif
183
-
184
-  void G26_line_to_destination(const float &feed_rate) {
185
-    const float save_feedrate = feedrate_mm_s;
186
-    feedrate_mm_s = feed_rate;      // use specified feed rate
187
-    prepare_move_to_destination();  // will ultimately call ubl.line_to_destination_cartesian or ubl.prepare_linear_move_to for UBL_SEGMENTED
188
-    feedrate_mm_s = save_feedrate;  // restore global feed rate
189
-  }
190
-
191
-  void move_to(const float &rx, const float &ry, const float &z, const float &e_delta) {
192
-    float feed_value;
193
-    static float last_z = -999.99;
194
-
195
-    bool has_xy_component = (rx != current_position[X_AXIS] || ry != current_position[Y_AXIS]); // Check if X or Y is involved in the movement.
196
-
197
-    if (z != last_z) {
198
-      last_z = z;
199
-      feed_value = planner.max_feedrate_mm_s[Z_AXIS]/(3.0);  // Base the feed rate off of the configured Z_AXIS feed rate
200
-
201
-      destination[X_AXIS] = current_position[X_AXIS];
202
-      destination[Y_AXIS] = current_position[Y_AXIS];
203
-      destination[Z_AXIS] = z;                          // We know the last_z==z or we wouldn't be in this block of code.
204
-      destination[E_AXIS] = current_position[E_AXIS];
205
-
206
-      G26_line_to_destination(feed_value);
207
-
208
-      stepper.synchronize();
209
-      set_destination_from_current();
210
-    }
211
-
212
-    // Check if X or Y is involved in the movement.
213
-    // Yes: a 'normal' movement. No: a retract() or recover()
214
-    feed_value = has_xy_component ? PLANNER_XY_FEEDRATE() / 10.0 : planner.max_feedrate_mm_s[E_AXIS] / 1.5;
215
-
216
-    if (g26_debug_flag) SERIAL_ECHOLNPAIR("in move_to() feed_value for XY:", feed_value);
217
-
218
-    destination[X_AXIS] = rx;
219
-    destination[Y_AXIS] = ry;
220
-    destination[E_AXIS] += e_delta;
221
-
222
-    G26_line_to_destination(feed_value);
223
-
224
-    stepper.synchronize();
225
-    set_destination_from_current();
226
-  }
227
-
228
-  FORCE_INLINE void move_to(const float where[XYZE], const float &de) { move_to(where[X_AXIS], where[Y_AXIS], where[Z_AXIS], de); }
229
-
230
-  void retract_filament(const float where[XYZE]) {
231
-    if (!g26_retracted) { // Only retract if we are not already retracted!
232
-      g26_retracted = true;
233
-      move_to(where, -1.0 * g26_retraction_multiplier);
234
-    }
235
-  }
236
-
237
-  void recover_filament(const float where[XYZE]) {
238
-    if (g26_retracted) { // Only un-retract if we are retracted.
239
-      move_to(where, 1.2 * g26_retraction_multiplier);
240
-      g26_retracted = false;
241
-    }
242
-  }
243
-
244
-  /**
245
-   * Prime the nozzle if needed. Return true on error.
246
-   */
247
-  inline bool prime_nozzle() {
248
-
249
-    #if ENABLED(NEWPANEL)
250
-      float Total_Prime = 0.0;
251
-
252
-      if (g26_prime_flag == -1) {  // The user wants to control how much filament gets purged
253
-
254
-        lcd_external_control = true;
255
-        lcd_setstatusPGM(PSTR("User-Controlled Prime"), 99);
256
-        lcd_chirp();
257
-
258
-        set_destination_from_current();
259
-
260
-        recover_filament(destination); // Make sure G26 doesn't think the filament is retracted().
261
-
262
-        while (!is_lcd_clicked()) {
263
-          lcd_chirp();
264
-          destination[E_AXIS] += 0.25;
265
-          #ifdef PREVENT_LENGTHY_EXTRUDE
266
-            Total_Prime += 0.25;
267
-            if (Total_Prime >= EXTRUDE_MAXLENGTH) return G26_ERR;
268
-          #endif
269
-          G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
270
-
271
-          stepper.synchronize();    // Without this synchronize, the purge is more consistent,
272
-                                    // but because the planner has a buffer, we won't be able
273
-                                    // to stop as quickly. So we put up with the less smooth
274
-                                    // action to give the user a more responsive 'Stop'.
275
-          set_destination_from_current();
276
-          idle();
277
-        }
278
-
279
-        wait_for_release();
280
-
281
-        strcpy_P(lcd_status_message, PSTR("Done Priming")); // We can't do lcd_setstatusPGM() without having it continue;
282
-                                                            // So... We cheat to get a message up.
283
-        lcd_setstatusPGM(PSTR("Done Priming"), 99);
284
-        lcd_quick_feedback();
285
-        lcd_external_control = false;
286
-      }
287
-      else
288
-    #endif
289
-    {
290
-      #if ENABLED(ULTRA_LCD)
291
-        lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99);
292
-        lcd_quick_feedback();
293
-      #endif
294
-      set_destination_from_current();
295
-      destination[E_AXIS] += g26_prime_length;
296
-      G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
297
-      stepper.synchronize();
298
-      set_destination_from_current();
299
-      retract_filament(destination);
300
-    }
301
-
302
-    return G26_OK;
303
-  }
304
-
305
-  mesh_index_pair find_closest_circle_to_print(const float &X, const float &Y) {
306
-    float closest = 99999.99;
307
-    mesh_index_pair return_val;
308
-
309
-    return_val.x_index = return_val.y_index = -1;
310
-
311
-    for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
312
-      for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
313
-        if (!is_bitmap_set(circle_flags, i, j)) {
314
-          const float mx = _GET_MESH_X(i),  // We found a circle that needs to be printed
315
-                      my = _GET_MESH_Y(j);
316
-
317
-          // Get the distance to this intersection
318
-          float f = HYPOT(X - mx, Y - my);
319
-
320
-          // It is possible that we are being called with the values
321
-          // to let us find the closest circle to the start position.
322
-          // But if this is not the case, add a small weighting to the
323
-          // distance calculation to help it choose a better place to continue.
324
-          f += HYPOT(g26_x_pos - mx, g26_y_pos - my) / 15.0;
325
-
326
-          // Add in the specified amount of Random Noise to our search
327
-          if (random_deviation > 1.0)
328
-            f += random(0.0, random_deviation);
329
-
330
-          if (f < closest) {
331
-            closest = f;              // We found a closer location that is still
332
-            return_val.x_index = i;   // un-printed  --- save the data for it
333
-            return_val.y_index = j;
334
-            return_val.distance = closest;
335
-          }
336
-        }
337
-      }
338
-    }
339
-    bitmap_set(circle_flags, return_val.x_index, return_val.y_index);   // Mark this location as done.
340
-    return return_val;
341
-  }
342
-
343
-  /**
344
-   * print_line_from_here_to_there() takes two cartesian coordinates and draws a line from one
345
-   * to the other. But there are really three sets of coordinates involved. The first coordinate
346
-   * is the present location of the nozzle. We don't necessarily want to print from this location.
347
-   * We first need to move the nozzle to the start of line segment where we want to print. Once
348
-   * there, we can use the two coordinates supplied to draw the line.
349
-   *
350
-   * Note:  Although we assume the first set of coordinates is the start of the line and the second
351
-   * set of coordinates is the end of the line, it does not always work out that way. This function
352
-   * optimizes the movement to minimize the travel distance before it can start printing. This saves
353
-   * a lot of time and eliminates a lot of nonsensical movement of the nozzle. However, it does
354
-   * cause a lot of very little short retracement of th nozzle when it draws the very first line
355
-   * segment of a 'circle'. The time this requires is very short and is easily saved by the other
356
-   * cases where the optimization comes into play.
357
-   */
358
-  void print_line_from_here_to_there(const float &sx, const float &sy, const float &sz, const float &ex, const float &ey, const float &ez) {
359
-    const float dx_s = current_position[X_AXIS] - sx,   // find our distance from the start of the actual line segment
360
-                dy_s = current_position[Y_AXIS] - sy,
361
-                dist_start = HYPOT2(dx_s, dy_s),        // We don't need to do a sqrt(), we can compare the distance^2
362
-                                                        // to save computation time
363
-                dx_e = current_position[X_AXIS] - ex,   // find our distance from the end of the actual line segment
364
-                dy_e = current_position[Y_AXIS] - ey,
365
-                dist_end = HYPOT2(dx_e, dy_e),
366
-
367
-                line_length = HYPOT(ex - sx, ey - sy);
368
-
369
-    // If the end point of the line is closer to the nozzle, flip the direction,
370
-    // moving from the end to the start. On very small lines the optimization isn't worth it.
371
-    if (dist_end < dist_start && (SIZE_OF_INTERSECTION_CIRCLES) < FABS(line_length))
372
-      return print_line_from_here_to_there(ex, ey, ez, sx, sy, sz);
373
-
374
-    // Decide whether to retract & bump
375
-
376
-    if (dist_start > 2.0) {
377
-      retract_filament(destination);
378
-      //todo:  parameterize the bump height with a define
379
-      move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + 0.500, 0.0);  // Z bump to minimize scraping
380
-      move_to(sx, sy, sz + 0.500, 0.0); // Get to the starting point with no extrusion while bumped
381
-    }
382
-
383
-    move_to(sx, sy, sz, 0.0); // Get to the starting point with no extrusion / un-Z bump
384
-
385
-    const float e_pos_delta = line_length * g26_e_axis_feedrate * g26_extrusion_multiplier;
386
-
387
-    recover_filament(destination);
388
-    move_to(ex, ey, ez, e_pos_delta);  // Get to the ending point with an appropriate amount of extrusion
389
-  }
390
-
391
-  inline bool look_for_lines_to_connect() {
392
-    float sx, sy, ex, ey;
393
-
394
-    for (uint8_t i = 0; i < GRID_MAX_POINTS_X; i++) {
395
-      for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++) {
396
-
397
-        #if ENABLED(NEWPANEL)
398
-          if (user_canceled()) return true;     // Check if the user wants to stop the Mesh Validation
399
-        #endif
400
-
401
-        if (i < GRID_MAX_POINTS_X) { // We can't connect to anything to the right than GRID_MAX_POINTS_X.
402
-                                     // This is already a half circle because we are at the edge of the bed.
403
-
404
-          if (is_bitmap_set(circle_flags, i, j) && is_bitmap_set(circle_flags, i + 1, j)) { // check if we can do a line to the left
405
-            if (!is_bitmap_set(horizontal_mesh_line_flags, i, j)) {
406
-
407
-              //
408
-              // We found two circles that need a horizontal line to connect them
409
-              // Print it!
410
-              //
411
-              sx = _GET_MESH_X(  i  ) + (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // right edge
412
-              ex = _GET_MESH_X(i + 1) - (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // left edge
413
-
414
-              sx = constrain(sx, X_MIN_POS + 1, X_MAX_POS - 1);
415
-              sy = ey = constrain(_GET_MESH_Y(j), Y_MIN_POS + 1, Y_MAX_POS - 1);
416
-              ex = constrain(ex, X_MIN_POS + 1, X_MAX_POS - 1);
417
-
418
-              if (position_is_reachable(sx, sy) && position_is_reachable(ex, ey)) {
419
-
420
-                if (g26_debug_flag) {
421
-                  SERIAL_ECHOPAIR(" Connecting with horizontal line (sx=", sx);
422
-                  SERIAL_ECHOPAIR(", sy=", sy);
423
-                  SERIAL_ECHOPAIR(") -> (ex=", ex);
424
-                  SERIAL_ECHOPAIR(", ey=", ey);
425
-                  SERIAL_CHAR(')');
426
-                  SERIAL_EOL();
427
-                  //debug_current_and_destination(PSTR("Connecting horizontal line."));
428
-                }
429
-                print_line_from_here_to_there(sx, sy, g26_layer_height, ex, ey, g26_layer_height);
430
-              }
431
-              bitmap_set(horizontal_mesh_line_flags, i, j);   // Mark it as done so we don't do it again, even if we skipped it
432
-            }
433
-          }
434
-
435
-          if (j < GRID_MAX_POINTS_Y) { // We can't connect to anything further back than GRID_MAX_POINTS_Y.
436
-                                           // This is already a half circle because we are at the edge  of the bed.
437
-
438
-            if (is_bitmap_set(circle_flags, i, j) && is_bitmap_set(circle_flags, i, j + 1)) { // check if we can do a line straight down
439
-              if (!is_bitmap_set( vertical_mesh_line_flags, i, j)) {
440
-                //
441
-                // We found two circles that need a vertical line to connect them
442
-                // Print it!
443
-                //
444
-                sy = _GET_MESH_Y(  j  ) + (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // top edge
445
-                ey = _GET_MESH_Y(j + 1) - (SIZE_OF_INTERSECTION_CIRCLES - (SIZE_OF_CROSSHAIRS)); // bottom edge
446
-
447
-                sx = ex = constrain(_GET_MESH_X(i), X_MIN_POS + 1, X_MAX_POS - 1);
448
-                sy = constrain(sy, Y_MIN_POS + 1, Y_MAX_POS - 1);
449
-                ey = constrain(ey, Y_MIN_POS + 1, Y_MAX_POS - 1);
450
-
451
-                if (position_is_reachable(sx, sy) && position_is_reachable(ex, ey)) {
452
-
453
-                  if (g26_debug_flag) {
454
-                    SERIAL_ECHOPAIR(" Connecting with vertical line (sx=", sx);
455
-                    SERIAL_ECHOPAIR(", sy=", sy);
456
-                    SERIAL_ECHOPAIR(") -> (ex=", ex);
457
-                    SERIAL_ECHOPAIR(", ey=", ey);
458
-                    SERIAL_CHAR(')');
459
-                    SERIAL_EOL();
460
-
461
-                    #if ENABLED(AUTO_BED_LEVELING_UBL)
462
-                      debug_current_and_destination(PSTR("Connecting vertical line."));
463
-                    #endif
464
-                  }
465
-                  print_line_from_here_to_there(sx, sy, g26_layer_height, ex, ey, g26_layer_height);
466
-                }
467
-                bitmap_set(vertical_mesh_line_flags, i, j);   // Mark it as done so we don't do it again, even if skipped
468
-              }
469
-            }
470
-          }
471
-        }
472
-      }
473
-    }
474
-    return false;
475
-  }
476
-
477
-  /**
478
-   * Turn on the bed and nozzle heat and
479
-   * wait for them to get up to temperature.
480
-   */
481
-  inline bool turn_on_heaters() {
482
-    millis_t next = millis() + 5000UL;
483
-    #if HAS_TEMP_BED
484
-      #if ENABLED(ULTRA_LCD)
485
-        if (g26_bed_temp > 25) {
486
-          lcd_setstatusPGM(PSTR("G26 Heating Bed."), 99);
487
-          lcd_quick_feedback();
488
-          lcd_external_control = true;
489
-      #endif
490
-          thermalManager.setTargetBed(g26_bed_temp);
491
-          while (abs(thermalManager.degBed() - g26_bed_temp) > 3) {
492
-
493
-            #if ENABLED(NEWPANEL)
494
-              if (is_lcd_clicked()) return exit_from_g26();
495
-            #endif
496
-
497
-            if (ELAPSED(millis(), next)) {
498
-              next = millis() + 5000UL;
499
-              thermalManager.print_heaterstates();
500
-              SERIAL_EOL();
501
-            }
502
-            idle();
503
-          }
504
-      #if ENABLED(ULTRA_LCD)
505
-        }
506
-        lcd_setstatusPGM(PSTR("G26 Heating Nozzle."), 99);
507
-        lcd_quick_feedback();
508
-      #endif
509
-    #endif
510
-
511
-    // Start heating the nozzle and wait for it to reach temperature.
512
-    thermalManager.setTargetHotend(g26_hotend_temp, 0);
513
-    while (abs(thermalManager.degHotend(0) - g26_hotend_temp) > 3) {
514
-
515
-      #if ENABLED(NEWPANEL)
516
-        if (is_lcd_clicked()) return exit_from_g26();
517
-      #endif
518
-
519
-      if (ELAPSED(millis(), next)) {
520
-        next = millis() + 5000UL;
521
-        thermalManager.print_heaterstates();
522
-        SERIAL_EOL();
523
-      }
524
-      idle();
525
-    }
526
-
527
-    #if ENABLED(ULTRA_LCD)
528
-      lcd_reset_status();
529
-      lcd_quick_feedback();
530
-    #endif
531
-
532
-    return G26_OK;
533
-  }
534
-
535
-  float valid_trig_angle(float d) {
536
-    while (d > 360.0) d -= 360.0;
537
-    while (d < 0.0) d += 360.0;
538
-    return d;
539
-  }
540
-
541
-  /**
542
-   * G26: Mesh Validation Pattern generation.
543
-   *
544
-   * Used to interactively edit the mesh by placing the
545
-   * nozzle in a problem area and doing a G29 P4 R command.
546
-   */
547
-  void gcode_G26() {
548
-    SERIAL_ECHOLNPGM("G26 command started. Waiting for heater(s).");
549
-    float tmp, start_angle, end_angle;
550
-    int   i, xi, yi;
551
-    mesh_index_pair location;
552
-
553
-    // Don't allow Mesh Validation without homing first,
554
-    // or if the parameter parsing did not go OK, abort
555
-    if (axis_unhomed_error()) return;
556
-
557
-    g26_extrusion_multiplier    = EXTRUSION_MULTIPLIER;
558
-    g26_retraction_multiplier   = RETRACTION_MULTIPLIER;
559
-    g26_layer_height            = MESH_TEST_LAYER_HEIGHT;
560
-    g26_prime_length            = PRIME_LENGTH;
561
-    g26_bed_temp                = MESH_TEST_BED_TEMP;
562
-    g26_hotend_temp             = MESH_TEST_HOTEND_TEMP;
563
-    g26_prime_flag              = 0;
564
-
565
-    float g26_nozzle            = MESH_TEST_NOZZLE_SIZE,
566
-          g26_filament_diameter = DEFAULT_NOMINAL_FILAMENT_DIA,
567
-          g26_ooze_amount       = parser.linearval('O', OOZE_AMOUNT);
568
-
569
-    bool g26_continue_with_closest = parser.boolval('C'),
570
-         g26_keep_heaters_on       = parser.boolval('K');
571
-
572
-    if (parser.seenval('B')) {
573
-      g26_bed_temp = parser.value_celsius();
574
-      if (!WITHIN(g26_bed_temp, 15, 140)) {
575
-        SERIAL_PROTOCOLLNPGM("?Specified bed temperature not plausible.");
576
-        return;
577
-      }
578
-    }
579
-
580
-    if (parser.seenval('L')) {
581
-      g26_layer_height = parser.value_linear_units();
582
-      if (!WITHIN(g26_layer_height, 0.0, 2.0)) {
583
-        SERIAL_PROTOCOLLNPGM("?Specified layer height not plausible.");
584
-        return;
585
-      }
586
-    }
587
-
588
-    if (parser.seen('Q')) {
589
-      if (parser.has_value()) {
590
-        g26_retraction_multiplier = parser.value_float();
591
-        if (!WITHIN(g26_retraction_multiplier, 0.05, 15.0)) {
592
-          SERIAL_PROTOCOLLNPGM("?Specified Retraction Multiplier not plausible.");
593
-          return;
594
-        }
595
-      }
596
-      else {
597
-        SERIAL_PROTOCOLLNPGM("?Retraction Multiplier must be specified.");
598
-        return;
599
-      }
600
-    }
601
-
602
-    if (parser.seenval('S')) {
603
-      g26_nozzle = parser.value_float();
604
-      if (!WITHIN(g26_nozzle, 0.1, 1.0)) {
605
-        SERIAL_PROTOCOLLNPGM("?Specified nozzle size not plausible.");
606
-        return;
607
-      }
608
-    }
609
-
610
-    if (parser.seen('P')) {
611
-      if (!parser.has_value()) {
612
-        #if ENABLED(NEWPANEL)
613
-          g26_prime_flag = -1;
614
-        #else
615
-          SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD.");
616
-          return;
617
-        #endif
618
-      }
619
-      else {
620
-        g26_prime_flag++;
621
-        g26_prime_length = parser.value_linear_units();
622
-        if (!WITHIN(g26_prime_length, 0.0, 25.0)) {
623
-          SERIAL_PROTOCOLLNPGM("?Specified prime length not plausible.");
624
-          return;
625
-        }
626
-      }
627
-    }
628
-
629
-    if (parser.seenval('F')) {
630
-      g26_filament_diameter = parser.value_linear_units();
631
-      if (!WITHIN(g26_filament_diameter, 1.0, 4.0)) {
632
-        SERIAL_PROTOCOLLNPGM("?Specified filament size not plausible.");
633
-        return;
634
-      }
635
-    }
636
-    g26_extrusion_multiplier *= sq(1.75) / sq(g26_filament_diameter); // If we aren't using 1.75mm filament, we need to
637
-                                                                      // scale up or down the length needed to get the
638
-                                                                      // same volume of filament
639
-
640
-    g26_extrusion_multiplier *= g26_filament_diameter * sq(g26_nozzle) / sq(0.3); // Scale up by nozzle size
641
-
642
-    if (parser.seenval('H')) {
643
-      g26_hotend_temp = parser.value_celsius();
644
-      if (!WITHIN(g26_hotend_temp, 165, 280)) {
645
-        SERIAL_PROTOCOLLNPGM("?Specified nozzle temperature not plausible.");
646
-        return;
647
-      }
648
-    }
649
-
650
-    if (parser.seen('U')) {
651
-      randomSeed(millis());
652
-      // This setting will persist for the next G26
653
-      random_deviation = parser.has_value() ? parser.value_float() : 50.0;
654
-    }
655
-
656
-    int16_t g26_repeats;
657
-    #if ENABLED(NEWPANEL)
658
-      g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1);
659
-    #else
660
-      if (!parser.seen('R')) {
661
-        SERIAL_PROTOCOLLNPGM("?(R)epeat must be specified when not using an LCD.");
662
-        return;
663
-      }
664
-      else
665
-        g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
666
-    #endif
667
-    if (g26_repeats < 1) {
668
-      SERIAL_PROTOCOLLNPGM("?(R)epeat value not plausible; must be at least 1.");
669
-      return;
670
-    }
671
-
672
-    g26_x_pos = parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position[X_AXIS];
673
-    g26_y_pos = parser.seenval('Y') ? RAW_Y_POSITION(parser.value_linear_units()) : current_position[Y_AXIS];
674
-    if (!position_is_reachable(g26_x_pos, g26_y_pos)) {
675
-      SERIAL_PROTOCOLLNPGM("?Specified X,Y coordinate out of bounds.");
676
-      return;
677
-    }
678
-
679
-    /**
680
-     * Wait until all parameters are verified before altering the state!
681
-     */
682
-    set_bed_leveling_enabled(!parser.seen('D'));
683
-
684
-    if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
685
-      do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
686
-      stepper.synchronize();
687
-      set_current_from_destination();
688
-    }
689
-
690
-    if (turn_on_heaters() != G26_OK) goto LEAVE;
691
-
692
-    current_position[E_AXIS] = 0.0;
693
-    sync_plan_position_e();
694
-
695
-    if (g26_prime_flag && prime_nozzle() != G26_OK) goto LEAVE;
696
-
697
-    /**
698
-     *  Bed is preheated
699
-     *
700
-     *  Nozzle is at temperature
701
-     *
702
-     *  Filament is primed!
703
-     *
704
-     *  It's  "Show Time" !!!
705
-     */
706
-
707
-    ZERO(circle_flags);
708
-    ZERO(horizontal_mesh_line_flags);
709
-    ZERO(vertical_mesh_line_flags);
710
-
711
-    // Move nozzle to the specified height for the first layer
712
-    set_destination_from_current();
713
-    destination[Z_AXIS] = g26_layer_height;
714
-    move_to(destination, 0.0);
715
-    move_to(destination, g26_ooze_amount);
716
-
717
-    #if ENABLED(ULTRA_LCD)
718
-      lcd_external_control = true;
719
-    #endif
720
-
721
-    //debug_current_and_destination(PSTR("Starting G26 Mesh Validation Pattern."));
722
-
723
-    /**
724
-     * Declare and generate a sin() & cos() table to be used during the circle drawing. This will lighten
725
-     * the CPU load and make the arc drawing faster and more smooth
726
-     */
727
-    float sin_table[360 / 30 + 1], cos_table[360 / 30 + 1];
728
-    for (i = 0; i <= 360 / 30; i++) {
729
-      cos_table[i] = SIZE_OF_INTERSECTION_CIRCLES * cos(RADIANS(valid_trig_angle(i * 30.0)));
730
-      sin_table[i] = SIZE_OF_INTERSECTION_CIRCLES * sin(RADIANS(valid_trig_angle(i * 30.0)));
731
-    }
732
-
733
-    do {
734
-      location = g26_continue_with_closest
735
-        ? find_closest_circle_to_print(current_position[X_AXIS], current_position[Y_AXIS])
736
-        : find_closest_circle_to_print(g26_x_pos, g26_y_pos); // Find the closest Mesh Intersection to where we are now.
737
-
738
-      if (location.x_index >= 0 && location.y_index >= 0) {
739
-        const float circle_x = _GET_MESH_X(location.x_index),
740
-                    circle_y = _GET_MESH_Y(location.y_index);
741
-
742
-        // If this mesh location is outside the printable_radius, skip it.
743
-
744
-        if (!position_is_reachable(circle_x, circle_y)) continue;
745
-
746
-        xi = location.x_index;  // Just to shrink the next few lines and make them easier to understand
747
-        yi = location.y_index;
748
-
749
-        if (g26_debug_flag) {
750
-          SERIAL_ECHOPAIR("   Doing circle at: (xi=", xi);
751
-          SERIAL_ECHOPAIR(", yi=", yi);
752
-          SERIAL_CHAR(')');
753
-          SERIAL_EOL();
754
-        }
755
-
756
-        start_angle = 0.0;    // assume it is going to be a full circle
757
-        end_angle   = 360.0;
758
-        if (xi == 0) {       // Check for bottom edge
759
-          start_angle = -90.0;
760
-          end_angle   =  90.0;
761
-          if (yi == 0)        // it is an edge, check for the two left corners
762
-            start_angle = 0.0;
763
-          else if (yi == GRID_MAX_POINTS_Y - 1)
764
-            end_angle = 0.0;
765
-        }
766
-        else if (xi == GRID_MAX_POINTS_X - 1) { // Check for top edge
767
-          start_angle =  90.0;
768
-          end_angle   = 270.0;
769
-          if (yi == 0)                  // it is an edge, check for the two right corners
770
-            end_angle = 180.0;
771
-          else if (yi == GRID_MAX_POINTS_Y - 1)
772
-            start_angle = 180.0;
773
-        }
774
-        else if (yi == 0) {
775
-          start_angle =   0.0;         // only do the top   side of the cirlce
776
-          end_angle   = 180.0;
777
-        }
778
-        else if (yi == GRID_MAX_POINTS_Y - 1) {
779
-          start_angle = 180.0;         // only do the bottom side of the cirlce
780
-          end_angle   = 360.0;
781
-        }
782
-
783
-        for (tmp = start_angle; tmp < end_angle - 0.1; tmp += 30.0) {
784
-
785
-          #if ENABLED(NEWPANEL)
786
-            if (user_canceled()) goto LEAVE;              // Check if the user wants to stop the Mesh Validation
787
-          #endif
788
-
789
-          int tmp_div_30 = tmp / 30.0;
790
-          if (tmp_div_30 < 0) tmp_div_30 += 360 / 30;
791
-          if (tmp_div_30 > 11) tmp_div_30 -= 360 / 30;
792
-
793
-          float rx = circle_x + cos_table[tmp_div_30],    // for speed, these are now a lookup table entry
794
-                ry = circle_y + sin_table[tmp_div_30],
795
-                xe = circle_x + cos_table[tmp_div_30 + 1],
796
-                ye = circle_y + sin_table[tmp_div_30 + 1];
797
-          #if IS_KINEMATIC
798
-            // Check to make sure this segment is entirely on the bed, skip if not.
799
-            if (!position_is_reachable(rx, ry) || !position_is_reachable(xe, ye)) continue;
800
-          #else                                               // not, we need to skip
801
-            rx = constrain(rx, X_MIN_POS + 1, X_MAX_POS - 1); // This keeps us from bumping the endstops
802
-            ry = constrain(ry, Y_MIN_POS + 1, Y_MAX_POS - 1);
803
-            xe = constrain(xe, X_MIN_POS + 1, X_MAX_POS - 1);
804
-            ye = constrain(ye, Y_MIN_POS + 1, Y_MAX_POS - 1);
805
-          #endif
806
-
807
-          //if (g26_debug_flag) {
808
-          //  char ccc, *cptr, seg_msg[50], seg_num[10];
809
-          //  strcpy(seg_msg, "   segment: ");
810
-          //  strcpy(seg_num, "    \n");
811
-          //  cptr = (char*) "01234567890ABCDEF????????";
812
-          //  ccc = cptr[tmp_div_30];
813
-          //  seg_num[1] = ccc;
814
-          //  strcat(seg_msg, seg_num);
815
-          //  debug_current_and_destination(seg_msg);
816
-          //}
817
-
818
-          print_line_from_here_to_there(rx, ry, g26_layer_height, xe, ye, g26_layer_height);
819
-
820
-        }
821
-        if (look_for_lines_to_connect())
822
-          goto LEAVE;
823
-      }
824
-    } while (--g26_repeats && location.x_index >= 0 && location.y_index >= 0);
825
-
826
-    LEAVE:
827
-    lcd_setstatusPGM(PSTR("Leaving G26"), -1);
828
-
829
-    retract_filament(destination);
830
-    destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES;
831
-
832
-    //debug_current_and_destination(PSTR("ready to do Z-Raise."));
833
-    move_to(destination, 0); // Raise the nozzle
834
-    //debug_current_and_destination(PSTR("done doing Z-Raise."));
835
-
836
-    destination[X_AXIS] = g26_x_pos;                               // Move back to the starting position
837
-    destination[Y_AXIS] = g26_y_pos;
838
-    //destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES;            // Keep the nozzle where it is
839
-
840
-    move_to(destination, 0); // Move back to the starting position
841
-    //debug_current_and_destination(PSTR("done doing X/Y move."));
842
-
843
-    #if ENABLED(ULTRA_LCD)
844
-      lcd_external_control = false;     // Give back control of the LCD Panel!
845
-    #endif
846
-
847
-    if (!g26_keep_heaters_on) {
848
-      #if HAS_TEMP_BED
849
-        thermalManager.setTargetBed(0);
850
-      #endif
851
-      thermalManager.setTargetHotend(0, 0);
852
-    }
853
-  }
854
-
855
-#endif // G26_MESH_VALIDATION

+ 0
- 1132
Marlin/I2CPositionEncoder.cpp
File diff suppressed because it is too large
View File


+ 0
- 346
Marlin/I2CPositionEncoder.h View File

@@ -1,346 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef I2CPOSENC_H
24
-#define I2CPOSENC_H
25
-
26
-#include "MarlinConfig.h"
27
-
28
-#if ENABLED(I2C_POSITION_ENCODERS)
29
-
30
-  #include "enum.h"
31
-  #include "macros.h"
32
-  #include "types.h"
33
-  #include <Wire.h>
34
-
35
-  //=========== Advanced / Less-Common Encoder Configuration Settings ==========
36
-
37
-  #define I2CPE_EC_THRESH_PROPORTIONAL                    // if enabled adjusts the error correction threshold
38
-                                                          // proportional to the current speed of the axis allows
39
-                                                          // for very small error margin at low speeds without
40
-                                                          // stuttering due to reading latency at high speeds
41
-
42
-  #define I2CPE_DEBUG                                     // enable encoder-related debug serial echos
43
-
44
-  #define I2CPE_REBOOT_TIME             5000              // time we wait for an encoder module to reboot
45
-                                                          // after changing address.
46
-
47
-  #define I2CPE_MAG_SIG_GOOD            0
48
-  #define I2CPE_MAG_SIG_MID             1
49
-  #define I2CPE_MAG_SIG_BAD             2
50
-  #define I2CPE_MAG_SIG_NF              255
51
-
52
-  #define I2CPE_REQ_REPORT              0
53
-  #define I2CPE_RESET_COUNT             1
54
-  #define I2CPE_SET_ADDR                2
55
-  #define I2CPE_SET_REPORT_MODE         3
56
-  #define I2CPE_CLEAR_EEPROM            4
57
-
58
-  #define I2CPE_LED_PAR_MODE            10
59
-  #define I2CPE_LED_PAR_BRT             11
60
-  #define I2CPE_LED_PAR_RATE            14
61
-
62
-  #define I2CPE_REPORT_DISTANCE         0
63
-  #define I2CPE_REPORT_STRENGTH         1
64
-  #define I2CPE_REPORT_VERSION          2
65
-
66
-  // Default I2C addresses
67
-  #define I2CPE_PRESET_ADDR_X           30
68
-  #define I2CPE_PRESET_ADDR_Y           31
69
-  #define I2CPE_PRESET_ADDR_Z           32
70
-  #define I2CPE_PRESET_ADDR_E           33
71
-
72
-  #define I2CPE_DEF_AXIS                X_AXIS
73
-  #define I2CPE_DEF_ADDR                I2CPE_PRESET_ADDR_X
74
-
75
-  // Error event counter; tracks how many times there is an error exceeding a certain threshold
76
-  #define I2CPE_ERR_CNT_THRESH          3.00
77
-  #define I2CPE_ERR_CNT_DEBOUNCE_MS     2000
78
-
79
-  #if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
80
-    #define I2CPE_ERR_ARRAY_SIZE        32
81
-  #endif
82
-
83
-  // Error Correction Methods
84
-  #define I2CPE_ECM_NONE                0
85
-  #define I2CPE_ECM_MICROSTEP           1
86
-  #define I2CPE_ECM_PLANNER             2
87
-  #define I2CPE_ECM_STALLDETECT         3
88
-
89
-  // Encoder types
90
-  #define I2CPE_ENC_TYPE_ROTARY         0
91
-  #define I2CPE_ENC_TYPE_LINEAR         1
92
-
93
-  // Parser
94
-  #define I2CPE_PARSE_ERR               1
95
-  #define I2CPE_PARSE_OK                0
96
-
97
-  #define LOOP_PE(VAR) LOOP_L_N(VAR, I2CPE_ENCODER_CNT)
98
-  #define CHECK_IDX() do{ if (!WITHIN(idx, 0, I2CPE_ENCODER_CNT - 1)) return; }while(0)
99
-
100
-  extern const char axis_codes[XYZE];
101
-
102
-  typedef union {
103
-    volatile int32_t val = 0;
104
-    uint8_t          bval[4];
105
-  } i2cLong;
106
-
107
-  class I2CPositionEncoder {
108
-  private:
109
-    AxisEnum  encoderAxis         = I2CPE_DEF_AXIS;
110
-
111
-    uint8_t   i2cAddress          = I2CPE_DEF_ADDR,
112
-              ecMethod            = I2CPE_DEF_EC_METHOD,
113
-              type                = I2CPE_DEF_TYPE,
114
-              H                   = I2CPE_MAG_SIG_NF;    // Magnetic field strength
115
-
116
-    int       encoderTicksPerUnit = I2CPE_DEF_ENC_TICKS_UNIT,
117
-              stepperTicks        = I2CPE_DEF_TICKS_REV,
118
-              errorCount          = 0,
119
-              errorPrev           = 0;
120
-
121
-    float     ecThreshold         = I2CPE_DEF_EC_THRESH;
122
-
123
-    bool      homed               = false,
124
-              trusted             = false,
125
-              initialised         = false,
126
-              active              = false,
127
-              invert              = false,
128
-              ec                  = true;
129
-
130
-    int32_t   zeroOffset          = 0,
131
-              lastPosition        = 0,
132
-              position;
133
-
134
-    millis_t  lastPositionTime    = 0,
135
-              nextErrorCountTime  = 0,
136
-              lastErrorTime;
137
-
138
-    //double        positionMm; //calculate
139
-
140
-    #if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
141
-      uint8_t errIdx = 0;
142
-      int     err[I2CPE_ERR_ARRAY_SIZE] = { 0 };
143
-    #endif
144
-
145
-    //float        positionMm; //calculate
146
-
147
-  public:
148
-    void init(const uint8_t address, const AxisEnum axis);
149
-    void reset();
150
-
151
-    void update();
152
-
153
-    void set_homed();
154
-
155
-    int32_t get_raw_count();
156
-
157
-    FORCE_INLINE float mm_from_count(const int32_t count) {
158
-      switch (type) {
159
-        default: return -1;
160
-        case I2CPE_ENC_TYPE_LINEAR:
161
-          return count / encoderTicksPerUnit;
162
-        case I2CPE_ENC_TYPE_ROTARY:
163
-          return (count * stepperTicks) / (encoderTicksPerUnit * planner.axis_steps_per_mm[encoderAxis]);
164
-      }
165
-    }
166
-
167
-    FORCE_INLINE float get_position_mm() { return mm_from_count(get_position()); }
168
-    FORCE_INLINE int32_t get_position() { return get_raw_count() - zeroOffset; }
169
-
170
-    int32_t get_axis_error_steps(const bool report);
171
-    float get_axis_error_mm(const bool report);
172
-
173
-    void calibrate_steps_mm(const uint8_t iter);
174
-
175
-    bool passes_test(const bool report);
176
-
177
-    bool test_axis(void);
178
-
179
-    FORCE_INLINE int get_error_count(void) { return errorCount; }
180
-    FORCE_INLINE void set_error_count(const int newCount) { errorCount = newCount; }
181
-
182
-    FORCE_INLINE uint8_t get_address() { return i2cAddress; }
183
-    FORCE_INLINE void set_address(const uint8_t addr) { i2cAddress = addr; }
184
-
185
-    FORCE_INLINE bool get_active(void) { return active; }
186
-    FORCE_INLINE void set_active(const bool a) { active = a; }
187
-
188
-    FORCE_INLINE void set_inverted(const bool i) { invert = i; }
189
-
190
-    FORCE_INLINE AxisEnum get_axis() { return encoderAxis; }
191
-
192
-    FORCE_INLINE bool get_ec_enabled() { return ec; }
193
-    FORCE_INLINE void set_ec_enabled(const bool enabled) { ec = enabled; }
194
-
195
-    FORCE_INLINE uint8_t get_ec_method() { return ecMethod; }
196
-    FORCE_INLINE void set_ec_method(const byte method) { ecMethod = method; }
197
-
198
-    FORCE_INLINE float get_ec_threshold() { return ecThreshold; }
199
-    FORCE_INLINE void set_ec_threshold(const float newThreshold) { ecThreshold = newThreshold; }
200
-
201
-    FORCE_INLINE int get_encoder_ticks_mm() {
202
-      switch (type) {
203
-        default: return 0;
204
-        case I2CPE_ENC_TYPE_LINEAR:
205
-          return encoderTicksPerUnit;
206
-        case I2CPE_ENC_TYPE_ROTARY:
207
-          return (int)((encoderTicksPerUnit / stepperTicks) * planner.axis_steps_per_mm[encoderAxis]);
208
-      }
209
-    }
210
-
211
-    FORCE_INLINE int get_ticks_unit() { return encoderTicksPerUnit; }
212
-    FORCE_INLINE void set_ticks_unit(const int ticks) { encoderTicksPerUnit = ticks; }
213
-
214
-    FORCE_INLINE uint8_t get_type() { return type; }
215
-    FORCE_INLINE void set_type(const byte newType) { type = newType; }
216
-
217
-    FORCE_INLINE int get_stepper_ticks() { return stepperTicks; }
218
-    FORCE_INLINE void set_stepper_ticks(const int ticks) { stepperTicks = ticks; }
219
-  };
220
-
221
-  class I2CPositionEncodersMgr {
222
-  private:
223
-    static bool I2CPE_anyaxis;
224
-    static uint8_t I2CPE_addr, I2CPE_idx;
225
-
226
-  public:
227
-
228
-    static void init(void);
229
-
230
-    // consider only updating one endoder per call / tick if encoders become too time intensive
231
-    static void update(void) { LOOP_PE(i) encoders[i].update(); }
232
-
233
-    static void homed(const AxisEnum axis) {
234
-      LOOP_PE(i)
235
-        if (encoders[i].get_axis() == axis) encoders[i].set_homed();
236
-    }
237
-
238
-    static void report_position(const int8_t idx, const bool units, const bool noOffset);
239
-
240
-    static void report_status(const int8_t idx) {
241
-      CHECK_IDX();
242
-      SERIAL_ECHOPAIR("Encoder ",idx);
243
-      SERIAL_ECHOPGM(": ");
244
-      encoders[idx].get_raw_count();
245
-      encoders[idx].passes_test(true);
246
-    }
247
-
248
-    static void report_error(const int8_t idx) {
249
-      CHECK_IDX();
250
-      encoders[idx].get_axis_error_steps(true);
251
-    }
252
-
253
-    static void test_axis(const int8_t idx) {
254
-      CHECK_IDX();
255
-      encoders[idx].test_axis();
256
-    }
257
-
258
-    static void calibrate_steps_mm(const int8_t idx, const int iterations) {
259
-      CHECK_IDX();
260
-      encoders[idx].calibrate_steps_mm(iterations);
261
-    }
262
-
263
-    static void change_module_address(const uint8_t oldaddr, const uint8_t newaddr);
264
-    static void report_module_firmware(const uint8_t address);
265
-
266
-    static void report_error_count(const int8_t idx, const AxisEnum axis) {
267
-      CHECK_IDX();
268
-      SERIAL_ECHOPAIR("Error count on ", axis_codes[axis]);
269
-      SERIAL_ECHOLNPAIR(" axis is ", encoders[idx].get_error_count());
270
-    }
271
-
272
-    static void reset_error_count(const int8_t idx, const AxisEnum axis) {
273
-      CHECK_IDX();
274
-      encoders[idx].set_error_count(0);
275
-      SERIAL_ECHOPAIR("Error count on ", axis_codes[axis]);
276
-      SERIAL_ECHOLNPGM(" axis has been reset.");
277
-    }
278
-
279
-    static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) {
280
-      CHECK_IDX();
281
-      encoders[idx].set_ec_enabled(enabled);
282
-      SERIAL_ECHOPAIR("Error correction on ", axis_codes[axis]);
283
-      SERIAL_ECHOPGM(" axis is ");
284
-      serialprintPGM(encoders[idx].get_ec_enabled() ? PSTR("en") : PSTR("dis"));
285
-      SERIAL_ECHOLNPGM("abled.");
286
-    }
287
-
288
-    static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {
289
-      CHECK_IDX();
290
-      encoders[idx].set_ec_threshold(newThreshold);
291
-      SERIAL_ECHOPAIR("Error correct threshold for ", axis_codes[axis]);
292
-      SERIAL_ECHOPAIR_F(" axis set to ", newThreshold);
293
-      SERIAL_ECHOLNPGM("mm.");
294
-    }
295
-
296
-    static void get_ec_threshold(const int8_t idx, const AxisEnum axis) {
297
-      CHECK_IDX();
298
-      const float threshold = encoders[idx].get_ec_threshold();
299
-      SERIAL_ECHOPAIR("Error correct threshold for ", axis_codes[axis]);
300
-      SERIAL_ECHOPAIR_F(" axis is ", threshold);
301
-      SERIAL_ECHOLNPGM("mm.");
302
-    }
303
-
304
-    static int8_t idx_from_axis(const AxisEnum axis) {
305
-      LOOP_PE(i)
306
-        if (encoders[i].get_axis() == axis) return i;
307
-      return -1;
308
-    }
309
-
310
-    static int8_t idx_from_addr(const uint8_t addr) {
311
-      LOOP_PE(i)
312
-        if (encoders[i].get_address() == addr) return i;
313
-      return -1;
314
-    }
315
-
316
-    static int8_t parse();
317
-
318
-    static void M860();
319
-    static void M861();
320
-    static void M862();
321
-    static void M863();
322
-    static void M864();
323
-    static void M865();
324
-    static void M866();
325
-    static void M867();
326
-    static void M868();
327
-    static void M869();
328
-
329
-    static I2CPositionEncoder encoders[I2CPE_ENCODER_CNT];
330
-  };
331
-
332
-  extern I2CPositionEncodersMgr I2CPEM;
333
-
334
-  FORCE_INLINE static void gcode_M860() { I2CPEM.M860(); }
335
-  FORCE_INLINE static void gcode_M861() { I2CPEM.M861(); }
336
-  FORCE_INLINE static void gcode_M862() { I2CPEM.M862(); }
337
-  FORCE_INLINE static void gcode_M863() { I2CPEM.M863(); }
338
-  FORCE_INLINE static void gcode_M864() { I2CPEM.M864(); }
339
-  FORCE_INLINE static void gcode_M865() { I2CPEM.M865(); }
340
-  FORCE_INLINE static void gcode_M866() { I2CPEM.M866(); }
341
-  FORCE_INLINE static void gcode_M867() { I2CPEM.M867(); }
342
-  FORCE_INLINE static void gcode_M868() { I2CPEM.M868(); }
343
-  FORCE_INLINE static void gcode_M869() { I2CPEM.M869(); }
344
-
345
-#endif //I2C_POSITION_ENCODERS
346
-#endif //I2CPOSENC_H

+ 0
- 333
Marlin/M100_Free_Mem_Chk.cpp View File

@@ -1,333 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * M100 Free Memory Watcher
25
- *
26
- * This code watches the free memory block between the bottom of the heap and the top of the stack.
27
- * This memory block is initialized and watched via the M100 command.
28
- *
29
- * M100 I   Initializes the free memory block and prints vitals statistics about the area
30
- *
31
- * M100 F   Identifies how much of the free memory block remains free and unused. It also
32
- *          detects and reports any corruption within the free memory block that may have
33
- *          happened due to errant firmware.
34
- *
35
- * M100 D   Does a hex display of the free memory block along with a flag for any errant
36
- *          data that does not match the expected value.
37
- *
38
- * M100 C x Corrupts x locations within the free memory block. This is useful to check the
39
- *          correctness of the M100 F and M100 D commands.
40
- *
41
- * Also, there are two support functions that can be called from a developer's C code.
42
- *
43
- *    uint16_t check_for_free_memory_corruption(const char * const ptr);
44
- *    void M100_dump_routine(const char * const title, const char *start, const char *end);
45
- *
46
- * Initial version by Roxy-3D
47
- */
48
-#define M100_FREE_MEMORY_DUMPER     // Enable for the `M110 D` Dump sub-command
49
-#define M100_FREE_MEMORY_CORRUPTOR  // Enable for the `M100 C` Corrupt sub-command
50
-
51
-#include "MarlinConfig.h"
52
-
53
-#if ENABLED(M100_FREE_MEMORY_WATCHER)
54
-
55
-#define TEST_BYTE ((char) 0xE5)
56
-
57
-extern char command_queue[BUFSIZE][MAX_CMD_SIZE];
58
-
59
-extern char* __brkval;
60
-extern size_t  __heap_start, __heap_end, __flp;
61
-extern char __bss_end;
62
-
63
-#include "Marlin.h"
64
-#include "gcode.h"
65
-#include "hex_print_routines.h"
66
-
67
-//
68
-// Utility functions
69
-//
70
-
71
-#define END_OF_HEAP() (__brkval ? __brkval : &__bss_end)
72
-int check_for_free_memory_corruption(const char * const title);
73
-
74
-// Location of a variable on its stack frame. Returns a value above
75
-// the stack (once the function returns to the caller).
76
-char* top_of_stack() {
77
-  char x;
78
-  return &x + 1; // x is pulled on return;
79
-}
80
-
81
-// Count the number of test bytes at the specified location.
82
-int16_t count_test_bytes(const char * const ptr) {
83
-  for (uint16_t i = 0; i < 32000; i++)
84
-    if (((char) ptr[i]) != TEST_BYTE)
85
-      return i - 1;
86
-
87
-  return -1;
88
-}
89
-
90
-//
91
-// M100 sub-commands
92
-//
93
-
94
-#if ENABLED(M100_FREE_MEMORY_DUMPER)
95
-  /**
96
-   * M100 D
97
-   *  Dump the free memory block from __brkval to the stack pointer.
98
-   *  malloc() eats memory from the start of the block and the stack grows
99
-   *  up from the bottom of the block. Solid test bytes indicate nothing has
100
-   *  used that memory yet. There should not be anything but test bytes within
101
-   *  the block. If so, it may indicate memory corruption due to a bad pointer.
102
-   *  Unexpected bytes are flagged in the right column.
103
-   */
104
-  void dump_free_memory(const char *ptr, const char *sp) {
105
-    //
106
-    // Start and end the dump on a nice 16 byte boundary
107
-    // (even though the values are not 16-byte aligned).
108
-    //
109
-    ptr = (char *)((uint16_t)ptr & 0xFFF0); // Align to 16-byte boundary
110
-    sp  = (char *)((uint16_t)sp  | 0x000F); // Align sp to the 15th byte (at or above sp)
111
-
112
-    // Dump command main loop
113
-    while (ptr < sp) {
114
-      print_hex_word((uint16_t)ptr);      // Print the address
115
-      SERIAL_CHAR(':');
116
-      for (uint8_t i = 0; i < 16; i++) {  // and 16 data bytes
117
-        if (i == 8) SERIAL_CHAR('-');
118
-        print_hex_byte(ptr[i]);
119
-        SERIAL_CHAR(' ');
120
-      }
121
-      safe_delay(25);
122
-      SERIAL_CHAR('|');                   // Point out non test bytes
123
-      for (uint8_t i = 0; i < 16; i++) {
124
-        char ccc = (char)ptr[i]; // cast to char before automatically casting to char on assignment, in case the compiler is broken
125
-        if (&ptr[i] >= (const char*)command_queue && &ptr[i] < (const char*)(command_queue + sizeof(command_queue))) { // Print out ASCII in the command buffer area
126
-          if (!WITHIN(ccc, ' ', 0x7E)) ccc = ' ';
127
-        }
128
-        else { // If not in the command buffer area, flag bytes that don't match the test byte
129
-          ccc = (ccc == TEST_BYTE) ? ' ' : '?';
130
-        }
131
-        SERIAL_CHAR(ccc);
132
-      }
133
-      SERIAL_EOL();
134
-      ptr += 16;
135
-      safe_delay(25);
136
-      idle();
137
-    }
138
-  }
139
-
140
-void M100_dump_routine(const char * const title, const char *start, const char *end) {
141
-  SERIAL_ECHOLN(title);
142
-  //
143
-  // Round the start and end locations to produce full lines of output
144
-  //
145
-  start = (char*)((uint16_t) start & 0xFFF0);
146
-  end   = (char*)((uint16_t) end   | 0x000F);
147
-  dump_free_memory(start, end);
148
-}
149
-
150
-#endif // M100_FREE_MEMORY_DUMPER
151
-
152
-/**
153
- * M100 F
154
- *  Return the number of free bytes in the memory pool,
155
- *  with other vital statistics defining the pool.
156
- */
157
-void free_memory_pool_report(char * const ptr, const int16_t size) {
158
-  int16_t max_cnt = -1, block_cnt = 0;
159
-  char *max_addr = NULL;
160
-  // Find the longest block of test bytes in the buffer
161
-  for (int16_t i = 0; i < size; i++) {
162
-    char *addr = ptr + i;
163
-    if (*addr == TEST_BYTE) {
164
-      const int16_t j = count_test_bytes(addr);
165
-      if (j > 8) {
166
-        SERIAL_ECHOPAIR("Found ", j);
167
-        SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr));
168
-        if (j > max_cnt) {
169
-          max_cnt  = j;
170
-          max_addr = addr;
171
-        }
172
-        i += j;
173
-        block_cnt++;
174
-      }
175
-    }
176
-  }
177
-  if (block_cnt > 1) {
178
-    SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
179
-    SERIAL_ECHOPAIR("\nLargest free block is ", max_cnt);
180
-    SERIAL_ECHOLNPAIR(" bytes at ", hex_address(max_addr));
181
-  }
182
-  SERIAL_ECHOLNPAIR("check_for_free_memory_corruption() = ", check_for_free_memory_corruption("M100 F "));
183
-}
184
-
185
-#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
186
-  /**
187
-   * M100 C<num>
188
-   *  Corrupt <num> locations in the free memory pool and report the corrupt addresses.
189
-   *  This is useful to check the correctness of the M100 D and the M100 F commands.
190
-   */
191
-  void corrupt_free_memory(char *ptr, const uint16_t size) {
192
-    ptr += 8;
193
-    const uint16_t near_top = top_of_stack() - ptr - 250, // -250 to avoid interrupt activity that's altered the stack.
194
-                   j = near_top / (size + 1);
195
-
196
-    SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
197
-    for (uint16_t i = 1; i <= size; i++) {
198
-      char * const addr = ptr + i * j;
199
-      *addr = i;
200
-      SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr));
201
-    }
202
-    SERIAL_EOL();
203
-  }
204
-#endif // M100_FREE_MEMORY_CORRUPTOR
205
-
206
-/**
207
- * M100 I
208
- *  Init memory for the M100 tests. (Automatically applied on the first M100.)
209
- */
210
-void init_free_memory(char *ptr, int16_t size) {
211
-  SERIAL_ECHOLNPGM("Initializing free memory block.\n\n");
212
-
213
-  size -= 250;    // -250 to avoid interrupt activity that's altered the stack.
214
-  if (size < 0) {
215
-    SERIAL_ECHOLNPGM("Unable to initialize.\n");
216
-    return;
217
-  }
218
-
219
-  ptr += 8;       // move a few bytes away from the heap just because we don't want
220
-                  // to be altering memory that close to it.
221
-  memset(ptr, TEST_BYTE, size);
222
-
223
-  SERIAL_ECHO(size);
224
-  SERIAL_ECHOLNPGM(" bytes of memory initialized.\n");
225
-
226
-  for (int16_t i = 0; i < size; i++) {
227
-    if (ptr[i] != TEST_BYTE) {
228
-      SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i));
229
-      SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i]));
230
-      SERIAL_EOL();
231
-    }
232
-  }
233
-}
234
-
235
-/**
236
- * M100: Free Memory Check
237
- */
238
-void gcode_M100() {
239
-  SERIAL_ECHOPAIR("\n__brkval : ", hex_address(__brkval));
240
-  SERIAL_ECHOPAIR("\n__bss_end : ", hex_address(&__bss_end));
241
-
242
-  char *ptr = END_OF_HEAP(), *sp = top_of_stack();
243
-
244
-  SERIAL_ECHOPAIR("\nstart of free space : ", hex_address(ptr));
245
-  SERIAL_ECHOLNPAIR("\nStack Pointer : ", hex_address(sp));
246
-
247
-  // Always init on the first invocation of M100
248
-  static bool m100_not_initialized = true;
249
-  if (m100_not_initialized || parser.seen('I')) {
250
-    m100_not_initialized = false;
251
-    init_free_memory(ptr, sp - ptr);
252
-  }
253
-
254
-  #if ENABLED(M100_FREE_MEMORY_DUMPER)
255
-    if (parser.seen('D'))
256
-      return dump_free_memory(ptr, sp);
257
-  #endif
258
-
259
-  if (parser.seen('F'))
260
-    return free_memory_pool_report(ptr, sp - ptr);
261
-
262
-  #if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
263
-
264
-    if (parser.seen('C'))
265
-      return corrupt_free_memory(ptr, parser.value_int());
266
-
267
-  #endif
268
-}
269
-
270
-int check_for_free_memory_corruption(const char * const title) {
271
-  SERIAL_ECHO(title);
272
-
273
-  char *ptr = END_OF_HEAP(), *sp = top_of_stack();
274
-  int n = sp - ptr;
275
-
276
-  SERIAL_ECHOPAIR("\nfmc() n=", n);
277
-  SERIAL_ECHOPAIR("\n&__brkval: ", hex_address(&__brkval));
278
-  SERIAL_ECHOPAIR("=",             hex_address(__brkval));
279
-  SERIAL_ECHOPAIR("\n__bss_end: ", hex_address(&__bss_end));
280
-  SERIAL_ECHOPAIR(" sp=",          hex_address(sp));
281
-
282
-  if (sp < ptr)  {
283
-    SERIAL_ECHOPGM(" sp < Heap ");
284
-    // SET_INPUT_PULLUP(63);           // if the developer has a switch wired up to their controller board
285
-    // safe_delay(5);                  // this code can be enabled to pause the display as soon as the
286
-    // while ( READ(63))               // malfunction is detected.   It is currently defaulting to a switch
287
-    //   idle();                       // being on pin-63 which is unassigend and available on most controller
288
-    // safe_delay(20);                 // boards.
289
-    // while ( !READ(63))
290
-    //   idle();
291
-    safe_delay(20);
292
-    #ifdef M100_FREE_MEMORY_DUMPER
293
-      M100_dump_routine("   Memory corruption detected with sp<Heap\n", (char*)0x1B80, (char*)0x21FF);
294
-    #endif
295
-  }
296
-
297
-  // Scan through the range looking for the biggest block of 0xE5's we can find
298
-  int block_cnt = 0;
299
-  for (int i = 0; i < n; i++) {
300
-    if (ptr[i] == TEST_BYTE) {
301
-      int16_t j = count_test_bytes(ptr + i);
302
-      if (j > 8) {
303
-        // SERIAL_ECHOPAIR("Found ", j);
304
-        // SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(ptr + i));
305
-        i += j;
306
-        block_cnt++;
307
-        SERIAL_ECHOPAIR(" (", block_cnt);
308
-        SERIAL_ECHOPAIR(") found=", j);
309
-        SERIAL_ECHOPGM("   ");
310
-      }
311
-    }
312
-  }
313
-  SERIAL_ECHOPAIR("  block_found=", block_cnt);
314
-
315
-  if (block_cnt != 1 || __brkval != 0x0000)
316
-    SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area.");
317
-
318
-  if (block_cnt == 0)       // Make sure the special case of no free blocks shows up as an
319
-    block_cnt = -1;         // error to the calling code!
320
-
321
-  SERIAL_ECHOPGM(" return=");
322
-  if (block_cnt == 1) {
323
-    SERIAL_CHAR('0');       // if the block_cnt is 1, nothing has broken up the free memory
324
-    SERIAL_EOL();             // area and it is appropriate to say 'no corruption'.
325
-    return 0;
326
-  }
327
-  SERIAL_ECHOLNPGM("true");
328
-  return block_cnt;
329
-}
330
-
331
-#endif // M100_FREE_MEMORY_WATCHER
332
-
333
-

+ 593
- 248
Marlin/Makefile
File diff suppressed because it is too large
View File


+ 0
- 542
Marlin/Marlin.h View File

@@ -1,542 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#ifndef MARLIN_H
23
-#define MARLIN_H
24
-
25
-#include <math.h>
26
-#include <stdio.h>
27
-#include <stdlib.h>
28
-#include <string.h>
29
-#include <inttypes.h>
30
-
31
-#include <util/delay.h>
32
-#include <avr/pgmspace.h>
33
-#include <avr/eeprom.h>
34
-#include <avr/interrupt.h>
35
-
36
-#include "MarlinConfig.h"
37
-
38
-#ifdef DEBUG_GCODE_PARSER
39
-  #include "gcode.h"
40
-#endif
41
-
42
-#include "enum.h"
43
-#include "types.h"
44
-#include "fastio.h"
45
-#include "utility.h"
46
-#include "serial.h"
47
-
48
-#if ENABLED(PRINTCOUNTER)
49
-  #include "printcounter.h"
50
-#else
51
-  #include "stopwatch.h"
52
-#endif
53
-
54
-void idle(
55
-  #if ENABLED(ADVANCED_PAUSE_FEATURE)
56
-    bool no_stepper_sleep = false  // pass true to keep steppers from disabling on timeout
57
-  #endif
58
-);
59
-
60
-void manage_inactivity(bool ignore_stepper_queue = false);
61
-
62
-#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
63
-  extern bool extruder_duplication_enabled;
64
-#endif
65
-
66
-#if HAS_X2_ENABLE
67
-  #define  enable_X() do{ X_ENABLE_WRITE( X_ENABLE_ON); X2_ENABLE_WRITE( X_ENABLE_ON); }while(0)
68
-  #define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); X2_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0)
69
-#elif HAS_X_ENABLE
70
-  #define  enable_X() X_ENABLE_WRITE( X_ENABLE_ON)
71
-  #define disable_X() do{ X_ENABLE_WRITE(!X_ENABLE_ON); axis_known_position[X_AXIS] = false; }while(0)
72
-#else
73
-  #define  enable_X() NOOP
74
-  #define disable_X() NOOP
75
-#endif
76
-
77
-#if HAS_Y2_ENABLE
78
-  #define  enable_Y() do{ Y_ENABLE_WRITE( Y_ENABLE_ON); Y2_ENABLE_WRITE(Y_ENABLE_ON); }while(0)
79
-  #define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); Y2_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0)
80
-#elif HAS_Y_ENABLE
81
-  #define  enable_Y() Y_ENABLE_WRITE( Y_ENABLE_ON)
82
-  #define disable_Y() do{ Y_ENABLE_WRITE(!Y_ENABLE_ON); axis_known_position[Y_AXIS] = false; }while(0)
83
-#else
84
-  #define  enable_Y() NOOP
85
-  #define disable_Y() NOOP
86
-#endif
87
-
88
-#if HAS_Z2_ENABLE
89
-  #define  enable_Z() do{ Z_ENABLE_WRITE( Z_ENABLE_ON); Z2_ENABLE_WRITE(Z_ENABLE_ON); }while(0)
90
-  #define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); Z2_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0)
91
-#elif HAS_Z_ENABLE
92
-  #define  enable_Z() Z_ENABLE_WRITE( Z_ENABLE_ON)
93
-  #define disable_Z() do{ Z_ENABLE_WRITE(!Z_ENABLE_ON); axis_known_position[Z_AXIS] = false; }while(0)
94
-#else
95
-  #define  enable_Z() NOOP
96
-  #define disable_Z() NOOP
97
-#endif
98
-
99
-#if ENABLED(MIXING_EXTRUDER)
100
-
101
-  /**
102
-   * Mixing steppers synchronize their enable (and direction) together
103
-   */
104
-  #if MIXING_STEPPERS > 3
105
-    #define  enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); E3_ENABLE_WRITE( E_ENABLE_ON); }
106
-    #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); E3_ENABLE_WRITE(!E_ENABLE_ON); }
107
-  #elif MIXING_STEPPERS > 2
108
-    #define  enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); E2_ENABLE_WRITE( E_ENABLE_ON); }
109
-    #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); E2_ENABLE_WRITE(!E_ENABLE_ON); }
110
-  #else
111
-    #define  enable_E0() { E0_ENABLE_WRITE( E_ENABLE_ON); E1_ENABLE_WRITE( E_ENABLE_ON); }
112
-    #define disable_E0() { E0_ENABLE_WRITE(!E_ENABLE_ON); E1_ENABLE_WRITE(!E_ENABLE_ON); }
113
-  #endif
114
-  #define  enable_E1() NOOP
115
-  #define disable_E1() NOOP
116
-  #define  enable_E2() NOOP
117
-  #define disable_E2() NOOP
118
-  #define  enable_E3() NOOP
119
-  #define disable_E3() NOOP
120
-  #define  enable_E4() NOOP
121
-  #define disable_E4() NOOP
122
-
123
-#else // !MIXING_EXTRUDER
124
-
125
-  #if HAS_E0_ENABLE
126
-    #define  enable_E0() E0_ENABLE_WRITE( E_ENABLE_ON)
127
-    #define disable_E0() E0_ENABLE_WRITE(!E_ENABLE_ON)
128
-  #else
129
-    #define  enable_E0() NOOP
130
-    #define disable_E0() NOOP
131
-  #endif
132
-
133
-  #if E_STEPPERS > 1 && HAS_E1_ENABLE
134
-    #define  enable_E1() E1_ENABLE_WRITE( E_ENABLE_ON)
135
-    #define disable_E1() E1_ENABLE_WRITE(!E_ENABLE_ON)
136
-  #else
137
-    #define  enable_E1() NOOP
138
-    #define disable_E1() NOOP
139
-  #endif
140
-
141
-  #if E_STEPPERS > 2 && HAS_E2_ENABLE
142
-    #define  enable_E2() E2_ENABLE_WRITE( E_ENABLE_ON)
143
-    #define disable_E2() E2_ENABLE_WRITE(!E_ENABLE_ON)
144
-  #else
145
-    #define  enable_E2() NOOP
146
-    #define disable_E2() NOOP
147
-  #endif
148
-
149
-  #if E_STEPPERS > 3 && HAS_E3_ENABLE
150
-    #define  enable_E3() E3_ENABLE_WRITE( E_ENABLE_ON)
151
-    #define disable_E3() E3_ENABLE_WRITE(!E_ENABLE_ON)
152
-  #else
153
-    #define  enable_E3() NOOP
154
-    #define disable_E3() NOOP
155
-  #endif
156
-
157
-  #if E_STEPPERS > 4 && HAS_E4_ENABLE
158
-    #define  enable_E4() E4_ENABLE_WRITE( E_ENABLE_ON)
159
-    #define disable_E4() E4_ENABLE_WRITE(!E_ENABLE_ON)
160
-  #else
161
-    #define  enable_E4() NOOP
162
-    #define disable_E4() NOOP
163
-  #endif
164
-
165
-#endif // !MIXING_EXTRUDER
166
-
167
-#if ENABLED(G38_PROBE_TARGET)
168
-  extern bool G38_move,        // flag to tell the interrupt handler that a G38 command is being run
169
-              G38_endstop_hit; // flag from the interrupt handler to indicate if the endstop went active
170
-#endif
171
-
172
-/**
173
- * The axis order in all axis related arrays is X, Y, Z, E
174
- */
175
-#define _AXIS(AXIS) AXIS ##_AXIS
176
-
177
-void enable_all_steppers();
178
-void disable_e_steppers();
179
-void disable_all_steppers();
180
-
181
-void FlushSerialRequestResend();
182
-void ok_to_send();
183
-
184
-void kill(const char*);
185
-
186
-void quickstop_stepper();
187
-
188
-#if ENABLED(FILAMENT_RUNOUT_SENSOR)
189
-  void handle_filament_runout();
190
-#endif
191
-
192
-extern uint8_t marlin_debug_flags;
193
-#define DEBUGGING(F) (marlin_debug_flags & (DEBUG_## F))
194
-
195
-extern bool Running;
196
-inline bool IsRunning() { return  Running; }
197
-inline bool IsStopped() { return !Running; }
198
-
199
-bool enqueue_and_echo_command(const char* cmd, bool say_ok=false); // Add a single command to the end of the buffer. Return false on failure.
200
-void enqueue_and_echo_commands_P(const char * const cmd);          // Set one or more commands to be prioritized over the next Serial/SD command.
201
-void clear_command_queue();
202
-
203
-extern millis_t previous_cmd_ms;
204
-inline void refresh_cmd_timeout() { previous_cmd_ms = millis(); }
205
-
206
-#if ENABLED(FAST_PWM_FAN)
207
-  void setPwmFrequency(uint8_t pin, int val);
208
-#endif
209
-
210
-/**
211
- * Feedrate scaling and conversion
212
- */
213
-extern float feedrate_mm_s;
214
-extern int16_t feedrate_percentage;
215
-
216
-#define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01)
217
-
218
-extern bool axis_relative_modes[];
219
-extern bool axis_known_position[XYZ];
220
-extern bool axis_homed[XYZ];
221
-extern volatile bool wait_for_heatup;
222
-
223
-#if HAS_RESUME_CONTINUE
224
-  extern volatile bool wait_for_user;
225
-#endif
226
-
227
-extern float current_position[XYZE], destination[XYZE];
228
-
229
-// Workspace offsets
230
-#if HAS_WORKSPACE_OFFSET
231
-  #if HAS_HOME_OFFSET
232
-    extern float home_offset[XYZ];
233
-  #endif
234
-  #if HAS_POSITION_SHIFT
235
-    extern float position_shift[XYZ];
236
-  #endif
237
-#endif
238
-
239
-#if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
240
-  extern float workspace_offset[XYZ];
241
-  #define WORKSPACE_OFFSET(AXIS) workspace_offset[AXIS]
242
-#elif HAS_HOME_OFFSET
243
-  #define WORKSPACE_OFFSET(AXIS) home_offset[AXIS]
244
-#elif HAS_POSITION_SHIFT
245
-  #define WORKSPACE_OFFSET(AXIS) position_shift[AXIS]
246
-#else
247
-  #define WORKSPACE_OFFSET(AXIS) 0
248
-#endif
249
-
250
-#define NATIVE_TO_LOGICAL(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
251
-#define LOGICAL_TO_NATIVE(POS, AXIS) ((POS) - WORKSPACE_OFFSET(AXIS))
252
-
253
-#if HAS_POSITION_SHIFT || DISABLED(DELTA)
254
-  #define LOGICAL_X_POSITION(POS)   NATIVE_TO_LOGICAL(POS, X_AXIS)
255
-  #define LOGICAL_Y_POSITION(POS)   NATIVE_TO_LOGICAL(POS, Y_AXIS)
256
-  #define RAW_X_POSITION(POS)       LOGICAL_TO_NATIVE(POS, X_AXIS)
257
-  #define RAW_Y_POSITION(POS)       LOGICAL_TO_NATIVE(POS, Y_AXIS)
258
-#else
259
-  #define LOGICAL_X_POSITION(POS)   (POS)
260
-  #define LOGICAL_Y_POSITION(POS)   (POS)
261
-  #define RAW_X_POSITION(POS)       (POS)
262
-  #define RAW_Y_POSITION(POS)       (POS)
263
-#endif
264
-
265
-#define LOGICAL_Z_POSITION(POS)     NATIVE_TO_LOGICAL(POS, Z_AXIS)
266
-#define RAW_Z_POSITION(POS)         LOGICAL_TO_NATIVE(POS, Z_AXIS)
267
-
268
-// Hotend Offsets
269
-#if HOTENDS > 1
270
-  extern float hotend_offset[XYZ][HOTENDS];
271
-#endif
272
-
273
-// Software Endstops
274
-extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
275
-
276
-#if HAS_SOFTWARE_ENDSTOPS
277
-  extern bool soft_endstops_enabled;
278
-  void clamp_to_software_endstops(float target[XYZ]);
279
-#else
280
-  #define soft_endstops_enabled false
281
-  #define clamp_to_software_endstops(x) NOOP
282
-#endif
283
-
284
-#if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
285
-  void update_software_endstops(const AxisEnum axis);
286
-#endif
287
-
288
-#if ENABLED(CNC_COORDINATE_SYSTEMS)
289
-  #define MAX_COORDINATE_SYSTEMS 9
290
-  extern float coordinate_system[MAX_COORDINATE_SYSTEMS][XYZ];
291
-  bool select_coordinate_system(const int8_t _new);
292
-#endif
293
-
294
-void report_current_position();
295
-
296
-#if IS_KINEMATIC
297
-  extern float delta[ABC];
298
-  void inverse_kinematics(const float raw[XYZ]);
299
-#endif
300
-
301
-#if ENABLED(DELTA)
302
-  extern float delta_height,
303
-               delta_endstop_adj[ABC],
304
-               delta_radius,
305
-               delta_tower_angle_trim[ABC],
306
-               delta_tower[ABC][2],
307
-               delta_diagonal_rod,
308
-               delta_calibration_radius,
309
-               delta_diagonal_rod_2_tower[ABC],
310
-               delta_segments_per_second,
311
-               delta_clip_start_height;
312
-
313
-  void recalc_delta_settings();
314
-  float delta_safe_distance_from_top();
315
-
316
-  #if ENABLED(DELTA_FAST_SQRT)
317
-    float Q_rsqrt(const float number);
318
-    #define _SQRT(n) (1.0f / Q_rsqrt(n))
319
-  #else
320
-    #define _SQRT(n) SQRT(n)
321
-  #endif
322
-
323
-  // Macro to obtain the Z position of an individual tower
324
-  #define DELTA_Z(T) raw[Z_AXIS] + _SQRT(     \
325
-    delta_diagonal_rod_2_tower[T] - HYPOT2(   \
326
-        delta_tower[T][X_AXIS] - raw[X_AXIS], \
327
-        delta_tower[T][Y_AXIS] - raw[Y_AXIS]  \
328
-      )                                       \
329
-    )
330
-
331
-  #define DELTA_RAW_IK() do {        \
332
-    delta[A_AXIS] = DELTA_Z(A_AXIS); \
333
-    delta[B_AXIS] = DELTA_Z(B_AXIS); \
334
-    delta[C_AXIS] = DELTA_Z(C_AXIS); \
335
-  }while(0)
336
-
337
-#elif IS_SCARA
338
-  void forward_kinematics_SCARA(const float &a, const float &b);
339
-#endif
340
-
341
-#if ENABLED(G26_MESH_VALIDATION)
342
-  extern bool g26_debug_flag;
343
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
344
-  constexpr bool g26_debug_flag = false;
345
-#endif
346
-
347
-#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
348
-  #define _GET_MESH_X(I) (bilinear_start[X_AXIS] + (I) * bilinear_grid_spacing[X_AXIS])
349
-  #define _GET_MESH_Y(J) (bilinear_start[Y_AXIS] + (J) * bilinear_grid_spacing[Y_AXIS])
350
-#elif ENABLED(AUTO_BED_LEVELING_UBL)
351
-  #define _GET_MESH_X(I) ubl.mesh_index_to_xpos(I)
352
-  #define _GET_MESH_Y(J) ubl.mesh_index_to_ypos(J)
353
-#elif ENABLED(MESH_BED_LEVELING)
354
-  #define _GET_MESH_X(I) mbl.index_to_xpos[I]
355
-  #define _GET_MESH_Y(J) mbl.index_to_ypos[J]
356
-#endif
357
-
358
-#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
359
-  extern int bilinear_grid_spacing[2], bilinear_start[2];
360
-  extern float bilinear_grid_factor[2],
361
-               z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
362
-  float bilinear_z_offset(const float raw[XYZ]);
363
-#endif
364
-
365
-#if ENABLED(AUTO_BED_LEVELING_UBL)
366
-  typedef struct { double A, B, D; } linear_fit;
367
-  linear_fit* lsf_linear_fit(double x[], double y[], double z[], const int);
368
-#endif
369
-
370
-#if HAS_LEVELING
371
-  bool leveling_is_valid();
372
-  void set_bed_leveling_enabled(const bool enable=true);
373
-  void reset_bed_level();
374
-#endif
375
-
376
-#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
377
-  void set_z_fade_height(const float zfh, const bool do_report=true);
378
-#endif
379
-
380
-#if ENABLED(X_DUAL_ENDSTOPS)
381
-  extern float x_endstop_adj;
382
-#endif
383
-#if ENABLED(Y_DUAL_ENDSTOPS)
384
-  extern float y_endstop_adj;
385
-#endif
386
-#if ENABLED(Z_DUAL_ENDSTOPS)
387
-  extern float z_endstop_adj;
388
-#endif
389
-
390
-#if HAS_BED_PROBE
391
-  extern float zprobe_zoffset;
392
-  #define DEPLOY_PROBE() set_probe_deployed(true)
393
-  #define STOW_PROBE() set_probe_deployed(false)
394
-#else
395
-  #define DEPLOY_PROBE()
396
-  #define STOW_PROBE()
397
-#endif
398
-
399
-#if ENABLED(HOST_KEEPALIVE_FEATURE)
400
-  extern MarlinBusyState busy_state;
401
-  #define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0)
402
-#else
403
-  #define KEEPALIVE_STATE(n) NOOP
404
-#endif
405
-
406
-#if FAN_COUNT > 0
407
-  extern int16_t fanSpeeds[FAN_COUNT];
408
-  #if ENABLED(EXTRA_FAN_SPEED)
409
-    extern int16_t old_fanSpeeds[FAN_COUNT],
410
-                   new_fanSpeeds[FAN_COUNT];
411
-  #endif
412
-  #if ENABLED(PROBING_FANS_OFF)
413
-    extern bool fans_paused;
414
-    extern int16_t paused_fanSpeeds[FAN_COUNT];
415
-  #endif
416
-#endif
417
-
418
-#if ENABLED(BARICUDA)
419
-  extern uint8_t baricuda_valve_pressure, baricuda_e_to_p_pressure;
420
-#endif
421
-
422
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
423
-  extern bool filament_sensor;         // Flag that filament sensor readings should control extrusion
424
-  extern float filament_width_nominal, // Theoretical filament diameter i.e., 3.00 or 1.75
425
-               filament_width_meas;    // Measured filament diameter
426
-  extern uint8_t meas_delay_cm,        // Delay distance
427
-                 measurement_delay[];  // Ring buffer to delay measurement
428
-  extern int8_t filwidth_delay_index[2]; // Ring buffer indexes. Used by planner, temperature, and main code
429
-#endif
430
-
431
-#if ENABLED(ADVANCED_PAUSE_FEATURE)
432
-  extern AdvancedPauseMenuResponse advanced_pause_menu_response;
433
-#endif
434
-
435
-#if ENABLED(PID_EXTRUSION_SCALING)
436
-  extern int lpq_len;
437
-#endif
438
-
439
-#if ENABLED(FWRETRACT)
440
-  extern bool autoretract_enabled;                 // M209 S - Autoretract switch
441
-  extern float retract_length,                     // M207 S - G10 Retract length
442
-               retract_feedrate_mm_s,              // M207 F - G10 Retract feedrate
443
-               retract_zlift,                      // M207 Z - G10 Retract hop size
444
-               retract_recover_length,             // M208 S - G11 Recover length
445
-               retract_recover_feedrate_mm_s,      // M208 F - G11 Recover feedrate
446
-               swap_retract_length,                // M207 W - G10 Swap Retract length
447
-               swap_retract_recover_length,        // M208 W - G11 Swap Recover length
448
-               swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
449
-#endif
450
-
451
-// Print job timer
452
-#if ENABLED(PRINTCOUNTER)
453
-  extern PrintCounter print_job_timer;
454
-#else
455
-  extern Stopwatch print_job_timer;
456
-#endif
457
-
458
-// Handling multiple extruders pins
459
-extern uint8_t active_extruder;
460
-
461
-#if ENABLED(MIXING_EXTRUDER)
462
-  extern float mixing_factor[MIXING_STEPPERS];
463
-#endif
464
-
465
-inline void set_current_from_destination() { COPY(current_position, destination); }
466
-inline void set_destination_from_current() { COPY(destination, current_position); }
467
-void prepare_move_to_destination();
468
-
469
-/**
470
- * Blocking movement and shorthand functions
471
- */
472
-void do_blocking_move_to(const float &x, const float &y, const float &z, const float &fr_mm_s=0.0);
473
-void do_blocking_move_to_x(const float &x, const float &fr_mm_s=0.0);
474
-void do_blocking_move_to_z(const float &z, const float &fr_mm_s=0.0);
475
-void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0);
476
-
477
-#define HAS_AXIS_UNHOMED_ERR (                                                     \
478
-         ENABLED(Z_PROBE_ALLEN_KEY)                                                \
479
-      || ENABLED(Z_PROBE_SLED)                                                     \
480
-      || HAS_PROBING_PROCEDURE                                                     \
481
-      || HOTENDS > 1                                                               \
482
-      || ENABLED(NOZZLE_CLEAN_FEATURE)                                             \
483
-      || ENABLED(NOZZLE_PARK_FEATURE)                                              \
484
-      || (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
485
-      || HAS_M206_COMMAND                                                          \
486
-    ) || ENABLED(NO_MOTION_BEFORE_HOMING)
487
-
488
-#if HAS_AXIS_UNHOMED_ERR
489
-  bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
490
-#endif
491
-
492
-/**
493
- * position_is_reachable family of functions
494
- */
495
-
496
-#if IS_KINEMATIC // (DELTA or SCARA)
497
-
498
-  #if IS_SCARA
499
-    extern const float L1, L2;
500
-  #endif
501
-
502
-  inline bool position_is_reachable(const float &rx, const float &ry) {
503
-    #if ENABLED(DELTA)
504
-      return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS);
505
-    #elif IS_SCARA
506
-      #if MIDDLE_DEAD_ZONE_R > 0
507
-        const float R2 = HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y);
508
-        return R2 >= sq(float(MIDDLE_DEAD_ZONE_R)) && R2 <= sq(L1 + L2);
509
-      #else
510
-        return HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y) <= sq(L1 + L2);
511
-      #endif
512
-    #else // CARTESIAN
513
-      // To be migrated from MakerArm branch in future
514
-    #endif
515
-  }
516
-
517
-  inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
518
-
519
-    // Both the nozzle and the probe must be able to reach the point.
520
-    // This won't work on SCARA since the probe offset rotates with the arm.
521
-
522
-    return position_is_reachable(rx, ry)
523
-        && position_is_reachable(rx - (X_PROBE_OFFSET_FROM_EXTRUDER), ry - (Y_PROBE_OFFSET_FROM_EXTRUDER));
524
-  }
525
-
526
-#else // CARTESIAN
527
-
528
-  inline bool position_is_reachable(const float &rx, const float &ry) {
529
-      // Add 0.001 margin to deal with float imprecision
530
-      return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
531
-          && WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
532
-  }
533
-
534
-  inline bool position_is_reachable_by_probe(const float &rx, const float &ry) {
535
-      // Add 0.001 margin to deal with float imprecision
536
-      return WITHIN(rx, MIN_PROBE_X - 0.001, MAX_PROBE_X + 0.001)
537
-          && WITHIN(ry, MIN_PROBE_Y - 0.001, MAX_PROBE_Y + 0.001);
538
-  }
539
-
540
-#endif // CARTESIAN
541
-
542
-#endif // MARLIN_H

+ 53
- 72
Marlin/Marlin.ino View File

@@ -1,72 +1,53 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * About Marlin
25
- *
26
- * This firmware is a mashup between Sprinter and grbl.
27
- *  - https://github.com/kliment/Sprinter
28
- *  - https://github.com/simen/grbl/tree
29
- */
30
-
31
-#include "MarlinConfig.h"
32
-
33
-#if ENABLED(ULTRA_LCD)
34
-  #if ENABLED(LCD_I2C_TYPE_PCF8575)
35
-    #include <Wire.h>
36
-    #include <LiquidCrystal_I2C.h>
37
-  #elif ENABLED(LCD_I2C_TYPE_MCP23017) || ENABLED(LCD_I2C_TYPE_MCP23008)
38
-    #include <Wire.h>
39
-    #include <LiquidTWI2.h>
40
-  #elif ENABLED(LCM1602)
41
-    #include <Wire.h>
42
-    #include <LCD.h>
43
-    #include <LiquidCrystal_I2C.h>
44
-  #elif ENABLED(DOGLCD)
45
-    #include <U8glib.h> // library for graphics LCD by Oli Kraus (https://github.com/olikraus/U8glib_Arduino)
46
-  #else
47
-    #include <LiquidCrystal.h> // library for character LCD
48
-  #endif
49
-#endif
50
-
51
-#if HAS_DIGIPOTSS
52
-  #include <SPI.h>
53
-#endif
54
-
55
-#if ENABLED(DIGIPOT_I2C)
56
-  #include <Wire.h>
57
-#endif
58
-
59
-#if ENABLED(HAVE_TMCDRIVER)
60
-  #include <SPI.h>
61
-  #include <TMC26XStepper.h>
62
-#endif
63
-
64
-#if ENABLED(HAVE_TMC2130)
65
-  #include <SPI.h>
66
-  #include <TMC2130Stepper.h>
67
-#endif
68
-
69
-#if ENABLED(HAVE_L6470DRIVER)
70
-  #include <SPI.h>
71
-  #include <L6470.h>
72
-#endif
1
+/*
2
+================================================================================
3
+
4
+  Marlin Firmware
5
+
6
+  (c) 2011-2019 MarlinFirmware
7
+  Portions of Marlin are (c) by their respective authors.
8
+  All code complies with GPLv2 and/or GPLv3
9
+
10
+================================================================================
11
+
12
+Greetings! Thank you for choosing Marlin 2 as your 3D printer firmware.
13
+
14
+To configure Marlin you must edit Configuration.h and Configuration_adv.h
15
+located in the root 'Marlin' folder. Check the config/examples folder to see if
16
+there's a more suitable starting-point for your specific hardware.
17
+
18
+Before diving in, we recommend the following essential links:
19
+
20
+Marlin Firmware Official Website
21
+
22
+  - http://marlinfw.org/
23
+    The official Marlin Firmware website contains the most up-to-date
24
+    documentation. Contributions are always welcome!
25
+
26
+Configuration
27
+
28
+  - https://www.youtube.com/watch?v=3gwWVFtdg-4
29
+    A good 20-minute overview of Marlin configuration by Tom Sanladerer.
30
+    (Applies to Marlin 1.0.x, so Jerk and Acceleration should be halved.)
31
+    Also... https://www.google.com/search?tbs=vid%3A1&q=configure+marlin
32
+
33
+  - http://marlinfw.org/docs/configuration/configuration.html
34
+    Marlin's configuration options are explained in more detail here.
35
+
36
+Getting Help
37
+
38
+  - http://forums.reprap.org/list.php?415
39
+    The Marlin Discussion Forum is a great place to get help from other Marlin
40
+    users who may have experienced similar issues to your own.
41
+
42
+  - https://github.com/MarlinFirmware/Marlin/issues
43
+    With a free GitHub account you can provide us with feedback, bug reports,
44
+    and feature requests via the Marlin Issue Queue.
45
+
46
+Contributing
47
+
48
+  - http://marlinfw.org/docs/development/contributing.html
49
+    If you'd like to contribute to Marlin, read this first!
50
+
51
+  - http://marlinfw.org/docs/development/coding_standards.html
52
+    Before submitting code get to know the Coding Standards.
53
+*/

+ 0
- 42
Marlin/MarlinConfig.h View File

@@ -1,42 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef MARLIN_CONFIG_H
24
-#define MARLIN_CONFIG_H
25
-
26
-#include "fastio.h"
27
-#include "macros.h"
28
-#include "boards.h"
29
-#include "Version.h"
30
-#include "Configuration.h"
31
-#include "Conditionals_LCD.h"
32
-#include "tmc_macros.h"
33
-#include "Configuration_adv.h"
34
-#include "pins.h"
35
-#ifndef USBCON
36
-  #define HardwareSerial_h // trick to disable the standard HWserial
37
-#endif
38
-#include "Arduino.h"
39
-#include "Conditionals_post.h"
40
-#include "SanityCheck.h"
41
-
42
-#endif // MARLIN_CONFIG_H

+ 0
- 57
Marlin/MarlinSPI.h View File

@@ -1,57 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef __MARLIN_SPI_H__
24
-#define __MARLIN_SPI_H__
25
-
26
-#include <stdint.h>
27
-#include "softspi.h"
28
-
29
-template<uint8_t MisoPin, uint8_t MosiPin, uint8_t SckPin>
30
-class SPI {
31
-  static SoftSPI<MisoPin, MosiPin, SckPin> softSPI;
32
-  public:
33
-    FORCE_INLINE static void init() { softSPI.begin(); }
34
-    FORCE_INLINE static void send(uint8_t data) { softSPI.send(data); }
35
-    FORCE_INLINE static uint8_t receive() { return softSPI.receive(); }
36
-};
37
-
38
-
39
-// Hardware SPI
40
-template<>
41
-class SPI<MISO_PIN, MOSI_PIN, SCK_PIN> {
42
-  public:
43
-    FORCE_INLINE static void init() {
44
-        OUT_WRITE(SCK_PIN, LOW);
45
-        OUT_WRITE(MOSI_PIN, HIGH);
46
-        SET_INPUT(MISO_PIN);
47
-        WRITE(MISO_PIN, HIGH);
48
-    }
49
-    FORCE_INLINE static uint8_t receive() {
50
-      SPDR = 0;
51
-      for (;!TEST(SPSR, SPIF););
52
-      return SPDR;
53
-    }
54
-
55
-};
56
-
57
-#endif // __MARLIN_SPI_H__

+ 0
- 654
Marlin/MarlinSerial.cpp View File

@@ -1,654 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * MarlinSerial.cpp - Hardware serial library for Wiring
25
- * Copyright (c) 2006 Nicholas Zambetti.  All right reserved.
26
- *
27
- * Modified 23 November 2006 by David A. Mellis
28
- * Modified 28 September 2010 by Mark Sproul
29
- * Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
30
- * Modified 01 October 2017 by Eduardo José Tagle (added XON/XOFF)
31
- */
32
-
33
-// Disable HardwareSerial.cpp to support chips without a UART (Attiny, etc.)
34
-
35
-#include "MarlinConfig.h"
36
-
37
-#if !defined(USBCON) && (defined(UBRRH) || defined(UBRR0H) || defined(UBRR1H) || defined(UBRR2H) || defined(UBRR3H))
38
-
39
-  #include "MarlinSerial.h"
40
-  #include "Marlin.h"
41
-
42
-  struct ring_buffer_r {
43
-    unsigned char buffer[RX_BUFFER_SIZE];
44
-    volatile ring_buffer_pos_t head, tail;
45
-  };
46
-
47
-  #if TX_BUFFER_SIZE > 0
48
-    struct ring_buffer_t {
49
-      unsigned char buffer[TX_BUFFER_SIZE];
50
-      volatile uint8_t head, tail;
51
-    };
52
-  #endif
53
-
54
-  #if UART_PRESENT(SERIAL_PORT)
55
-    ring_buffer_r rx_buffer = { { 0 }, 0, 0 };
56
-    #if TX_BUFFER_SIZE > 0
57
-      ring_buffer_t tx_buffer = { { 0 }, 0, 0 };
58
-      static bool _written;
59
-    #endif
60
-  #endif
61
-
62
-  #if ENABLED(SERIAL_XON_XOFF)
63
-    constexpr uint8_t XON_XOFF_CHAR_SENT = 0x80;  // XON / XOFF Character was sent
64
-    constexpr uint8_t XON_XOFF_CHAR_MASK = 0x1F;  // XON / XOFF character to send
65
-    // XON / XOFF character definitions
66
-    constexpr uint8_t XON_CHAR  = 17;
67
-    constexpr uint8_t XOFF_CHAR = 19;
68
-    uint8_t xon_xoff_state = XON_XOFF_CHAR_SENT | XON_CHAR;
69
-  #endif
70
-
71
-  #if ENABLED(SERIAL_STATS_DROPPED_RX)
72
-    uint8_t rx_dropped_bytes = 0;
73
-  #endif
74
-
75
-  #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
76
-    ring_buffer_pos_t rx_max_enqueued = 0;
77
-  #endif
78
-
79
-  #if ENABLED(EMERGENCY_PARSER)
80
-
81
-    #include "stepper.h"
82
-    #include "language.h"
83
-
84
-    // Currently looking for: M108, M112, M410
85
-    // If you alter the parser please don't forget to update the capabilities in Conditionals_post.h
86
-
87
-    FORCE_INLINE void emergency_parser(const unsigned char c) {
88
-
89
-      static e_parser_state state = state_RESET;
90
-
91
-      switch (state) {
92
-        case state_RESET:
93
-          switch (c) {
94
-            case ' ': break;
95
-            case 'N': state = state_N;      break;
96
-            case 'M': state = state_M;      break;
97
-            default: state = state_IGNORE;
98
-          }
99
-          break;
100
-
101
-        case state_N:
102
-          switch (c) {
103
-            case '0': case '1': case '2':
104
-            case '3': case '4': case '5':
105
-            case '6': case '7': case '8':
106
-            case '9': case '-': case ' ':   break;
107
-            case 'M': state = state_M;      break;
108
-            default:  state = state_IGNORE;
109
-          }
110
-          break;
111
-
112
-        case state_M:
113
-          switch (c) {
114
-            case ' ': break;
115
-            case '1': state = state_M1;     break;
116
-            case '4': state = state_M4;     break;
117
-            default: state = state_IGNORE;
118
-          }
119
-          break;
120
-
121
-        case state_M1:
122
-          switch (c) {
123
-            case '0': state = state_M10;    break;
124
-            case '1': state = state_M11;    break;
125
-            default: state = state_IGNORE;
126
-          }
127
-          break;
128
-
129
-        case state_M10:
130
-          state = (c == '8') ? state_M108 : state_IGNORE;
131
-          break;
132
-
133
-        case state_M11:
134
-          state = (c == '2') ? state_M112 : state_IGNORE;
135
-          break;
136
-
137
-        case state_M4:
138
-          state = (c == '1') ? state_M41 : state_IGNORE;
139
-          break;
140
-
141
-        case state_M41:
142
-          state = (c == '0') ? state_M410 : state_IGNORE;
143
-          break;
144
-
145
-        case state_IGNORE:
146
-          if (c == '\n') state = state_RESET;
147
-          break;
148
-
149
-        default:
150
-          if (c == '\n') {
151
-            switch (state) {
152
-              case state_M108:
153
-                wait_for_user = wait_for_heatup = false;
154
-                break;
155
-              case state_M112:
156
-                kill(PSTR(MSG_KILLED));
157
-                break;
158
-              case state_M410:
159
-                quickstop_stepper();
160
-                break;
161
-              default:
162
-                break;
163
-            }
164
-            state = state_RESET;
165
-          }
166
-      }
167
-    }
168
-
169
-  #endif // EMERGENCY_PARSER
170
-
171
-  FORCE_INLINE void store_rxd_char() {
172
-    const ring_buffer_pos_t h = rx_buffer.head,
173
-                            i = (ring_buffer_pos_t)(h + 1) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
174
-
175
-    // If the character is to be stored at the index just before the tail
176
-    // (such that the head would advance to the current tail), the buffer is
177
-    // critical, so don't write the character or advance the head.
178
-    const char c = M_UDRx;
179
-    if (i != rx_buffer.tail) {
180
-      rx_buffer.buffer[h] = c;
181
-      rx_buffer.head = i;
182
-    }
183
-    else {
184
-      #if ENABLED(SERIAL_STATS_DROPPED_RX)
185
-        if (!++rx_dropped_bytes) ++rx_dropped_bytes;
186
-      #endif
187
-    }
188
-
189
-    #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
190
-      // calculate count of bytes stored into the RX buffer
191
-      ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
192
-      // Keep track of the maximum count of enqueued bytes
193
-      NOLESS(rx_max_enqueued, rx_count);
194
-    #endif
195
-
196
-    #if ENABLED(SERIAL_XON_XOFF)
197
-
198
-      // for high speed transfers, we can use XON/XOFF protocol to do
199
-      // software handshake and avoid overruns.
200
-      if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XON_CHAR) {
201
-
202
-        // calculate count of bytes stored into the RX buffer
203
-        ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
204
-
205
-        // if we are above 12.5% of RX buffer capacity, send XOFF before
206
-        // we run out of RX buffer space .. We need 325 bytes @ 250kbits/s to
207
-        // let the host react and stop sending bytes. This translates to 13mS
208
-        // propagation time.
209
-        if (rx_count >= (RX_BUFFER_SIZE) / 8) {
210
-          // If TX interrupts are disabled and data register is empty,
211
-          // just write the byte to the data register and be done. This
212
-          // shortcut helps significantly improve the effective datarate
213
-          // at high (>500kbit/s) bitrates, where interrupt overhead
214
-          // becomes a slowdown.
215
-          if (!TEST(M_UCSRxB, M_UDRIEx) && TEST(M_UCSRxA, M_UDREx)) {
216
-            // Send an XOFF character
217
-            M_UDRx = XOFF_CHAR;
218
-            // clear the TXC bit -- "can be cleared by writing a one to its bit
219
-            // location". This makes sure flush() won't return until the bytes
220
-            // actually got written
221
-            SBI(M_UCSRxA, M_TXCx);
222
-            // And remember it was sent
223
-            xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
224
-          }
225
-          else {
226
-            // TX interrupts disabled, but buffer still not empty ... or
227
-            // TX interrupts enabled. Reenable TX ints and schedule XOFF
228
-            // character to be sent
229
-            #if TX_BUFFER_SIZE > 0
230
-              SBI(M_UCSRxB, M_UDRIEx);
231
-              xon_xoff_state = XOFF_CHAR;
232
-            #else
233
-              // We are not using TX interrupts, we will have to send this manually
234
-              while (!TEST(M_UCSRxA, M_UDREx)) {/* nada */}
235
-              M_UDRx = XOFF_CHAR;
236
-              // And remember we already sent it
237
-              xon_xoff_state = XOFF_CHAR | XON_XOFF_CHAR_SENT;
238
-            #endif
239
-          }
240
-        }
241
-      }
242
-    #endif // SERIAL_XON_XOFF
243
-
244
-    #if ENABLED(EMERGENCY_PARSER)
245
-      emergency_parser(c);
246
-    #endif
247
-  }
248
-
249
-  #if TX_BUFFER_SIZE > 0
250
-
251
-    FORCE_INLINE void _tx_udr_empty_irq(void) {
252
-      // If interrupts are enabled, there must be more data in the output
253
-      // buffer.
254
-
255
-      #if ENABLED(SERIAL_XON_XOFF)
256
-        // Do a priority insertion of an XON/XOFF char, if needed.
257
-        const uint8_t state = xon_xoff_state;
258
-        if (!(state & XON_XOFF_CHAR_SENT)) {
259
-          M_UDRx = state & XON_XOFF_CHAR_MASK;
260
-          xon_xoff_state = state | XON_XOFF_CHAR_SENT;
261
-        }
262
-        else
263
-      #endif
264
-      { // Send the next byte
265
-        const uint8_t t = tx_buffer.tail, c = tx_buffer.buffer[t];
266
-        tx_buffer.tail = (t + 1) & (TX_BUFFER_SIZE - 1);
267
-        M_UDRx = c;
268
-      }
269
-
270
-      // clear the TXC bit -- "can be cleared by writing a one to its bit
271
-      // location". This makes sure flush() won't return until the bytes
272
-      // actually got written
273
-      SBI(M_UCSRxA, M_TXCx);
274
-
275
-      // Disable interrupts if the buffer is empty
276
-      if (tx_buffer.head == tx_buffer.tail)
277
-        CBI(M_UCSRxB, M_UDRIEx);
278
-    }
279
-
280
-    #ifdef M_USARTx_UDRE_vect
281
-      ISR(M_USARTx_UDRE_vect) { _tx_udr_empty_irq(); }
282
-    #endif
283
-
284
-  #endif // TX_BUFFER_SIZE
285
-
286
-  #ifdef M_USARTx_RX_vect
287
-    ISR(M_USARTx_RX_vect) { store_rxd_char(); }
288
-  #endif
289
-
290
-  // Public Methods
291
-
292
-  void MarlinSerial::begin(const long baud) {
293
-    uint16_t baud_setting;
294
-    bool useU2X = true;
295
-
296
-    #if F_CPU == 16000000UL && SERIAL_PORT == 0
297
-      // Hard-coded exception for compatibility with the bootloader shipped
298
-      // with the Duemilanove and previous boards, and the firmware on the
299
-      // 8U2 on the Uno and Mega 2560.
300
-      if (baud == 57600) useU2X = false;
301
-    #endif
302
-
303
-    if (useU2X) {
304
-      M_UCSRxA = _BV(M_U2Xx);
305
-      baud_setting = (F_CPU / 4 / baud - 1) / 2;
306
-    }
307
-    else {
308
-      M_UCSRxA = 0;
309
-      baud_setting = (F_CPU / 8 / baud - 1) / 2;
310
-    }
311
-
312
-    // assign the baud_setting, a.k.a. ubbr (USART Baud Rate Register)
313
-    M_UBRRxH = baud_setting >> 8;
314
-    M_UBRRxL = baud_setting;
315
-
316
-    SBI(M_UCSRxB, M_RXENx);
317
-    SBI(M_UCSRxB, M_TXENx);
318
-    SBI(M_UCSRxB, M_RXCIEx);
319
-    #if TX_BUFFER_SIZE > 0
320
-      CBI(M_UCSRxB, M_UDRIEx);
321
-      _written = false;
322
-    #endif
323
-  }
324
-
325
-  void MarlinSerial::end() {
326
-    CBI(M_UCSRxB, M_RXENx);
327
-    CBI(M_UCSRxB, M_TXENx);
328
-    CBI(M_UCSRxB, M_RXCIEx);
329
-    CBI(M_UCSRxB, M_UDRIEx);
330
-  }
331
-
332
-  void MarlinSerial::checkRx(void) {
333
-    if (TEST(M_UCSRxA, M_RXCx)) {
334
-      CRITICAL_SECTION_START;
335
-        store_rxd_char();
336
-      CRITICAL_SECTION_END;
337
-    }
338
-  }
339
-
340
-  int MarlinSerial::peek(void) {
341
-    CRITICAL_SECTION_START;
342
-      const int v = rx_buffer.head == rx_buffer.tail ? -1 : rx_buffer.buffer[rx_buffer.tail];
343
-    CRITICAL_SECTION_END;
344
-    return v;
345
-  }
346
-
347
-  int MarlinSerial::read(void) {
348
-    int v;
349
-    CRITICAL_SECTION_START;
350
-      const ring_buffer_pos_t t = rx_buffer.tail;
351
-      if (rx_buffer.head == t)
352
-        v = -1;
353
-      else {
354
-        v = rx_buffer.buffer[t];
355
-        rx_buffer.tail = (ring_buffer_pos_t)(t + 1) & (RX_BUFFER_SIZE - 1);
356
-
357
-        #if ENABLED(SERIAL_XON_XOFF)
358
-          if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
359
-            // Get count of bytes in the RX buffer
360
-            ring_buffer_pos_t rx_count = (ring_buffer_pos_t)(rx_buffer.head - rx_buffer.tail) & (ring_buffer_pos_t)(RX_BUFFER_SIZE - 1);
361
-            // When below 10% of RX buffer capacity, send XON before
362
-            // running out of RX buffer bytes
363
-            if (rx_count < (RX_BUFFER_SIZE) / 10) {
364
-              xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
365
-              CRITICAL_SECTION_END;       // End critical section before returning!
366
-              writeNoHandshake(XON_CHAR);
367
-              return v;
368
-            }
369
-          }
370
-        #endif
371
-      }
372
-    CRITICAL_SECTION_END;
373
-    return v;
374
-  }
375
-
376
-  ring_buffer_pos_t MarlinSerial::available(void) {
377
-    CRITICAL_SECTION_START;
378
-      const ring_buffer_pos_t h = rx_buffer.head, t = rx_buffer.tail;
379
-    CRITICAL_SECTION_END;
380
-    return (ring_buffer_pos_t)(RX_BUFFER_SIZE + h - t) & (RX_BUFFER_SIZE - 1);
381
-  }
382
-
383
-  void MarlinSerial::flush(void) {
384
-    // Don't change this order of operations. If the RX interrupt occurs between
385
-    // reading rx_buffer_head and updating rx_buffer_tail, the previous rx_buffer_head
386
-    // may be written to rx_buffer_tail, making the buffer appear full rather than empty.
387
-    CRITICAL_SECTION_START;
388
-      rx_buffer.head = rx_buffer.tail;
389
-    CRITICAL_SECTION_END;
390
-
391
-    #if ENABLED(SERIAL_XON_XOFF)
392
-      if ((xon_xoff_state & XON_XOFF_CHAR_MASK) == XOFF_CHAR) {
393
-        xon_xoff_state = XON_CHAR | XON_XOFF_CHAR_SENT;
394
-        writeNoHandshake(XON_CHAR);
395
-      }
396
-    #endif
397
-  }
398
-
399
-  #if TX_BUFFER_SIZE > 0
400
-    uint8_t MarlinSerial::availableForWrite(void) {
401
-      CRITICAL_SECTION_START;
402
-        const uint8_t h = tx_buffer.head, t = tx_buffer.tail;
403
-      CRITICAL_SECTION_END;
404
-      return (uint8_t)(TX_BUFFER_SIZE + h - t) & (TX_BUFFER_SIZE - 1);
405
-    }
406
-
407
-    void MarlinSerial::write(const uint8_t c) {
408
-      #if ENABLED(SERIAL_XON_XOFF)
409
-        const uint8_t state = xon_xoff_state;
410
-        if (!(state & XON_XOFF_CHAR_SENT)) {
411
-          // Send 2 chars: XON/XOFF, then a user-specified char
412
-          writeNoHandshake(state & XON_XOFF_CHAR_MASK);
413
-          xon_xoff_state = state | XON_XOFF_CHAR_SENT;
414
-        }
415
-      #endif
416
-      writeNoHandshake(c);
417
-    }
418
-
419
-    void MarlinSerial::writeNoHandshake(const uint8_t c) {
420
-      _written = true;
421
-      CRITICAL_SECTION_START;
422
-        bool emty = (tx_buffer.head == tx_buffer.tail);
423
-      CRITICAL_SECTION_END;
424
-
425
-      // If the buffer and the data register is empty, just write the byte
426
-      // to the data register and be done. This shortcut helps
427
-      // significantly improve the effective datarate at high (>
428
-      // 500kbit/s) bitrates, where interrupt overhead becomes a slowdown.
429
-      if (emty && TEST(M_UCSRxA, M_UDREx)) {
430
-        CRITICAL_SECTION_START;
431
-          M_UDRx = c;
432
-          SBI(M_UCSRxA, M_TXCx);
433
-        CRITICAL_SECTION_END;
434
-        return;
435
-      }
436
-      const uint8_t i = (tx_buffer.head + 1) & (TX_BUFFER_SIZE - 1);
437
-
438
-      // If the output buffer is full, there's nothing for it other than to
439
-      // wait for the interrupt handler to empty it a bit
440
-      while (i == tx_buffer.tail) {
441
-        if (!TEST(SREG, SREG_I)) {
442
-          // Interrupts are disabled, so we'll have to poll the data
443
-          // register empty flag ourselves. If it is set, pretend an
444
-          // interrupt has happened and call the handler to free up
445
-          // space for us.
446
-          if (TEST(M_UCSRxA, M_UDREx))
447
-            _tx_udr_empty_irq();
448
-        }
449
-        else {
450
-          // nop, the interrupt handler will free up space for us
451
-        }
452
-      }
453
-
454
-      tx_buffer.buffer[tx_buffer.head] = c;
455
-      { CRITICAL_SECTION_START;
456
-          tx_buffer.head = i;
457
-          SBI(M_UCSRxB, M_UDRIEx);
458
-        CRITICAL_SECTION_END;
459
-      }
460
-      return;
461
-    }
462
-
463
-    void MarlinSerial::flushTX(void) {
464
-      // TX
465
-      // If we have never written a byte, no need to flush. This special
466
-      // case is needed since there is no way to force the TXC (transmit
467
-      // complete) bit to 1 during initialization
468
-      if (!_written)
469
-        return;
470
-
471
-      while (TEST(M_UCSRxB, M_UDRIEx) || !TEST(M_UCSRxA, M_TXCx)) {
472
-        if (!TEST(SREG, SREG_I) && TEST(M_UCSRxB, M_UDRIEx))
473
-          // Interrupts are globally disabled, but the DR empty
474
-          // interrupt should be enabled, so poll the DR empty flag to
475
-          // prevent deadlock
476
-          if (TEST(M_UCSRxA, M_UDREx))
477
-            _tx_udr_empty_irq();
478
-      }
479
-      // If we get here, nothing is queued anymore (DRIE is disabled) and
480
-      // the hardware finished tranmission (TXC is set).
481
-    }
482
-
483
-  #else // TX_BUFFER_SIZE == 0
484
-
485
-    void MarlinSerial::write(const uint8_t c) {
486
-      #if ENABLED(SERIAL_XON_XOFF)
487
-        // Do a priority insertion of an XON/XOFF char, if needed.
488
-        const uint8_t state = xon_xoff_state;
489
-        if (!(state & XON_XOFF_CHAR_SENT)) {
490
-          writeNoHandshake(state & XON_XOFF_CHAR_MASK);
491
-          xon_xoff_state = state | XON_XOFF_CHAR_SENT;
492
-        }
493
-      #endif
494
-      writeNoHandshake(c);
495
-    }
496
-
497
-    void MarlinSerial::writeNoHandshake(uint8_t c) {
498
-      while (!TEST(M_UCSRxA, M_UDREx)) {/* nada */}
499
-      M_UDRx = c;
500
-    }
501
-
502
-  #endif // TX_BUFFER_SIZE == 0
503
-
504
-  /**
505
-   * Imports from print.h
506
-   */
507
-
508
-  void MarlinSerial::print(char c, int base) {
509
-    print((long)c, base);
510
-  }
511
-
512
-  void MarlinSerial::print(unsigned char b, int base) {
513
-    print((unsigned long)b, base);
514
-  }
515
-
516
-  void MarlinSerial::print(int n, int base) {
517
-    print((long)n, base);
518
-  }
519
-
520
-  void MarlinSerial::print(unsigned int n, int base) {
521
-    print((unsigned long)n, base);
522
-  }
523
-
524
-  void MarlinSerial::print(long n, int base) {
525
-    if (base == 0)
526
-      write(n);
527
-    else if (base == 10) {
528
-      if (n < 0) {
529
-        print('-');
530
-        n = -n;
531
-      }
532
-      printNumber(n, 10);
533
-    }
534
-    else
535
-      printNumber(n, base);
536
-  }
537
-
538
-  void MarlinSerial::print(unsigned long n, int base) {
539
-    if (base == 0) write(n);
540
-    else printNumber(n, base);
541
-  }
542
-
543
-  void MarlinSerial::print(double n, int digits) {
544
-    printFloat(n, digits);
545
-  }
546
-
547
-  void MarlinSerial::println(void) {
548
-    print('\r');
549
-    print('\n');
550
-  }
551
-
552
-  void MarlinSerial::println(const String& s) {
553
-    print(s);
554
-    println();
555
-  }
556
-
557
-  void MarlinSerial::println(const char c[]) {
558
-    print(c);
559
-    println();
560
-  }
561
-
562
-  void MarlinSerial::println(char c, int base) {
563
-    print(c, base);
564
-    println();
565
-  }
566
-
567
-  void MarlinSerial::println(unsigned char b, int base) {
568
-    print(b, base);
569
-    println();
570
-  }
571
-
572
-  void MarlinSerial::println(int n, int base) {
573
-    print(n, base);
574
-    println();
575
-  }
576
-
577
-  void MarlinSerial::println(unsigned int n, int base) {
578
-    print(n, base);
579
-    println();
580
-  }
581
-
582
-  void MarlinSerial::println(long n, int base) {
583
-    print(n, base);
584
-    println();
585
-  }
586
-
587
-  void MarlinSerial::println(unsigned long n, int base) {
588
-    print(n, base);
589
-    println();
590
-  }
591
-
592
-  void MarlinSerial::println(double n, int digits) {
593
-    print(n, digits);
594
-    println();
595
-  }
596
-
597
-  // Private Methods
598
-
599
-  void MarlinSerial::printNumber(unsigned long n, uint8_t base) {
600
-    if (n) {
601
-      unsigned char buf[8 * sizeof(long)]; // Enough space for base 2
602
-      int8_t i = 0;
603
-      while (n) {
604
-        buf[i++] = n % base;
605
-        n /= base;
606
-      }
607
-      while (i--)
608
-        print((char)(buf[i] + (buf[i] < 10 ? '0' : 'A' - 10)));
609
-    }
610
-    else
611
-      print('0');
612
-  }
613
-
614
-  void MarlinSerial::printFloat(double number, uint8_t digits) {
615
-    // Handle negative numbers
616
-    if (number < 0.0) {
617
-      print('-');
618
-      number = -number;
619
-    }
620
-
621
-    // Round correctly so that print(1.999, 2) prints as "2.00"
622
-    double rounding = 0.5;
623
-    for (uint8_t i = 0; i < digits; ++i)
624
-      rounding *= 0.1;
625
-
626
-    number += rounding;
627
-
628
-    // Extract the integer part of the number and print it
629
-    unsigned long int_part = (unsigned long)number;
630
-    double remainder = number - (double)int_part;
631
-    print(int_part);
632
-
633
-    // Print the decimal point, but only if there are digits beyond
634
-    if (digits) {
635
-      print('.');
636
-      // Extract digits from the remainder one at a time
637
-      while (digits--) {
638
-        remainder *= 10.0;
639
-        int toPrint = int(remainder);
640
-        print(toPrint);
641
-        remainder -= toPrint;
642
-      }
643
-    }
644
-  }
645
-
646
-  // Preinstantiate
647
-  MarlinSerial customizedSerial;
648
-
649
-#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
650
-
651
-// For AT90USB targets use the UART for BT interfacing
652
-#if defined(USBCON) && ENABLED(BLUETOOTH)
653
-  HardwareSerial bluetoothSerial;
654
-#endif

+ 0
- 181
Marlin/MarlinSerial.h View File

@@ -1,181 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  MarlinSerial.h - Hardware serial library for Wiring
25
-  Copyright (c) 2006 Nicholas Zambetti.  All right reserved.
26
-
27
-  Modified 28 September 2010 by Mark Sproul
28
-  Modified 14 February 2016 by Andreas Hardtung (added tx buffer)
29
-
30
-*/
31
-
32
-#ifndef MARLINSERIAL_H
33
-#define MARLINSERIAL_H
34
-
35
-#include "MarlinConfig.h"
36
-
37
-#ifndef SERIAL_PORT
38
-  #define SERIAL_PORT 0
39
-#endif
40
-
41
-// The presence of the UBRRH register is used to detect a UART.
42
-#define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \
43
-                            (port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \
44
-                            (port == 3 && defined(UBRR3H)))
45
-
46
-// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
47
-// requires two levels of indirection to expand macro values properly)
48
-#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)
49
-#if SERIAL_PORT == 0 && (!defined(UBRR0H) || !defined(UDR0)) // use un-numbered registers if necessary
50
-  #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##suffix
51
-#else
52
-  #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix
53
-#endif
54
-
55
-// Registers used by MarlinSerial class (expanded depending on selected serial port)
56
-#define M_UCSRxA           SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number
57
-#define M_UCSRxB           SERIAL_REGNAME(UCSR,SERIAL_PORT,B)
58
-#define M_RXENx            SERIAL_REGNAME(RXEN,SERIAL_PORT,)
59
-#define M_TXENx            SERIAL_REGNAME(TXEN,SERIAL_PORT,)
60
-#define M_TXCx             SERIAL_REGNAME(TXC,SERIAL_PORT,)
61
-#define M_RXCIEx           SERIAL_REGNAME(RXCIE,SERIAL_PORT,)
62
-#define M_UDREx            SERIAL_REGNAME(UDRE,SERIAL_PORT,)
63
-#define M_UDRIEx           SERIAL_REGNAME(UDRIE,SERIAL_PORT,)
64
-#define M_UDRx             SERIAL_REGNAME(UDR,SERIAL_PORT,)
65
-#define M_UBRRxH           SERIAL_REGNAME(UBRR,SERIAL_PORT,H)
66
-#define M_UBRRxL           SERIAL_REGNAME(UBRR,SERIAL_PORT,L)
67
-#define M_RXCx             SERIAL_REGNAME(RXC,SERIAL_PORT,)
68
-#define M_USARTx_RX_vect   SERIAL_REGNAME(USART,SERIAL_PORT,_RX_vect)
69
-#define M_U2Xx             SERIAL_REGNAME(U2X,SERIAL_PORT,)
70
-#define M_USARTx_UDRE_vect SERIAL_REGNAME(USART,SERIAL_PORT,_UDRE_vect)
71
-
72
-#define DEC 10
73
-#define HEX 16
74
-#define OCT 8
75
-#define BIN 2
76
-#define BYTE 0
77
-
78
-// Define constants and variables for buffering serial data.
79
-// Use only 0 or powers of 2 greater than 1
80
-// : [0, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...]
81
-#ifndef RX_BUFFER_SIZE
82
-  #define RX_BUFFER_SIZE 128
83
-#endif
84
-// 256 is the max TX buffer limit due to uint8_t head and tail.
85
-#ifndef TX_BUFFER_SIZE
86
-  #define TX_BUFFER_SIZE 32
87
-#endif
88
-
89
-#ifndef USBCON
90
-  #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
91
-    #error "SERIAL_XON_XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
92
-  #endif
93
-
94
-  #if !IS_POWER_OF_2(RX_BUFFER_SIZE) || RX_BUFFER_SIZE < 2
95
-    #error "RX_BUFFER_SIZE must be a power of 2 greater than 1."
96
-  #endif
97
-
98
-  #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
99
-    #error "TX_BUFFER_SIZE must be 0, a power of 2 greater than 1, and no greater than 256."
100
-  #endif
101
-
102
-  #if RX_BUFFER_SIZE > 256
103
-    typedef uint16_t ring_buffer_pos_t;
104
-  #else
105
-    typedef uint8_t ring_buffer_pos_t;
106
-  #endif
107
-
108
-  #if ENABLED(SERIAL_STATS_DROPPED_RX)
109
-    extern uint8_t rx_dropped_bytes;
110
-  #endif
111
-
112
-  #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
113
-    extern ring_buffer_pos_t rx_max_enqueued;
114
-  #endif
115
-
116
-  class MarlinSerial { //: public Stream
117
-
118
-    public:
119
-      MarlinSerial() {};
120
-      static void begin(const long);
121
-      static void end();
122
-      static int peek(void);
123
-      static int read(void);
124
-      static void flush(void);
125
-      static ring_buffer_pos_t available(void);
126
-      static void checkRx(void);
127
-      static void write(const uint8_t c);
128
-      #if TX_BUFFER_SIZE > 0
129
-        static uint8_t availableForWrite(void);
130
-        static void flushTX(void);
131
-      #endif
132
-      static void writeNoHandshake(const uint8_t c);
133
-
134
-      #if ENABLED(SERIAL_STATS_DROPPED_RX)
135
-        FORCE_INLINE static uint32_t dropped() { return rx_dropped_bytes; }
136
-      #endif
137
-
138
-      #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
139
-        FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; }
140
-      #endif
141
-
142
-    private:
143
-      static void printNumber(unsigned long, const uint8_t);
144
-      static void printFloat(double, uint8_t);
145
-
146
-    public:
147
-      FORCE_INLINE static void write(const char* str) { while (*str) write(*str++); }
148
-      FORCE_INLINE static void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
149
-      FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
150
-      FORCE_INLINE static void print(const char* str) { write(str); }
151
-
152
-      static void print(char, int = BYTE);
153
-      static void print(unsigned char, int = BYTE);
154
-      static void print(int, int = DEC);
155
-      static void print(unsigned int, int = DEC);
156
-      static void print(long, int = DEC);
157
-      static void print(unsigned long, int = DEC);
158
-      static void print(double, int = 2);
159
-
160
-      static void println(const String& s);
161
-      static void println(const char[]);
162
-      static void println(char, int = BYTE);
163
-      static void println(unsigned char, int = BYTE);
164
-      static void println(int, int = DEC);
165
-      static void println(unsigned int, int = DEC);
166
-      static void println(long, int = DEC);
167
-      static void println(unsigned long, int = DEC);
168
-      static void println(double, int = 2);
169
-      static void println(void);
170
-  };
171
-
172
-  extern MarlinSerial customizedSerial;
173
-
174
-#endif // !USBCON
175
-
176
-// Use the UART for Bluetooth in AT90USB configurations
177
-#if defined(USBCON) && ENABLED(BLUETOOTH)
178
-  extern HardwareSerial bluetoothSerial;
179
-#endif
180
-
181
-#endif // MARLINSERIAL_H

+ 0
- 14590
Marlin/Marlin_main.cpp
File diff suppressed because it is too large
View File


+ 0
- 349
Marlin/Max7219_Debug_LEDs.cpp View File

@@ -1,349 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * This module is off by default, but can be enabled to facilitate the display of
25
- * extra debug information during code development. It assumes the existence of a
26
- * Max7219 LED Matrix. A suitable device can be obtained on eBay similar to this:
27
- * http://www.ebay.com/itm/191781645249 for under $2.00 including shipping.
28
- *
29
- * Just connect up +5v and GND to give it power, then connect up the pins assigned
30
- * in Configuration_adv.h. For example, on the Re-ARM you could use:
31
- *
32
- *   #define MAX7219_CLK_PIN   77
33
- *   #define MAX7219_DIN_PIN   78
34
- *   #define MAX7219_LOAD_PIN  79
35
- *
36
- * Max7219_init() is called automatically at startup, and then there are a number of
37
- * support functions available to control the LEDs in the 8x8 grid.
38
- *
39
- * void Max7219_init();
40
- * void Max7219_PutByte(uint8_t data);
41
- * void Max7219(uint8_t reg, uint8_t data);
42
- * void Max7219_LED_On(uint8_t col, uint8_t row);
43
- * void Max7219_LED_Off(uint8_t col, uint8_t row);
44
- * void Max7219_LED_Toggle(uint8_t col, uint8_t row);
45
- * void Max7219_Clear_Row(uint8_t row);
46
- * void Max7219_Clear_Column(uint8_t col);
47
- * void Max7219_Set_Row(uint8_t row, uint8_t val);
48
- * void Max7219_Set_2_Rows(uint8_t row, uint16_t val);
49
- * void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
50
- * void Max7219_Set_Column(uint8_t col, uint8_t val);
51
- * void Max7219_idle_tasks();
52
- */
53
-
54
-#include "MarlinConfig.h"
55
-
56
-#if ENABLED(MAX7219_DEBUG)
57
-
58
-#include "Max7219_Debug_LEDs.h"
59
-
60
-#include "planner.h"
61
-#include "stepper.h"
62
-#include "Marlin.h"
63
-
64
-static uint8_t LEDs[8] = { 0 };
65
-
66
-#ifdef CPU_32_BIT
67
-  #define MS_DELAY() delayMicroseconds(5)  // 32-bit processors need a delay to stabilize the signal
68
-#else
69
-  #define MS_DELAY() NOOP
70
-#endif
71
-
72
-void Max7219_PutByte(uint8_t data) {
73
-  CRITICAL_SECTION_START
74
-  for (uint8_t i = 8; i--;) {
75
-    MS_DELAY();
76
-    WRITE(MAX7219_CLK_PIN, LOW);       // tick
77
-    MS_DELAY();
78
-    WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW);  // send 1 or 0 based on data bit
79
-    MS_DELAY();
80
-    WRITE(MAX7219_CLK_PIN, HIGH);      // tock
81
-    MS_DELAY();
82
-    data <<= 1;
83
-  }
84
-  CRITICAL_SECTION_END
85
-}
86
-
87
-void Max7219(const uint8_t reg, const uint8_t data) {
88
-  MS_DELAY();
89
-  CRITICAL_SECTION_START
90
-  WRITE(MAX7219_LOAD_PIN, LOW);  // begin
91
-  MS_DELAY();
92
-  Max7219_PutByte(reg);          // specify register
93
-  MS_DELAY();
94
-  Max7219_PutByte(data);         // put data
95
-  MS_DELAY();
96
-  WRITE(MAX7219_LOAD_PIN, LOW);  // and tell the chip to load the data
97
-  MS_DELAY();
98
-  WRITE(MAX7219_LOAD_PIN, HIGH);
99
-  CRITICAL_SECTION_END
100
-  MS_DELAY();
101
-}
102
-
103
-void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on) {
104
-  if (row > 7 || col > 7) {
105
-    SERIAL_ECHOPAIR("??? Max7219_LED_Set(", (int)row);
106
-    SERIAL_ECHOPAIR(",", (int)col);
107
-    SERIAL_ECHOLNPGM(")");
108
-    return;
109
-  }
110
-  if (TEST(LEDs[row], col) == on) return; // if LED is already on/off, leave alone
111
-  if (on) SBI(LEDs[row], col); else CBI(LEDs[row], col);
112
-  Max7219(8 - row, LEDs[row]);
113
-}
114
-
115
-void Max7219_LED_On(const uint8_t col, const uint8_t row) {
116
-  if (row > 7 || col > 7) {
117
-    SERIAL_ECHOPAIR("??? Max7219_LED_On(", (int)col);
118
-    SERIAL_ECHOPAIR(",", (int)row);
119
-    SERIAL_ECHOLNPGM(")");
120
-    return;
121
-  }
122
-  Max7219_LED_Set(col, row, true);
123
-}
124
-
125
-void Max7219_LED_Off(const uint8_t col, const uint8_t row) {
126
-  if (row > 7 || col > 7) {
127
-    SERIAL_ECHOPAIR("??? Max7219_LED_Off(", (int)row);
128
-    SERIAL_ECHOPAIR(",", (int)col);
129
-    SERIAL_ECHOLNPGM(")");
130
-    return;
131
-  }
132
-  Max7219_LED_Set(col, row, false);
133
-}
134
-
135
-void Max7219_LED_Toggle(const uint8_t col, const uint8_t row) {
136
-  if (row > 7 || col > 7) {
137
-    SERIAL_ECHOPAIR("??? Max7219_LED_Toggle(", (int)row);
138
-    SERIAL_ECHOPAIR(",", (int)col);
139
-    SERIAL_ECHOLNPGM(")");
140
-    return;
141
-  }
142
-  if (TEST(LEDs[row], col))
143
-    Max7219_LED_Off(col, row);
144
-  else
145
-    Max7219_LED_On(col, row);
146
-}
147
-
148
-void Max7219_Clear_Column(const uint8_t col) {
149
-  if (col > 7) {
150
-    SERIAL_ECHOPAIR("??? Max7219_Clear_Column(", (int)col);
151
-    SERIAL_ECHOLNPGM(")");
152
-    return;
153
-  }
154
-  LEDs[col] = 0;
155
-  Max7219(8 - col, LEDs[col]);
156
-}
157
-
158
-void Max7219_Clear_Row(const uint8_t row) {
159
-  if (row > 7) {
160
-    SERIAL_ECHOPAIR("??? Max7219_Clear_Row(", (int)row);
161
-    SERIAL_ECHOLNPGM(")");
162
-    return;
163
-  }
164
-  for (uint8_t c = 0; c <= 7; c++)
165
-    Max7219_LED_Off(c, row);
166
-}
167
-
168
-void Max7219_Set_Row(const uint8_t row, const uint8_t val) {
169
-  if (row > 7) {
170
-    SERIAL_ECHOPAIR("??? Max7219_Set_Row(", (int)row);
171
-    SERIAL_ECHOPAIR(",", (int)val);
172
-    SERIAL_ECHOLNPGM(")");
173
-    return;
174
-  }
175
-  for (uint8_t b = 0; b <= 7; b++)
176
-    if (TEST(val, b))
177
-      Max7219_LED_On(7 - b, row);
178
-    else
179
-      Max7219_LED_Off(7 - b, row);
180
-}
181
-
182
-void Max7219_Set_2_Rows(const uint8_t row, const uint16_t val) {
183
-  if (row > 6) {
184
-    SERIAL_ECHOPAIR("??? Max7219_Set_2_Rows(", (int)row);
185
-    SERIAL_ECHOPAIR(",", (int)val);
186
-    SERIAL_ECHOLNPGM(")");
187
-    return;
188
-  }
189
-  Max7219_Set_Row(row + 1, (val >> 8) & 0xFF);
190
-  Max7219_Set_Row(row + 0, (val     ) & 0xFF);
191
-}
192
-
193
-void Max7219_Set_4_Rows(const uint8_t row, const uint32_t val) {
194
-  if (row > 4) {
195
-    SERIAL_ECHOPAIR("??? Max7219_Set_4_Rows(", (int)row);
196
-    SERIAL_ECHOPAIR(",", (long)val);
197
-    SERIAL_ECHOLNPGM(")");
198
-    return;
199
-  }
200
-  Max7219_Set_Row(row + 3, (val >> 24) & 0xFF);
201
-  Max7219_Set_Row(row + 2, (val >> 16) & 0xFF);
202
-  Max7219_Set_Row(row + 1, (val >>  8) & 0xFF);
203
-  Max7219_Set_Row(row + 0, (val      ) & 0xFF);
204
-}
205
-
206
-void Max7219_Set_Column(const uint8_t col, const uint8_t val) {
207
-  if (col > 7) {
208
-    SERIAL_ECHOPAIR("??? Max7219_Column(", (int)col);
209
-    SERIAL_ECHOPAIR(",", (int)val);
210
-    SERIAL_ECHOLNPGM(")");
211
-    return;
212
-  }
213
-  LEDs[col] = val;
214
-  Max7219(8 - col, LEDs[col]);
215
-}
216
-
217
-void Max7219_init() {
218
-  uint8_t i, x, y;
219
-
220
-  SET_OUTPUT(MAX7219_DIN_PIN);
221
-  SET_OUTPUT(MAX7219_CLK_PIN);
222
-
223
-  OUT_WRITE(MAX7219_LOAD_PIN, HIGH);
224
-  delay(1);
225
-
226
-  //initiation of the max 7219
227
-  Max7219(max7219_reg_scanLimit, 0x07);
228
-  Max7219(max7219_reg_decodeMode, 0x00);  // using an led matrix (not digits)
229
-  Max7219(max7219_reg_shutdown, 0x01);    // not in shutdown mode
230
-  Max7219(max7219_reg_displayTest, 0x00); // no display test
231
-  Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
232
-                                               // range: 0x00 to 0x0F
233
-  for (i = 0; i <= 7; i++) {      // empty registers, turn all LEDs off
234
-    LEDs[i] = 0x00;
235
-    Max7219(i + 1, 0);
236
-  }
237
-
238
-  for (x = 0; x <= 7; x++)        // Do an aesthetically pleasing pattern to fully test
239
-    for (y = 0; y <= 7; y++) {    // the Max7219 module and LEDs. First, turn them
240
-      Max7219_LED_On(x, y);       // all on.
241
-      delay(3);
242
-    }
243
-
244
-  for (x = 0; x <= 7; x++)        // Now, turn them all off.
245
-    for (y = 0; y <= 7; y++) {
246
-      Max7219_LED_Off(x, y);
247
-      delay(3);                   // delay() is OK here. Max7219_init() is only called from
248
-    }                             // setup() and nothing is running yet.
249
-
250
-  delay(150);
251
-
252
-  for (x = 8; x--;)               // Now, do the same thing from the opposite direction
253
-    for (y = 0; y <= 7; y++) {
254
-      Max7219_LED_On(x, y);
255
-      delay(2);
256
-    }
257
-
258
-  for (x = 8; x--;)
259
-    for (y = 0; y <= 7; y++) {
260
-      Max7219_LED_Off(x, y);
261
-      delay(2);
262
-    }
263
-}
264
-
265
-/**
266
-* These are sample debug features to demonstrate the usage of the 8x8 LED Matrix for debug purposes.
267
-* There is very little CPU burden added to the system by displaying information within the idle()
268
-* task.
269
-*
270
-* But with that said, if your debugging can be facilitated by making calls into the library from
271
-* other places in the code, feel free to do it.  The CPU burden for a few calls to toggle an LED
272
-* or clear a row is not very significant.
273
-*/
274
-void Max7219_idle_tasks() {
275
-#if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
276
-  CRITICAL_SECTION_START
277
-  #if MAX7219_DEBUG_STEPPER_HEAD || MAX7219_DEBUG_STEPPER_QUEUE
278
-    const uint8_t head = planner.block_buffer_head;
279
-  #endif
280
-  #if MAX7219_DEBUG_STEPPER_TAIL || MAX7219_DEBUG_STEPPER_QUEUE
281
-    const uint8_t tail = planner.block_buffer_tail;
282
-  #endif
283
-  CRITICAL_SECTION_END
284
-#endif
285
-
286
-  #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
287
-    static millis_t next_blink = 0;
288
-    if (ELAPSED(millis(), next_blink)) {
289
-      Max7219_LED_Toggle(7, 7);
290
-      next_blink = millis() + 750;
291
-    }
292
-  #endif
293
-
294
-  #ifdef MAX7219_DEBUG_STEPPER_HEAD
295
-    static int16_t last_head_cnt = 0;
296
-    if (last_head_cnt != head) {
297
-      if (last_head_cnt < 8)
298
-        Max7219_LED_Off(last_head_cnt, MAX7219_DEBUG_STEPPER_HEAD);
299
-      else
300
-        Max7219_LED_Off(last_head_cnt - 8, MAX7219_DEBUG_STEPPER_HEAD + 1);
301
-
302
-      last_head_cnt = head;
303
-      if (head < 8)
304
-        Max7219_LED_On(head, MAX7219_DEBUG_STEPPER_HEAD);
305
-      else
306
-        Max7219_LED_On(head - 8, MAX7219_DEBUG_STEPPER_HEAD + 1);
307
-    }
308
-  #endif
309
-
310
-  #ifdef MAX7219_DEBUG_STEPPER_TAIL
311
-    static int16_t last_tail_cnt = 0;
312
-    if (last_tail_cnt != tail) {
313
-      if (last_tail_cnt < 8)
314
-        Max7219_LED_Off(last_tail_cnt, MAX7219_DEBUG_STEPPER_TAIL);
315
-      else
316
-        Max7219_LED_Off(last_tail_cnt - 8, MAX7219_DEBUG_STEPPER_TAIL + 1);
317
-
318
-      last_tail_cnt = tail;
319
-      if (tail < 8)
320
-        Max7219_LED_On(tail, MAX7219_DEBUG_STEPPER_TAIL);
321
-      else
322
-        Max7219_LED_On(tail - 8, MAX7219_DEBUG_STEPPER_TAIL + 1);
323
-    }
324
-  #endif
325
-
326
-  #ifdef MAX7219_DEBUG_STEPPER_QUEUE
327
-    static int16_t last_depth = 0;
328
-    int16_t current_depth = head - tail;
329
-    if (current_depth != last_depth) {  // usually, no update will be needed.
330
-      if (current_depth < 0) current_depth += BLOCK_BUFFER_SIZE;
331
-      NOMORE(current_depth, BLOCK_BUFFER_SIZE);
332
-      NOMORE(current_depth, 16);        // if the BLOCK_BUFFER_SIZE is greater than 16, two lines
333
-                                        // of LEDs is enough to see if the buffer is draining
334
-
335
-      const uint8_t st = min(current_depth, last_depth),
336
-                    en = max(current_depth, last_depth);
337
-      if (current_depth < last_depth)
338
-        for (uint8_t i = st; i <= en; i++)   // clear the highest order LEDs
339
-          Max7219_LED_Off(i / 2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
340
-      else
341
-        for (uint8_t i = st; i <= en; i++)   // set the LEDs to current depth
342
-          Max7219_LED_On(i / 2, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
343
-
344
-      last_depth = current_depth;
345
-    }
346
-  #endif
347
-}
348
-
349
-#endif // MAX7219_DEBUG

+ 0
- 90
Marlin/Max7219_Debug_LEDs.h View File

@@ -1,90 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * This module is off by default, but can be enabled to facilitate the display of
25
- * extra debug information during code development. It assumes the existence of a
26
- * Max7219 LED Matrix. A suitable device can be obtained on eBay similar to this:
27
- * http://www.ebay.com/itm/191781645249 for under $2.00 including shipping.
28
- *
29
- * Just connect up +5v and GND to give it power, then connect up the pins assigned
30
- * in Configuration_adv.h. For example, on the Re-ARM you could use:
31
- *
32
- *   #define MAX7219_CLK_PIN   77
33
- *   #define MAX7219_DIN_PIN   78
34
- *   #define MAX7219_LOAD_PIN  79
35
- *
36
- * Max7219_init() is called automatically at startup, and then there are a number of
37
- * support functions available to control the LEDs in the 8x8 grid.
38
- *
39
- * void Max7219_init();
40
- * void Max7219_PutByte(uint8_t data);
41
- * void Max7219(uint8_t reg, uint8_t data);
42
- * void Max7219_LED_Set(uint8_t row, uint8_t col, bool on);
43
- * void Max7219_LED_On(uint8_t col, uint8_t row);
44
- * void Max7219_LED_Off(uint8_t col, uint8_t row);
45
- * void Max7219_LED_Toggle(uint8_t row, uint8_t col);
46
- * void Max7219_Clear_Row(uint8_t row);
47
- * void Max7219_Clear_Column(uint8_t col);
48
- * void Max7219_Set_Row(uint8_t row, uint8_t val);
49
- * void Max7219_Set_2_Rows(uint8_t row, uint16_t val);
50
- * void Max7219_Set_4_Rows(uint8_t row, uint32_t val);
51
- * void Max7219_Set_Column(uint8_t col, uint8_t val);
52
- * void Max7219_idle_tasks();
53
- */
54
-
55
-#ifndef __MAX7219_DEBUG_LEDS_H__
56
-#define __MAX7219_DEBUG_LEDS_H__
57
-
58
-//
59
-// define max7219 registers
60
-//
61
-#define max7219_reg_noop        0x00
62
-#define max7219_reg_digit0      0x01
63
-#define max7219_reg_digit1      0x02
64
-#define max7219_reg_digit2      0x03
65
-#define max7219_reg_digit3      0x04
66
-#define max7219_reg_digit4      0x05
67
-#define max7219_reg_digit5      0x06
68
-#define max7219_reg_digit6      0x07
69
-#define max7219_reg_digit7      0x08
70
-
71
-#define max7219_reg_intensity   0x0A
72
-#define max7219_reg_displayTest 0x0F
73
-#define max7219_reg_decodeMode  0x09
74
-#define max7219_reg_scanLimit   0x0B
75
-#define max7219_reg_shutdown    0x0C
76
-
77
-void Max7219_init();
78
-void Max7219_PutByte(uint8_t data);
79
-void Max7219(const uint8_t reg, const uint8_t data);
80
-void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on);
81
-void Max7219_LED_On(const uint8_t row, const uint8_t col);
82
-void Max7219_LED_Off(const uint8_t row, const uint8_t col);
83
-void Max7219_LED_Toggle(const uint8_t row, const uint8_t col);
84
-void Max7219_Clear_Row(const uint8_t row);
85
-void Max7219_Clear_Column(const uint8_t col);
86
-void Max7219_Set_Row(const uint8_t row, const uint8_t val);
87
-void Max7219_Set_Column(const uint8_t col, const uint8_t val);
88
-void Max7219_idle_tasks();
89
-
90
-#endif // __MAX7219_DEBUG_LEDS_H__

+ 0
- 1577
Marlin/SanityCheck.h
File diff suppressed because it is too large
View File


+ 0
- 715
Marlin/Sd2Card.cpp View File

@@ -1,715 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Arduino Sd2Card Library
25
- * Copyright (C) 2009 by William Greiman
26
- *
27
- * This file is part of the Arduino Sd2Card Library
28
- */
29
-#include "MarlinConfig.h"
30
-
31
-#if ENABLED(SDSUPPORT)
32
-
33
-#include "Sd2Card.h"
34
-
35
-#if ENABLED(USE_WATCHDOG)
36
-  #include "watchdog.h"
37
-#endif
38
-
39
-#if DISABLED(SOFTWARE_SPI)
40
-  // functions for hardware SPI
41
-
42
-  // make sure SPCR rate is in expected bits
43
-  #if (SPR0 != 0 || SPR1 != 1)
44
-    #error "unexpected SPCR bits"
45
-  #endif
46
-  /**
47
-   * Initialize hardware SPI
48
-   * Set SCK rate to F_CPU/pow(2, 1 + spiRate) for spiRate [0,6]
49
-   */
50
-  static void spiInit(uint8_t spiRate) {
51
-    // See avr processor documentation
52
-    SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1);
53
-    SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X);
54
-  }
55
-
56
-  /** SPI receive a byte */
57
-  static uint8_t spiRec() {
58
-    SPDR = 0xFF;
59
-    while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
60
-    return SPDR;
61
-  }
62
-
63
-  /** SPI read data - only one call so force inline */
64
-  static inline __attribute__((always_inline))
65
-  void spiRead(uint8_t* buf, uint16_t nbyte) {
66
-    if (nbyte-- == 0) return;
67
-    SPDR = 0xFF;
68
-    for (uint16_t i = 0; i < nbyte; i++) {
69
-      while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
70
-      buf[i] = SPDR;
71
-      SPDR = 0xFF;
72
-    }
73
-    while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
74
-    buf[nbyte] = SPDR;
75
-  }
76
-
77
-  /** SPI send a byte */
78
-  static void spiSend(uint8_t b) {
79
-    SPDR = b;
80
-    while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
81
-  }
82
-
83
-  /** SPI send block - only one call so force inline */
84
-  static inline __attribute__((always_inline))
85
-  void spiSendBlock(uint8_t token, const uint8_t* buf) {
86
-    SPDR = token;
87
-    for (uint16_t i = 0; i < 512; i += 2) {
88
-      while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
89
-      SPDR = buf[i];
90
-      while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
91
-      SPDR = buf[i + 1];
92
-    }
93
-    while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
94
-  }
95
-       //------------------------------------------------------------------------------
96
-#else  // SOFTWARE_SPI
97
-       //------------------------------------------------------------------------------
98
-
99
-  /** nop to tune soft SPI timing */
100
-  #define nop asm volatile ("nop\n\t")
101
-
102
-  /** Soft SPI receive byte */
103
-  static uint8_t spiRec() {
104
-    uint8_t data = 0;
105
-    // no interrupts during byte receive - about 8 us
106
-    cli();
107
-    // output pin high - like sending 0xFF
108
-    WRITE(SPI_MOSI_PIN, HIGH);
109
-
110
-    for (uint8_t i = 0; i < 8; i++) {
111
-      WRITE(SPI_SCK_PIN, HIGH);
112
-
113
-      // adjust so SCK is nice
114
-      nop;
115
-      nop;
116
-
117
-      data <<= 1;
118
-
119
-      if (READ(SPI_MISO_PIN)) data |= 1;
120
-
121
-      WRITE(SPI_SCK_PIN, LOW);
122
-    }
123
-    // enable interrupts
124
-    sei();
125
-    return data;
126
-  }
127
-
128
-  /** Soft SPI read data */
129
-  static void spiRead(uint8_t* buf, uint16_t nbyte) {
130
-    for (uint16_t i = 0; i < nbyte; i++)
131
-      buf[i] = spiRec();
132
-  }
133
-
134
-  /** Soft SPI send byte */
135
-  static void spiSend(uint8_t data) {
136
-    // no interrupts during byte send - about 8 us
137
-    cli();
138
-    for (uint8_t i = 0; i < 8; i++) {
139
-      WRITE(SPI_SCK_PIN, LOW);
140
-
141
-      WRITE(SPI_MOSI_PIN, data & 0x80);
142
-
143
-      data <<= 1;
144
-
145
-      WRITE(SPI_SCK_PIN, HIGH);
146
-    }
147
-    // hold SCK high for a few ns
148
-    nop;
149
-    nop;
150
-    nop;
151
-    nop;
152
-
153
-    WRITE(SPI_SCK_PIN, LOW);
154
-    // enable interrupts
155
-    sei();
156
-  }
157
-
158
-  /** Soft SPI send block */
159
-  void spiSendBlock(uint8_t token, const uint8_t* buf) {
160
-    spiSend(token);
161
-    for (uint16_t i = 0; i < 512; i++)
162
-      spiSend(buf[i]);
163
-  }
164
-#endif  // SOFTWARE_SPI
165
-
166
-// send command and return error code.  Return zero for OK
167
-uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) {
168
-  // select card
169
-  chipSelectLow();
170
-
171
-  // wait up to 300 ms if busy
172
-  waitNotBusy(300);
173
-
174
-  // send command
175
-  spiSend(cmd | 0x40);
176
-
177
-  // send argument
178
-  for (int8_t s = 24; s >= 0; s -= 8) spiSend(arg >> s);
179
-
180
-  // send CRC
181
-  uint8_t crc = 0xFF;
182
-  if (cmd == CMD0) crc = 0x95;  // correct crc for CMD0 with arg 0
183
-  if (cmd == CMD8) crc = 0x87;  // correct crc for CMD8 with arg 0x1AA
184
-  spiSend(crc);
185
-
186
-  // skip stuff byte for stop read
187
-  if (cmd == CMD12) spiRec();
188
-
189
-  // wait for response
190
-  for (uint8_t i = 0; ((status_ = spiRec()) & 0x80) && i != 0xFF; i++) { /* Intentionally left empty */ }
191
-  return status_;
192
-}
193
-
194
-/**
195
- * Determine the size of an SD flash memory card.
196
- *
197
- * \return The number of 512 byte data blocks in the card
198
- *         or zero if an error occurs.
199
- */
200
-uint32_t Sd2Card::cardSize() {
201
-  csd_t csd;
202
-  if (!readCSD(&csd)) return 0;
203
-  if (csd.v1.csd_ver == 0) {
204
-    uint8_t read_bl_len = csd.v1.read_bl_len;
205
-    uint16_t c_size = (csd.v1.c_size_high << 10)
206
-                      | (csd.v1.c_size_mid << 2) | csd.v1.c_size_low;
207
-    uint8_t c_size_mult = (csd.v1.c_size_mult_high << 1)
208
-                          | csd.v1.c_size_mult_low;
209
-    return (uint32_t)(c_size + 1) << (c_size_mult + read_bl_len - 7);
210
-  }
211
-  else if (csd.v2.csd_ver == 1) {
212
-    uint32_t c_size = ((uint32_t)csd.v2.c_size_high << 16)
213
-                      | (csd.v2.c_size_mid << 8) | csd.v2.c_size_low;
214
-    return (c_size + 1) << 10;
215
-  }
216
-  else {
217
-    error(SD_CARD_ERROR_BAD_CSD);
218
-    return 0;
219
-  }
220
-}
221
-
222
-void Sd2Card::chipSelectHigh() {
223
-  digitalWrite(chipSelectPin_, HIGH);
224
-}
225
-
226
-void Sd2Card::chipSelectLow() {
227
-  #if DISABLED(SOFTWARE_SPI)
228
-    spiInit(spiRate_);
229
-  #endif  // SOFTWARE_SPI
230
-  digitalWrite(chipSelectPin_, LOW);
231
-}
232
-
233
-/**
234
- * Erase a range of blocks.
235
- *
236
- * \param[in] firstBlock The address of the first block in the range.
237
- * \param[in] lastBlock The address of the last block in the range.
238
- *
239
- * \note This function requests the SD card to do a flash erase for a
240
- * range of blocks.  The data on the card after an erase operation is
241
- * either 0 or 1, depends on the card vendor.  The card must support
242
- * single block erase.
243
- *
244
- * \return true for success, false for failure.
245
- */
246
-bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) {
247
-  csd_t csd;
248
-  if (!readCSD(&csd)) goto FAIL;
249
-  // check for single block erase
250
-  if (!csd.v1.erase_blk_en) {
251
-    // erase size mask
252
-    uint8_t m = (csd.v1.sector_size_high << 1) | csd.v1.sector_size_low;
253
-    if ((firstBlock & m) != 0 || ((lastBlock + 1) & m) != 0) {
254
-      // error card can't erase specified area
255
-      error(SD_CARD_ERROR_ERASE_SINGLE_BLOCK);
256
-      goto FAIL;
257
-    }
258
-  }
259
-  if (type_ != SD_CARD_TYPE_SDHC) {
260
-    firstBlock <<= 9;
261
-    lastBlock <<= 9;
262
-  }
263
-  if (cardCommand(CMD32, firstBlock)
264
-      || cardCommand(CMD33, lastBlock)
265
-      || cardCommand(CMD38, 0)) {
266
-    error(SD_CARD_ERROR_ERASE);
267
-    goto FAIL;
268
-  }
269
-  if (!waitNotBusy(SD_ERASE_TIMEOUT)) {
270
-    error(SD_CARD_ERROR_ERASE_TIMEOUT);
271
-    goto FAIL;
272
-  }
273
-  chipSelectHigh();
274
-  return true;
275
-  FAIL:
276
-  chipSelectHigh();
277
-  return false;
278
-}
279
-
280
-/**
281
- * Determine if card supports single block erase.
282
- *
283
- * \return true if single block erase is supported.
284
- *         false if single block erase is not supported.
285
- */
286
-bool Sd2Card::eraseSingleBlockEnable() {
287
-  csd_t csd;
288
-  return readCSD(&csd) ? csd.v1.erase_blk_en : false;
289
-}
290
-
291
-/**
292
- * Initialize an SD flash memory card.
293
- *
294
- * \param[in] sckRateID SPI clock rate selector. See setSckRate().
295
- * \param[in] chipSelectPin SD chip select pin number.
296
- *
297
- * \return true for success, false for failure.
298
- * The reason for failure can be determined by calling errorCode() and errorData().
299
- */
300
-bool Sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin) {
301
-  errorCode_ = type_ = 0;
302
-  chipSelectPin_ = chipSelectPin;
303
-  // 16-bit init start time allows over a minute
304
-  uint16_t t0 = (uint16_t)millis();
305
-  uint32_t arg;
306
-
307
-  // If init takes more than 4s it could trigger
308
-  // watchdog leading to a reboot loop.
309
-  #if ENABLED(USE_WATCHDOG)
310
-    watchdog_reset();
311
-  #endif
312
-
313
-  // set pin modes
314
-  pinMode(chipSelectPin_, OUTPUT);
315
-  chipSelectHigh();
316
-  SET_INPUT(SPI_MISO_PIN);
317
-  SET_OUTPUT(SPI_MOSI_PIN);
318
-  SET_OUTPUT(SPI_SCK_PIN);
319
-
320
-  #if DISABLED(SOFTWARE_SPI)
321
-    // SS must be in output mode even it is not chip select
322
-    SET_OUTPUT(SS_PIN);
323
-    // set SS high - may be chip select for another SPI device
324
-    #if SET_SPI_SS_HIGH
325
-      WRITE(SS_PIN, HIGH);
326
-    #endif  // SET_SPI_SS_HIGH
327
-    // set SCK rate for initialization commands
328
-    spiRate_ = SPI_SD_INIT_RATE;
329
-    spiInit(spiRate_);
330
-  #endif  // SOFTWARE_SPI
331
-
332
-  // must supply min of 74 clock cycles with CS high.
333
-  for (uint8_t i = 0; i < 10; i++) spiSend(0xFF);
334
-
335
-  // command to go idle in SPI mode
336
-  while ((status_ = cardCommand(CMD0, 0)) != R1_IDLE_STATE) {
337
-    if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) {
338
-      error(SD_CARD_ERROR_CMD0);
339
-      goto FAIL;
340
-    }
341
-  }
342
-  // check SD version
343
-  if ((cardCommand(CMD8, 0x1AA) & R1_ILLEGAL_COMMAND)) {
344
-    type(SD_CARD_TYPE_SD1);
345
-  }
346
-  else {
347
-    // only need last byte of r7 response
348
-    for (uint8_t i = 0; i < 4; i++) status_ = spiRec();
349
-    if (status_ != 0xAA) {
350
-      error(SD_CARD_ERROR_CMD8);
351
-      goto FAIL;
352
-    }
353
-    type(SD_CARD_TYPE_SD2);
354
-  }
355
-  // initialize card and send host supports SDHC if SD2
356
-  arg = type() == SD_CARD_TYPE_SD2 ? 0x40000000 : 0;
357
-
358
-  while ((status_ = cardAcmd(ACMD41, arg)) != R1_READY_STATE) {
359
-    // check for timeout
360
-    if (((uint16_t)millis() - t0) > SD_INIT_TIMEOUT) {
361
-      error(SD_CARD_ERROR_ACMD41);
362
-      goto FAIL;
363
-    }
364
-  }
365
-  // if SD2 read OCR register to check for SDHC card
366
-  if (type() == SD_CARD_TYPE_SD2) {
367
-    if (cardCommand(CMD58, 0)) {
368
-      error(SD_CARD_ERROR_CMD58);
369
-      goto FAIL;
370
-    }
371
-    if ((spiRec() & 0xC0) == 0xC0) type(SD_CARD_TYPE_SDHC);
372
-    // discard rest of ocr - contains allowed voltage range
373
-    for (uint8_t i = 0; i < 3; i++) spiRec();
374
-  }
375
-  chipSelectHigh();
376
-
377
-  #if DISABLED(SOFTWARE_SPI)
378
-    return setSckRate(sckRateID);
379
-  #else  // SOFTWARE_SPI
380
-    UNUSED(sckRateID);
381
-    return true;
382
-  #endif  // SOFTWARE_SPI
383
-
384
-  FAIL:
385
-  chipSelectHigh();
386
-  return false;
387
-}
388
-
389
-/**
390
- * Read a 512 byte block from an SD card.
391
- *
392
- * \param[in] blockNumber Logical block to be read.
393
- * \param[out] dst Pointer to the location that will receive the data.
394
- * \return true for success, false for failure.
395
- */
396
-bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
397
-  // use address if not SDHC card
398
-  if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
399
-
400
-  #if ENABLED(SD_CHECK_AND_RETRY)
401
-    uint8_t retryCnt = 3;
402
-    for(;;) {
403
-      if (cardCommand(CMD17, blockNumber))
404
-        error(SD_CARD_ERROR_CMD17);
405
-      else if (readData(dst, 512))
406
-        return true;
407
-
408
-      if (!--retryCnt) break;
409
-
410
-      chipSelectHigh();
411
-      cardCommand(CMD12, 0); // Try sending a stop command, ignore the result.
412
-      errorCode_ = 0;
413
-    }
414
-  #else
415
-    if (cardCommand(CMD17, blockNumber))
416
-      error(SD_CARD_ERROR_CMD17);
417
-    else
418
-      return readData(dst, 512);
419
-  #endif
420
-
421
-  chipSelectHigh();
422
-  return false;
423
-}
424
-
425
-/**
426
- * Read one data block in a multiple block read sequence
427
- *
428
- * \param[in] dst Pointer to the location for the data to be read.
429
- *
430
- * \return true for success, false for failure.
431
- */
432
-bool Sd2Card::readData(uint8_t* dst) {
433
-  chipSelectLow();
434
-  return readData(dst, 512);
435
-}
436
-
437
-#if ENABLED(SD_CHECK_AND_RETRY)
438
-  static const uint16_t crctab[] PROGMEM = {
439
-    0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
440
-    0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
441
-    0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
442
-    0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
443
-    0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
444
-    0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
445
-    0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
446
-    0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
447
-    0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
448
-    0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
449
-    0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
450
-    0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
451
-    0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
452
-    0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
453
-    0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
454
-    0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
455
-    0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
456
-    0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
457
-    0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
458
-    0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
459
-    0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
460
-    0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
461
-    0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
462
-    0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
463
-    0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
464
-    0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
465
-    0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
466
-    0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
467
-    0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
468
-    0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
469
-    0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
470
-    0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
471
-  };
472
-  static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
473
-    uint16_t crc = 0;
474
-    for (size_t i = 0; i < n; i++) {
475
-      crc = pgm_read_word(&crctab[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
476
-    }
477
-    return crc;
478
-  }
479
-#endif // SD_CHECK_AND_RETRY
480
-
481
-bool Sd2Card::readData(uint8_t* dst, uint16_t count) {
482
-  // wait for start block token
483
-  uint16_t t0 = millis();
484
-  while ((status_ = spiRec()) == 0XFF) {
485
-    if (((uint16_t)millis() - t0) > SD_READ_TIMEOUT) {
486
-      error(SD_CARD_ERROR_READ_TIMEOUT);
487
-      goto FAIL;
488
-    }
489
-  }
490
-  if (status_ != DATA_START_BLOCK) {
491
-    error(SD_CARD_ERROR_READ);
492
-    goto FAIL;
493
-  }
494
-  // transfer data
495
-  spiRead(dst, count);
496
-
497
-#if ENABLED(SD_CHECK_AND_RETRY)
498
-  {
499
-    uint16_t calcCrc = CRC_CCITT(dst, count);
500
-    uint16_t recvCrc = spiRec() << 8;
501
-    recvCrc |= spiRec();
502
-    if (calcCrc != recvCrc) {
503
-      error(SD_CARD_ERROR_CRC);
504
-      goto FAIL;
505
-    }
506
-  }
507
-#else
508
-  // discard CRC
509
-  spiRec();
510
-  spiRec();
511
-#endif
512
-  chipSelectHigh();
513
-  // Send an additional dummy byte, required by Toshiba Flash Air SD Card
514
-  spiSend(0XFF);
515
-  return true;
516
-  FAIL:
517
-  chipSelectHigh();
518
-  // Send an additional dummy byte, required by Toshiba Flash Air SD Card
519
-  spiSend(0XFF);
520
-  return false;
521
-}
522
-
523
-/** read CID or CSR register */
524
-bool Sd2Card::readRegister(uint8_t cmd, void* buf) {
525
-  uint8_t* dst = reinterpret_cast<uint8_t*>(buf);
526
-  if (cardCommand(cmd, 0)) {
527
-    error(SD_CARD_ERROR_READ_REG);
528
-    chipSelectHigh();
529
-    return false;
530
-  }
531
-  return readData(dst, 16);
532
-}
533
-
534
-/**
535
- * Start a read multiple blocks sequence.
536
- *
537
- * \param[in] blockNumber Address of first block in sequence.
538
- *
539
- * \note This function is used with readData() and readStop() for optimized
540
- * multiple block reads.  SPI chipSelect must be low for the entire sequence.
541
- *
542
- * \return true for success, false for failure.
543
- */
544
-bool Sd2Card::readStart(uint32_t blockNumber) {
545
-  if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
546
-  if (cardCommand(CMD18, blockNumber)) {
547
-    error(SD_CARD_ERROR_CMD18);
548
-    chipSelectHigh();
549
-    return false;
550
-  }
551
-  chipSelectHigh();
552
-  return true;
553
-}
554
-
555
-/**
556
- * End a read multiple blocks sequence.
557
- *
558
- * \return true for success, false for failure.
559
- */
560
-bool Sd2Card::readStop() {
561
-  chipSelectLow();
562
-  if (cardCommand(CMD12, 0)) {
563
-    error(SD_CARD_ERROR_CMD12);
564
-    chipSelectHigh();
565
-    return false;
566
-  }
567
-  chipSelectHigh();
568
-  return true;
569
-}
570
-
571
-/**
572
- * Set the SPI clock rate.
573
- *
574
- * \param[in] sckRateID A value in the range [0, 6].
575
- *
576
- * The SPI clock will be set to F_CPU/pow(2, 1 + sckRateID). The maximum
577
- * SPI rate is F_CPU/2 for \a sckRateID = 0 and the minimum rate is F_CPU/128
578
- * for \a scsRateID = 6.
579
- *
580
- * \return The value one, true, is returned for success and the value zero,
581
- * false, is returned for an invalid value of \a sckRateID.
582
- */
583
-bool Sd2Card::setSckRate(uint8_t sckRateID) {
584
-  if (sckRateID > 6) {
585
-    error(SD_CARD_ERROR_SCK_RATE);
586
-    return false;
587
-  }
588
-  spiRate_ = sckRateID;
589
-  return true;
590
-}
591
-
592
-// wait for card to go not busy
593
-bool Sd2Card::waitNotBusy(uint16_t timeoutMillis) {
594
-  uint16_t t0 = millis();
595
-  while (spiRec() != 0XFF)
596
-    if (((uint16_t)millis() - t0) >= timeoutMillis) return false;
597
-
598
-  return true;
599
-}
600
-
601
-/**
602
- * Writes a 512 byte block to an SD card.
603
- *
604
- * \param[in] blockNumber Logical block to be written.
605
- * \param[in] src Pointer to the location of the data to be written.
606
- * \return true for success, false for failure.
607
- */
608
-bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) {
609
-  // use address if not SDHC card
610
-  if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
611
-  if (cardCommand(CMD24, blockNumber)) {
612
-    error(SD_CARD_ERROR_CMD24);
613
-    goto FAIL;
614
-  }
615
-  if (!writeData(DATA_START_BLOCK, src)) goto FAIL;
616
-
617
-  // wait for flash programming to complete
618
-  if (!waitNotBusy(SD_WRITE_TIMEOUT)) {
619
-    error(SD_CARD_ERROR_WRITE_TIMEOUT);
620
-    goto FAIL;
621
-  }
622
-  // response is r2 so get and check two bytes for nonzero
623
-  if (cardCommand(CMD13, 0) || spiRec()) {
624
-    error(SD_CARD_ERROR_WRITE_PROGRAMMING);
625
-    goto FAIL;
626
-  }
627
-  chipSelectHigh();
628
-  return true;
629
-  FAIL:
630
-  chipSelectHigh();
631
-  return false;
632
-}
633
-
634
-/**
635
- * Write one data block in a multiple block write sequence
636
- * \param[in] src Pointer to the location of the data to be written.
637
- * \return true for success, false for failure.
638
- */
639
-bool Sd2Card::writeData(const uint8_t* src) {
640
-  chipSelectLow();
641
-  // wait for previous write to finish
642
-  if (!waitNotBusy(SD_WRITE_TIMEOUT) || !writeData(WRITE_MULTIPLE_TOKEN, src)) {
643
-    error(SD_CARD_ERROR_WRITE_MULTIPLE);
644
-    chipSelectHigh();
645
-    return false;
646
-  }
647
-  chipSelectHigh();
648
-  return true;
649
-}
650
-
651
-// send one block of data for write block or write multiple blocks
652
-bool Sd2Card::writeData(uint8_t token, const uint8_t* src) {
653
-  spiSendBlock(token, src);
654
-
655
-  spiSend(0xFF);  // dummy crc
656
-  spiSend(0xFF);  // dummy crc
657
-
658
-  status_ = spiRec();
659
-  if ((status_ & DATA_RES_MASK) != DATA_RES_ACCEPTED) {
660
-    error(SD_CARD_ERROR_WRITE);
661
-    chipSelectHigh();
662
-    return false;
663
-  }
664
-  return true;
665
-}
666
-
667
-/**
668
- * Start a write multiple blocks sequence.
669
- *
670
- * \param[in] blockNumber Address of first block in sequence.
671
- * \param[in] eraseCount The number of blocks to be pre-erased.
672
- *
673
- * \note This function is used with writeData() and writeStop()
674
- * for optimized multiple block writes.
675
- *
676
- * \return true for success, false for failure.
677
- */
678
-bool Sd2Card::writeStart(uint32_t blockNumber, uint32_t eraseCount) {
679
-  // send pre-erase count
680
-  if (cardAcmd(ACMD23, eraseCount)) {
681
-    error(SD_CARD_ERROR_ACMD23);
682
-    goto FAIL;
683
-  }
684
-  // use address if not SDHC card
685
-  if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9;
686
-  if (cardCommand(CMD25, blockNumber)) {
687
-    error(SD_CARD_ERROR_CMD25);
688
-    goto FAIL;
689
-  }
690
-  chipSelectHigh();
691
-  return true;
692
-  FAIL:
693
-  chipSelectHigh();
694
-  return false;
695
-}
696
-
697
-/**
698
- * End a write multiple blocks sequence.
699
- *
700
- * \return true for success, false for failure.
701
- */
702
-bool Sd2Card::writeStop() {
703
-  chipSelectLow();
704
-  if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto FAIL;
705
-  spiSend(STOP_TRAN_TOKEN);
706
-  if (!waitNotBusy(SD_WRITE_TIMEOUT)) goto FAIL;
707
-  chipSelectHigh();
708
-  return true;
709
-  FAIL:
710
-  error(SD_CARD_ERROR_STOP_TRAN);
711
-  chipSelectHigh();
712
-  return false;
713
-}
714
-
715
-#endif // SDSUPPORT

+ 0
- 204
Marlin/Sd2Card.h View File

@@ -1,204 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * \file
25
- * \brief Sd2Card class for V2 SD/SDHC cards
26
- */
27
-
28
-/**
29
- * Arduino Sd2Card Library
30
- * Copyright (C) 2009 by William Greiman
31
- *
32
- * This file is part of the Arduino Sd2Card Library
33
- */
34
-#ifndef _SD2CARD_H_
35
-#define _SD2CARD_H_
36
-
37
-#include "SdFatConfig.h"
38
-#include "SdInfo.h"
39
-
40
-// SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6
41
-uint8_t const SPI_FULL_SPEED = 0,         // Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate().
42
-              SPI_HALF_SPEED = 1,         // Set SCK rate to F_CPU/4. See Sd2Card::setSckRate().
43
-              SPI_QUARTER_SPEED = 2,      // Set SCK rate to F_CPU/8. See Sd2Card::setSckRate().
44
-              SPI_EIGHTH_SPEED = 3,       // Set SCK rate to F_CPU/16. See Sd2Card::setSckRate().
45
-              SPI_SIXTEENTH_SPEED = 4;    // Set SCK rate to F_CPU/32. See Sd2Card::setSckRate().
46
-
47
-uint16_t const SD_INIT_TIMEOUT = 2000,    // init timeout ms
48
-               SD_ERASE_TIMEOUT = 10000,  // erase timeout ms
49
-               SD_READ_TIMEOUT = 300,     // read timeout ms
50
-               SD_WRITE_TIMEOUT = 600;    // write time out ms
51
-
52
-// SD card errors
53
-uint8_t const SD_CARD_ERROR_CMD0 = 0X1,                 // timeout error for command CMD0 (initialize card in SPI mode)
54
-              SD_CARD_ERROR_CMD8 = 0X2,                 // CMD8 was not accepted - not a valid SD card
55
-              SD_CARD_ERROR_CMD12 = 0X3,                // card returned an error response for CMD12 (write stop)
56
-              SD_CARD_ERROR_CMD17 = 0X4,                // card returned an error response for CMD17 (read block)
57
-              SD_CARD_ERROR_CMD18 = 0X5,                // card returned an error response for CMD18 (read multiple block)
58
-              SD_CARD_ERROR_CMD24 = 0X6,                // card returned an error response for CMD24 (write block)
59
-              SD_CARD_ERROR_CMD25 = 0X7,                // WRITE_MULTIPLE_BLOCKS command failed
60
-              SD_CARD_ERROR_CMD58 = 0X8,                // card returned an error response for CMD58 (read OCR)
61
-              SD_CARD_ERROR_ACMD23 = 0X9,               // SET_WR_BLK_ERASE_COUNT failed
62
-              SD_CARD_ERROR_ACMD41 = 0XA,               // ACMD41 initialization process timeout
63
-              SD_CARD_ERROR_BAD_CSD = 0XB,              // card returned a bad CSR version field
64
-              SD_CARD_ERROR_ERASE = 0XC,                // erase block group command failed
65
-              SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD,   // card not capable of single block erase
66
-              SD_CARD_ERROR_ERASE_TIMEOUT = 0XE,        // Erase sequence timed out
67
-              SD_CARD_ERROR_READ = 0XF,                 // card returned an error token instead of read data
68
-              SD_CARD_ERROR_READ_REG = 0x10,            // read CID or CSD failed
69
-              SD_CARD_ERROR_READ_TIMEOUT = 0x11,        // timeout while waiting for start of read data
70
-              SD_CARD_ERROR_STOP_TRAN = 0x12,           // card did not accept STOP_TRAN_TOKEN
71
-              SD_CARD_ERROR_WRITE = 0x13,               // card returned an error token as a response to a write operation
72
-              SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0x14,    // REMOVE - not used ... attempt to write protected block zero
73
-              SD_CARD_ERROR_WRITE_MULTIPLE = 0x15,      // card did not go ready for a multiple block write
74
-              SD_CARD_ERROR_WRITE_PROGRAMMING = 0x16,   // card returned an error to a CMD13 status check after a write
75
-              SD_CARD_ERROR_WRITE_TIMEOUT = 0x17,       // timeout occurred during write programming
76
-              SD_CARD_ERROR_SCK_RATE = 0x18,            // incorrect rate selected
77
-              SD_CARD_ERROR_INIT_NOT_CALLED = 0x19,     // init() not called
78
-              SD_CARD_ERROR_CRC = 0x20;                 // crc check error
79
-
80
-// card types
81
-uint8_t const SD_CARD_TYPE_SD1  = 1,                    // Standard capacity V1 SD card
82
-              SD_CARD_TYPE_SD2  = 2,                    // Standard capacity V2 SD card
83
-              SD_CARD_TYPE_SDHC = 3;                    // High Capacity SD card
84
-
85
-/**
86
- * define SOFTWARE_SPI to use bit-bang SPI
87
- */
88
-#if MEGA_SOFT_SPI
89
-  #define SOFTWARE_SPI
90
-#elif USE_SOFTWARE_SPI
91
-  #define SOFTWARE_SPI
92
-#endif
93
-
94
-// SPI pin definitions - do not edit here - change in SdFatConfig.h
95
-#if DISABLED(SOFTWARE_SPI)
96
-  // hardware pin defs
97
-  #define SD_CHIP_SELECT_PIN SS_PIN   // The default chip select pin for the SD card is SS.
98
-  // The following three pins must not be redefined for hardware SPI.
99
-  #define SPI_MOSI_PIN MOSI_PIN       // SPI Master Out Slave In pin
100
-  #define SPI_MISO_PIN MISO_PIN       // SPI Master In Slave Out pin
101
-  #define SPI_SCK_PIN SCK_PIN         // SPI Clock pin
102
-#else  // SOFTWARE_SPI
103
-  #define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN  // SPI chip select pin
104
-  #define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN      // SPI Master Out Slave In pin
105
-  #define SPI_MISO_PIN SOFT_SPI_MISO_PIN      // SPI Master In Slave Out pin
106
-  #define SPI_SCK_PIN SOFT_SPI_SCK_PIN        // SPI Clock pin
107
-#endif  // SOFTWARE_SPI
108
-
109
-/**
110
- * \class Sd2Card
111
- * \brief Raw access to SD and SDHC flash memory cards.
112
- */
113
-class Sd2Card {
114
-  public:
115
-
116
-  Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {}
117
-
118
-  uint32_t cardSize();
119
-  bool erase(uint32_t firstBlock, uint32_t lastBlock);
120
-  bool eraseSingleBlockEnable();
121
-
122
-  /**
123
-   *  Set SD error code.
124
-   *  \param[in] code value for error code.
125
-   */
126
-  void error(uint8_t code) {errorCode_ = code;}
127
-
128
-  /**
129
-   * \return error code for last error. See Sd2Card.h for a list of error codes.
130
-   */
131
-  int errorCode() const {return errorCode_;}
132
-
133
-  /** \return error data for last error. */
134
-  int errorData() const {return status_;}
135
-
136
-  /**
137
-   * Initialize an SD flash memory card with default clock rate and chip
138
-   * select pin.  See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).
139
-   *
140
-   * \return true for success or false for failure.
141
-   */
142
-  bool init(uint8_t sckRateID = SPI_FULL_SPEED,
143
-            uint8_t chipSelectPin = SD_CHIP_SELECT_PIN);
144
-  bool readBlock(uint32_t block, uint8_t* dst);
145
-
146
-  /**
147
-   * Read a card's CID register. The CID contains card identification
148
-   * information such as Manufacturer ID, Product name, Product serial
149
-   * number and Manufacturing date.
150
-   *
151
-   * \param[out] cid pointer to area for returned data.
152
-   *
153
-   * \return true for success or false for failure.
154
-   */
155
-  bool readCID(cid_t* cid) { return readRegister(CMD10, cid); }
156
-
157
-  /**
158
-   * Read a card's CSD register. The CSD contains Card-Specific Data that
159
-   * provides information regarding access to the card's contents.
160
-   *
161
-   * \param[out] csd pointer to area for returned data.
162
-   *
163
-   * \return true for success or false for failure.
164
-   */
165
-  bool readCSD(csd_t* csd) { return readRegister(CMD9, csd); }
166
-
167
-  bool readData(uint8_t* dst);
168
-  bool readStart(uint32_t blockNumber);
169
-  bool readStop();
170
-  bool setSckRate(uint8_t sckRateID);
171
-  /**
172
-   * Return the card type: SD V1, SD V2 or SDHC
173
-   * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC.
174
-   */
175
-  int type() const {return type_;}
176
-  bool writeBlock(uint32_t blockNumber, const uint8_t* src);
177
-  bool writeData(const uint8_t* src);
178
-  bool writeStart(uint32_t blockNumber, uint32_t eraseCount);
179
-  bool writeStop();
180
-
181
-  private:
182
-  uint8_t chipSelectPin_,
183
-          errorCode_,
184
-          spiRate_,
185
-          status_,
186
-          type_;
187
-
188
-  // private functions
189
-  uint8_t cardAcmd(uint8_t cmd, uint32_t arg) {
190
-    cardCommand(CMD55, 0);
191
-    return cardCommand(cmd, arg);
192
-  }
193
-  uint8_t cardCommand(uint8_t cmd, uint32_t arg);
194
-
195
-  bool readData(uint8_t* dst, uint16_t count);
196
-  bool readRegister(uint8_t cmd, void* buf);
197
-  void chipSelectHigh();
198
-  void chipSelectLow();
199
-  void type(uint8_t value) { type_ = value; }
200
-  bool waitNotBusy(uint16_t timeoutMillis);
201
-  bool writeData(uint8_t token, const uint8_t* src);
202
-};
203
-
204
-#endif  // _SD2CARD_H_

+ 0
- 1729
Marlin/SdBaseFile.cpp
File diff suppressed because it is too large
View File


+ 0
- 501
Marlin/SdBaseFile.h View File

@@ -1,501 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * \file
25
- * \brief SdBaseFile class
26
- */
27
-
28
-/**
29
- * Arduino SdFat Library
30
- * Copyright (C) 2009 by William Greiman
31
- *
32
- * This file is part of the Arduino Sd2Card Library
33
- */
34
-#ifndef _SDBASEFILE_H_
35
-#define _SDBASEFILE_H_
36
-
37
-#include "SdFatConfig.h"
38
-#include "SdVolume.h"
39
-
40
-/**
41
- * \struct filepos_t
42
- * \brief internal type for istream
43
- * do not use in user apps
44
- */
45
-struct filepos_t {
46
-  uint32_t position;  // stream byte position
47
-  uint32_t cluster;   // cluster of position
48
-  filepos_t() : position(0), cluster(0) {}
49
-};
50
-
51
-// use the gnu style oflag in open()
52
-uint8_t const O_READ = 0x01,                    // open() oflag for reading
53
-              O_RDONLY = O_READ,                // open() oflag - same as O_IN
54
-              O_WRITE = 0x02,                   // open() oflag for write
55
-              O_WRONLY = O_WRITE,               // open() oflag - same as O_WRITE
56
-              O_RDWR = (O_READ | O_WRITE),      // open() oflag for reading and writing
57
-              O_ACCMODE = (O_READ | O_WRITE),   // open() oflag mask for access modes
58
-              O_APPEND = 0x04,                  // The file offset shall be set to the end of the file prior to each write.
59
-              O_SYNC = 0x08,                    // Synchronous writes - call sync() after each write
60
-              O_TRUNC = 0x10,                   // Truncate the file to zero length
61
-              O_AT_END = 0x20,                  // Set the initial position at the end of the file
62
-              O_CREAT = 0x40,                   // Create the file if nonexistent
63
-              O_EXCL = 0x80;                    // If O_CREAT and O_EXCL are set, open() shall fail if the file exists
64
-
65
-// SdBaseFile class static and const definitions
66
-
67
-// flags for ls()
68
-uint8_t const LS_DATE = 1,    // ls() flag to print modify date
69
-              LS_SIZE = 2,    // ls() flag to print file size
70
-              LS_R = 4;       // ls() flag for recursive list of subdirectories
71
-
72
-
73
-// flags for timestamp
74
-uint8_t const T_ACCESS = 1,   // Set the file's last access date
75
-              T_CREATE = 2,   // Set the file's creation date and time
76
-              T_WRITE = 4;    // Set the file's write date and time
77
-
78
-// values for type_
79
-uint8_t const FAT_FILE_TYPE_CLOSED = 0,                           // This file has not been opened.
80
-              FAT_FILE_TYPE_NORMAL = 1,                           // A normal file
81
-              FAT_FILE_TYPE_ROOT_FIXED = 2,                       // A FAT12 or FAT16 root directory
82
-              FAT_FILE_TYPE_ROOT32 = 3,                           // A FAT32 root directory
83
-              FAT_FILE_TYPE_SUBDIR = 4,                           // A subdirectory file
84
-              FAT_FILE_TYPE_MIN_DIR = FAT_FILE_TYPE_ROOT_FIXED;   // Test value for directory type
85
-
86
-/**
87
- * date field for FAT directory entry
88
- * \param[in] year [1980,2107]
89
- * \param[in] month [1,12]
90
- * \param[in] day [1,31]
91
- *
92
- * \return Packed date for dir_t entry.
93
- */
94
-static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) { return (year - 1980) << 9 | month << 5 | day; }
95
-
96
-/**
97
- * year part of FAT directory date field
98
- * \param[in] fatDate Date in packed dir format.
99
- *
100
- * \return Extracted year [1980,2107]
101
- */
102
-static inline uint16_t FAT_YEAR(uint16_t fatDate) { return 1980 + (fatDate >> 9); }
103
-
104
-/**
105
- * month part of FAT directory date field
106
- * \param[in] fatDate Date in packed dir format.
107
- *
108
- * \return Extracted month [1,12]
109
- */
110
-static inline uint8_t FAT_MONTH(uint16_t fatDate) { return (fatDate >> 5) & 0XF; }
111
-
112
-/**
113
- * day part of FAT directory date field
114
- * \param[in] fatDate Date in packed dir format.
115
- *
116
- * \return Extracted day [1,31]
117
- */
118
-static inline uint8_t FAT_DAY(uint16_t fatDate) { return fatDate & 0x1F; }
119
-
120
-/**
121
- * time field for FAT directory entry
122
- * \param[in] hour [0,23]
123
- * \param[in] minute [0,59]
124
- * \param[in] second [0,59]
125
- *
126
- * \return Packed time for dir_t entry.
127
- */
128
-static inline uint16_t FAT_TIME(uint8_t hour, uint8_t minute, uint8_t second) { return hour << 11 | minute << 5 | second >> 1; }
129
-
130
-/**
131
- * hour part of FAT directory time field
132
- * \param[in] fatTime Time in packed dir format.
133
- *
134
- * \return Extracted hour [0,23]
135
- */
136
-static inline uint8_t FAT_HOUR(uint16_t fatTime) { return fatTime >> 11; }
137
-
138
-/**
139
- * minute part of FAT directory time field
140
- * \param[in] fatTime Time in packed dir format.
141
- *
142
- * \return Extracted minute [0,59]
143
- */
144
-static inline uint8_t FAT_MINUTE(uint16_t fatTime) { return (fatTime >> 5) & 0x3F; }
145
-
146
-/**
147
- * second part of FAT directory time field
148
- * Note second/2 is stored in packed time.
149
- *
150
- * \param[in] fatTime Time in packed dir format.
151
- *
152
- * \return Extracted second [0,58]
153
- */
154
-static inline uint8_t FAT_SECOND(uint16_t fatTime) { return 2 * (fatTime & 0x1F); }
155
-
156
-// Default date for file timestamps is 1 Jan 2000
157
-uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1;
158
-// Default time for file timestamp is 1 am
159
-uint16_t const FAT_DEFAULT_TIME = (1 << 11);
160
-
161
-/**
162
- * \class SdBaseFile
163
- * \brief Base class for SdFile with Print and C++ streams.
164
- */
165
-class SdBaseFile {
166
- public:
167
-  SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {}
168
-  SdBaseFile(const char* path, uint8_t oflag);
169
-  ~SdBaseFile() { if (isOpen()) close(); }
170
-
171
-  /**
172
-   * writeError is set to true if an error occurs during a write().
173
-   * Set writeError to false before calling print() and/or write() and check
174
-   * for true after calls to print() and/or write().
175
-   */
176
-  bool writeError;
177
-
178
-  // helpers for stream classes
179
-
180
-  /**
181
-   * get position for streams
182
-   * \param[out] pos struct to receive position
183
-   */
184
-  void getpos(filepos_t* pos);
185
-
186
-  /**
187
-   * set position for streams
188
-   * \param[out] pos struct with value for new position
189
-   */
190
-  void setpos(filepos_t* pos);
191
-
192
-  bool close();
193
-  bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
194
-  bool createContiguous(SdBaseFile* dirFile,
195
-                        const char* path, uint32_t size);
196
-  /**
197
-   * \return The current cluster number for a file or directory.
198
-   */
199
-  uint32_t curCluster() const { return curCluster_; }
200
-
201
-  /**
202
-   * \return The current position for a file or directory.
203
-   */
204
-  uint32_t curPosition() const { return curPosition_; }
205
-
206
-  /**
207
-   * \return Current working directory
208
-   */
209
-  static SdBaseFile* cwd() { return cwd_; }
210
-
211
-  /**
212
-   * Set the date/time callback function
213
-   *
214
-   * \param[in] dateTime The user's call back function.  The callback
215
-   * function is of the form:
216
-   *
217
-   * \code
218
-   * void dateTime(uint16_t* date, uint16_t* time) {
219
-   *   uint16_t year;
220
-   *   uint8_t month, day, hour, minute, second;
221
-   *
222
-   *   // User gets date and time from GPS or real-time clock here
223
-   *
224
-   *   // return date using FAT_DATE macro to format fields
225
-   *   *date = FAT_DATE(year, month, day);
226
-   *
227
-   *   // return time using FAT_TIME macro to format fields
228
-   *   *time = FAT_TIME(hour, minute, second);
229
-   * }
230
-   * \endcode
231
-   *
232
-   * Sets the function that is called when a file is created or when
233
-   * a file's directory entry is modified by sync(). All timestamps,
234
-   * access, creation, and modify, are set when a file is created.
235
-   * sync() maintains the last access date and last modify date/time.
236
-   *
237
-   * See the timestamp() function.
238
-   */
239
-  static void dateTimeCallback(
240
-    void (*dateTime)(uint16_t* date, uint16_t* time)) {
241
-    dateTime_ = dateTime;
242
-  }
243
-
244
-  /**
245
-   * Cancel the date/time callback function.
246
-   */
247
-  static void dateTimeCallbackCancel() { dateTime_ = 0; }
248
-  bool dirEntry(dir_t* dir);
249
-  static void dirName(const dir_t& dir, char* name);
250
-  bool exists(const char* name);
251
-  int16_t fgets(char* str, int16_t num, char* delim = 0);
252
-
253
-  /**
254
-   * \return The total number of bytes in a file or directory.
255
-   */
256
-  uint32_t fileSize() const { return fileSize_; }
257
-
258
-  /**
259
-   * \return The first cluster number for a file or directory.
260
-   */
261
-  uint32_t firstCluster() const { return firstCluster_; }
262
-
263
-  /**
264
-   * \return True if this is a directory else false.
265
-   */
266
-  bool isDir() const { return type_ >= FAT_FILE_TYPE_MIN_DIR; }
267
-
268
-  /**
269
-   * \return True if this is a normal file else false.
270
-   */
271
-  bool isFile() const { return type_ == FAT_FILE_TYPE_NORMAL; }
272
-
273
-  /**
274
-   * \return True if this is an open file/directory else false.
275
-   */
276
-  bool isOpen() const { return type_ != FAT_FILE_TYPE_CLOSED; }
277
-
278
-  /**
279
-   * \return True if this is a subdirectory else false.
280
-   */
281
-  bool isSubDir() const { return type_ == FAT_FILE_TYPE_SUBDIR; }
282
-
283
-  /**
284
-   * \return True if this is the root directory.
285
-   */
286
-  bool isRoot() const { return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; }
287
-
288
-  bool getFilename(char * const name);
289
-  void ls(uint8_t flags = 0, uint8_t indent = 0);
290
-
291
-  bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true);
292
-  bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
293
-  bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
294
-  bool open(const char* path, uint8_t oflag = O_READ);
295
-  bool openNext(SdBaseFile* dirFile, uint8_t oflag);
296
-  bool openRoot(SdVolume* vol);
297
-  int peek();
298
-  static void printFatDate(uint16_t fatDate);
299
-  static void printFatTime(uint16_t fatTime);
300
-  bool printName();
301
-  int16_t read();
302
-  int16_t read(void* buf, uint16_t nbyte);
303
-  int8_t readDir(dir_t* dir, char* longFilename);
304
-  static bool remove(SdBaseFile* dirFile, const char* path);
305
-  bool remove();
306
-
307
-  /**
308
-   * Set the file's current position to zero.
309
-   */
310
-  void rewind() { seekSet(0); }
311
-  bool rename(SdBaseFile* dirFile, const char* newPath);
312
-  bool rmdir();
313
-  bool rmRfStar();
314
-
315
-  /**
316
-   * Set the files position to current position + \a pos. See seekSet().
317
-   * \param[in] offset The new position in bytes from the current position.
318
-   * \return true for success or false for failure.
319
-   */
320
-  bool seekCur(const int32_t offset) { return seekSet(curPosition_ + offset); }
321
-
322
-  /**
323
-   * Set the files position to end-of-file + \a offset. See seekSet().
324
-   * \param[in] offset The new position in bytes from end-of-file.
325
-   * \return true for success or false for failure.
326
-   */
327
-  bool seekEnd(const int32_t offset = 0) { return seekSet(fileSize_ + offset); }
328
-  bool seekSet(const uint32_t pos);
329
-  bool sync();
330
-  bool timestamp(SdBaseFile* file);
331
-  bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day,
332
-                 uint8_t hour, uint8_t minute, uint8_t second);
333
-
334
-  /**
335
-   * Type of file. Use isFile() or isDir() instead of type() if possible.
336
-   *
337
-   * \return The file or directory type.
338
-   */
339
-  uint8_t type() const { return type_; }
340
-  bool truncate(uint32_t size);
341
-
342
-  /**
343
-   * \return SdVolume that contains this file.
344
-   */
345
-  SdVolume* volume() const { return vol_; }
346
-  int16_t write(const void* buf, uint16_t nbyte);
347
-
348
- private:
349
-  friend class SdFat;           // allow SdFat to set cwd_
350
-  static SdBaseFile* cwd_;      // global pointer to cwd dir
351
-
352
-  // data time callback function
353
-  static void (*dateTime_)(uint16_t* date, uint16_t* time);
354
-
355
-  // bits defined in flags_
356
-  static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC),   // should be 0x0F
357
-                       F_FILE_DIR_DIRTY = 0x80;                     // sync of directory entry required
358
-
359
-  // private data
360
-  uint8_t   flags_;         // See above for definition of flags_ bits
361
-  uint8_t   fstate_;        // error and eof indicator
362
-  uint8_t   type_;          // type of file see above for values
363
-  uint32_t  curCluster_;    // cluster for current file position
364
-  uint32_t  curPosition_;   // current file position in bytes from beginning
365
-  uint32_t  dirBlock_;      // block for this files directory entry
366
-  uint8_t   dirIndex_;      // index of directory entry in dirBlock
367
-  uint32_t  fileSize_;      // file size in bytes
368
-  uint32_t  firstCluster_;  // first cluster of file
369
-  SdVolume* vol_;           // volume where file is located
370
-
371
-  /**
372
-   * EXPERIMENTAL - Don't use!
373
-   */
374
-  //bool openParent(SdBaseFile* dir);
375
-
376
-  // private functions
377
-  bool addCluster();
378
-  bool addDirCluster();
379
-  dir_t* cacheDirEntry(uint8_t action);
380
-  int8_t lsPrintNext(uint8_t flags, uint8_t indent);
381
-  static bool make83Name(const char* str, uint8_t* name, const char** ptr);
382
-  bool mkdir(SdBaseFile* parent, const uint8_t dname[11]);
383
-  bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
384
-  bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);
385
-  dir_t* readDirCache();
386
-
387
-// Deprecated functions
388
-#if ALLOW_DEPRECATED_FUNCTIONS
389
- public:
390
-
391
-  /**
392
-   * \deprecated Use:
393
-   * bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
394
-   * \param[out] bgnBlock the first block address for the file.
395
-   * \param[out] endBlock the last  block address for the file.
396
-   * \return true for success or false for failure.
397
-   */
398
-  bool contiguousRange(uint32_t& bgnBlock, uint32_t& endBlock) {
399
-    return contiguousRange(&bgnBlock, &endBlock);
400
-  }
401
-
402
-  /**
403
-   * \deprecated Use:
404
-   * bool createContiguous(SdBaseFile* dirFile, const char* path, uint32_t size)
405
-   * \param[in] dirFile The directory where the file will be created.
406
-   * \param[in] path A path with a valid DOS 8.3 file name.
407
-   * \param[in] size The desired file size.
408
-   * \return true for success or false for failure.
409
-   */
410
-  bool createContiguous(SdBaseFile& dirFile, const char* path, uint32_t size) {
411
-    return createContiguous(&dirFile, path, size);
412
-  }
413
-
414
-  /**
415
-   * \deprecated Use:
416
-   * static void dateTimeCallback(
417
-   *   void (*dateTime)(uint16_t* date, uint16_t* time));
418
-   * \param[in] dateTime The user's call back function.
419
-   */
420
-  static void dateTimeCallback(
421
-    void (*dateTime)(uint16_t &date, uint16_t &time)) {
422
-    oldDateTime_ = dateTime;
423
-    dateTime_ = dateTime ? oldToNew : 0;
424
-  }
425
-
426
-  /**
427
-   * \deprecated Use:
428
-   * bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
429
-   * \param[in] dirFile An open SdFat instance for the directory containing the
430
-   * file to be opened.
431
-   * \param[in] path A path with a valid 8.3 DOS name for the file.
432
-   * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
433
-   * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
434
-   * \return true for success or false for failure.
435
-   */
436
-  bool open(SdBaseFile& dirFile, const char* path, uint8_t oflag) {
437
-    return open(&dirFile, path, oflag);
438
-  }
439
-
440
-  /**
441
-   * \deprecated  Do not use in new apps
442
-   * \param[in] dirFile An open SdFat instance for the directory containing the
443
-   * file to be opened.
444
-   * \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
445
-   * \return true for success or false for failure.
446
-   */
447
-  bool open(SdBaseFile& dirFile, const char* path) {
448
-    return open(dirFile, path, O_RDWR);
449
-  }
450
-
451
-  /**
452
-   * \deprecated Use:
453
-   * bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
454
-   * \param[in] dirFile An open SdFat instance for the directory.
455
-   * \param[in] index The \a index of the directory entry for the file to be
456
-   * opened.  The value for \a index is (directory file position)/32.
457
-   * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
458
-   * OR of flags O_READ, O_WRITE, O_TRUNC, and O_SYNC.
459
-   * \return true for success or false for failure.
460
-   */
461
-  bool open(SdBaseFile& dirFile, uint16_t index, uint8_t oflag) {
462
-    return open(&dirFile, index, oflag);
463
-  }
464
-
465
-  /**
466
-   * \deprecated Use: bool openRoot(SdVolume* vol);
467
-   * \param[in] vol The FAT volume containing the root directory to be opened.
468
-   * \return true for success or false for failure.
469
-   */
470
-  bool openRoot(SdVolume& vol) { return openRoot(&vol); }
471
-
472
-  /**
473
-   * \deprecated Use: int8_t readDir(dir_t* dir);
474
-   * \param[out] dir The dir_t struct that will receive the data.
475
-   * \return bytes read for success zero for eof or -1 for failure.
476
-   */
477
-  int8_t readDir(dir_t& dir, char* longFilename) {
478
-    return readDir(&dir, longFilename);
479
-  }
480
-
481
-  /**
482
-   * \deprecated Use:
483
-   * static uint8_t remove(SdBaseFile* dirFile, const char* path);
484
-   * \param[in] dirFile The directory that contains the file.
485
-   * \param[in] path The name of the file to be removed.
486
-   * \return true for success or false for failure.
487
-   */
488
-  static bool remove(SdBaseFile& dirFile, const char* path) { return remove(&dirFile, path); }
489
-
490
- private:
491
-  static void (*oldDateTime_)(uint16_t &date, uint16_t &time);
492
-  static void oldToNew(uint16_t * const date, uint16_t * const time) {
493
-    uint16_t d, t;
494
-    oldDateTime_(d, t);
495
-    *date = d;
496
-    *time = t;
497
-  }
498
-#endif  // ALLOW_DEPRECATED_FUNCTIONS
499
-};
500
-
501
-#endif // _SDBASEFILE_H_

+ 0
- 121
Marlin/SdFatConfig.h View File

@@ -1,121 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * SdFatConfig.h
25
- * Arduino SdFat Library
26
- * Copyright (C) 2009 by William Greiman
27
- *
28
- * This file is part of the Arduino Sd2Card Library
29
- */
30
-
31
-#ifndef _SDFATCONFIG_H_
32
-#define _SDFATCONFIG_H_
33
-
34
-#include "MarlinConfig.h"
35
-
36
-/**
37
- * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
38
- *
39
- * Using multiple cards costs 400 - 500  bytes of flash.
40
- *
41
- * Each card requires about 550 bytes of SRAM so use of a Mega is recommended.
42
- */
43
-#define USE_MULTIPLE_CARDS 0
44
-
45
-/**
46
- * Call flush for endl if ENDL_CALLS_FLUSH is nonzero
47
- *
48
- * The standard for iostreams is to call flush.  This is very costly for
49
- * SdFat.  Each call to flush causes 2048 bytes of I/O to the SD.
50
- *
51
- * SdFat has a single 512 byte buffer for SD I/O so it must write the current
52
- * data block to the SD, read the directory block from the SD, update the
53
- * directory entry, write the directory block to the SD and read the data
54
- * block back into the buffer.
55
- *
56
- * The SD flash memory controller is not designed for this many rewrites
57
- * so performance may be reduced by more than a factor of 100.
58
- *
59
- * If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force
60
- * all data to be written to the SD.
61
- */
62
-#define ENDL_CALLS_FLUSH 0
63
-
64
-/**
65
- * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero
66
- */
67
-#define ALLOW_DEPRECATED_FUNCTIONS 1
68
-
69
-/**
70
- * Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
71
- * FAT12 has not been well tested.
72
- */
73
-#define FAT12_SUPPORT 0
74
-
75
-/**
76
- * SPI init rate for SD initialization commands. Must be 5 (F_CPU/64)
77
- * or 6 (F_CPU/128).
78
- */
79
-#define SPI_SD_INIT_RATE 5
80
-
81
-/**
82
- * Set the SS pin high for hardware SPI.  If SS is chip select for another SPI
83
- * device this will disable that device during the SD init phase.
84
- */
85
-#define SET_SPI_SS_HIGH 1
86
-
87
-/**
88
- * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos.
89
- * Pins used are SS 10, MOSI 11, MISO 12, and SCK 13.
90
- *
91
- * MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used
92
- * on Mega Arduinos.  Software SPI works well with GPS Shield V1.1
93
- * but many SD cards will fail with GPS Shield V1.0.
94
- */
95
-#define MEGA_SOFT_SPI 0
96
-
97
-// Set USE_SOFTWARE_SPI nonzero to ALWAYS use Software SPI.
98
-#define USE_SOFTWARE_SPI 0
99
-
100
-// Define software SPI pins so Mega can use unmodified 168/328 shields
101
-#define SOFT_SPI_CS_PIN   10 // Software SPI chip select pin for the SD
102
-#define SOFT_SPI_MOSI_PIN 11 // Software SPI Master Out Slave In pin
103
-#define SOFT_SPI_MISO_PIN 12 // Software SPI Master In Slave Out pin
104
-#define SOFT_SPI_SCK_PIN  13 // Software SPI Clock pin
105
-
106
-/**
107
- * The __cxa_pure_virtual function is an error handler that is invoked when
108
- * a pure virtual function is called.
109
- */
110
-#define USE_CXA_PURE_VIRTUAL 1
111
-
112
-/**
113
- * Defines for 8.3 and long (vfat) filenames
114
- */
115
-
116
-#define FILENAME_LENGTH 13 // Number of UTF-16 characters per entry
117
-
118
-// Total bytes needed to store a single long filename
119
-#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * MAX_VFAT_ENTRIES + 1)
120
-
121
-#endif // _SDFATCONFIG_H_

+ 0
- 615
Marlin/SdFatStructs.h View File

@@ -1,615 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * \file
25
- * \brief FAT file structures
26
- */
27
-
28
-/**
29
- * Arduino SdFat Library
30
- * Copyright (C) 2009 by William Greiman
31
- *
32
- * This file is part of the Arduino Sd2Card Library
33
- */
34
-#ifndef SDFATSTRUCTS_H
35
-#define SDFATSTRUCTS_H
36
-
37
-#define PACKED __attribute__((__packed__))
38
-
39
-/**
40
- * mostly from Microsoft document fatgen103.doc
41
- * http://www.microsoft.com/whdc/system/platform/firmware/fatgen.mspx
42
- */
43
-
44
-uint8_t const BOOTSIG0 = 0x55,          // Value for byte 510 of boot block or MBR
45
-              BOOTSIG1 = 0xAA,          // Value for byte 511 of boot block or MBR
46
-              EXTENDED_BOOT_SIG = 0x29; // Value for bootSignature field int FAT/FAT32 boot sector
47
-
48
-/**
49
- * \struct partitionTable
50
- * \brief MBR partition table entry
51
- *
52
- * A partition table entry for a MBR formatted storage device.
53
- * The MBR partition table has four entries.
54
- */
55
-struct partitionTable {
56
-  /**
57
-   * Boot Indicator . Indicates whether the volume is the active
58
-   * partition.  Legal values include: 0x00. Do not use for booting.
59
-   * 0x80 Active partition.
60
-   */
61
-  uint8_t  boot;
62
-  /**
63
-   * Head part of Cylinder-head-sector address of the first block in
64
-   * the partition. Legal values are 0-255. Only used in old PC BIOS.
65
-   */
66
-  uint8_t  beginHead;
67
-  /**
68
-   * Sector part of Cylinder-head-sector address of the first block in
69
-   * the partition. Legal values are 1-63. Only used in old PC BIOS.
70
-   */
71
-  unsigned beginSector : 6;
72
-  /** High bits cylinder for first block in partition. */
73
-  unsigned beginCylinderHigh : 2;
74
-  /**
75
-   * Combine beginCylinderLow with beginCylinderHigh. Legal values
76
-   * are 0-1023.  Only used in old PC BIOS.
77
-   */
78
-  uint8_t  beginCylinderLow;
79
-  /**
80
-   * Partition type. See defines that begin with PART_TYPE_ for
81
-   * some Microsoft partition types.
82
-   */
83
-  uint8_t  type;
84
-  /**
85
-   * head part of cylinder-head-sector address of the last sector in the
86
-   * partition.  Legal values are 0-255. Only used in old PC BIOS.
87
-   */
88
-  uint8_t  endHead;
89
-  /**
90
-   * Sector part of cylinder-head-sector address of the last sector in
91
-   * the partition.  Legal values are 1-63. Only used in old PC BIOS.
92
-   */
93
-  unsigned endSector : 6;
94
-  /** High bits of end cylinder */
95
-  unsigned endCylinderHigh : 2;
96
-  /**
97
-   * Combine endCylinderLow with endCylinderHigh. Legal values
98
-   * are 0-1023.  Only used in old PC BIOS.
99
-   */
100
-  uint8_t  endCylinderLow;
101
-
102
-  uint32_t firstSector;   // Logical block address of the first block in the partition.
103
-  uint32_t totalSectors;  // Length of the partition, in blocks.
104
-} PACKED;
105
-
106
-typedef struct partitionTable part_t; // Type name for partitionTable
107
-
108
-/**
109
- * \struct masterBootRecord
110
- *
111
- * \brief Master Boot Record
112
- *
113
- * The first block of a storage device that is formatted with a MBR.
114
- */
115
-struct masterBootRecord {
116
-  uint8_t  codeArea[440]; // Code Area for master boot program.
117
-  uint32_t diskSignature; // Optional Windows NT disk signature. May contain boot code.
118
-  uint16_t usuallyZero;   // Usually zero but may be more boot code.
119
-  part_t   part[4];       // Partition tables.
120
-  uint8_t  mbrSig0;       // First MBR signature byte. Must be 0x55
121
-  uint8_t  mbrSig1;       // Second MBR signature byte. Must be 0xAA
122
-} PACKED;
123
-/** Type name for masterBootRecord */
124
-typedef struct masterBootRecord mbr_t;
125
-
126
-/**
127
- * \struct fat_boot
128
- *
129
- * \brief Boot sector for a FAT12/FAT16 volume.
130
- *
131
- */
132
-struct fat_boot {
133
-  /**
134
-   * The first three bytes of the boot sector must be valid,
135
-   * executable x 86-based CPU instructions. This includes a
136
-   * jump instruction that skips the next nonexecutable bytes.
137
-   */
138
-  uint8_t jump[3];
139
-  /**
140
-   * This is typically a string of characters that identifies
141
-   * the operating system that formatted the volume.
142
-   */
143
-  char    oemId[8];
144
-  /**
145
-   * The size of a hardware sector. Valid decimal values for this
146
-   * field are 512, 1024, 2048, and 4096. For most disks used in
147
-   * the United States, the value of this field is 512.
148
-   */
149
-  uint16_t bytesPerSector;
150
-  /**
151
-   * Number of sectors per allocation unit. This value must be a
152
-   * power of 2 that is greater than 0. The legal values are
153
-   * 1, 2, 4, 8, 16, 32, 64, and 128.  128 should be avoided.
154
-   */
155
-  uint8_t  sectorsPerCluster;
156
-  /**
157
-   * The number of sectors preceding the start of the first FAT,
158
-   * including the boot sector. The value of this field is always 1.
159
-   */
160
-  uint16_t reservedSectorCount;
161
-  /**
162
-   * The number of copies of the FAT on the volume.
163
-   * The value of this field is always 2.
164
-   */
165
-  uint8_t  fatCount;
166
-  /**
167
-   * For FAT12 and FAT16 volumes, this field contains the count of
168
-   * 32-byte directory entries in the root directory. For FAT32 volumes,
169
-   * this field must be set to 0. For FAT12 and FAT16 volumes, this
170
-   * value should always specify a count that when multiplied by 32
171
-   * results in a multiple of bytesPerSector.  FAT16 volumes should
172
-   * use the value 512.
173
-   */
174
-  uint16_t rootDirEntryCount;
175
-  /**
176
-   * This field is the old 16-bit total count of sectors on the volume.
177
-   * This count includes the count of all sectors in all four regions
178
-   * of the volume. This field can be 0; if it is 0, then totalSectors32
179
-   * must be nonzero.  For FAT32 volumes, this field must be 0. For
180
-   * FAT12 and FAT16 volumes, this field contains the sector count, and
181
-   * totalSectors32 is 0 if the total sector count fits
182
-   * (is less than 0x10000).
183
-   */
184
-  uint16_t totalSectors16;
185
-  /**
186
-   * This dates back to the old MS-DOS 1.x media determination and is
187
-   * no longer usually used for anything.  0xF8 is the standard value
188
-   * for fixed (nonremovable) media. For removable media, 0xF0 is
189
-   * frequently used. Legal values are 0xF0 or 0xF8-0xFF.
190
-   */
191
-  uint8_t  mediaType;
192
-  /**
193
-   * Count of sectors occupied by one FAT on FAT12/FAT16 volumes.
194
-   * On FAT32 volumes this field must be 0, and sectorsPerFat32
195
-   * contains the FAT size count.
196
-   */
197
-  uint16_t sectorsPerFat16;
198
-
199
-  uint16_t sectorsPerTrack; // Sectors per track for interrupt 0x13. Not used otherwise.
200
-  uint16_t headCount;       // Number of heads for interrupt 0x13. Not used otherwise.
201
-
202
-  /**
203
-   * Count of hidden sectors preceding the partition that contains this
204
-   * FAT volume. This field is generally only relevant for media
205
-   * visible on interrupt 0x13.
206
-   */
207
-  uint32_t hidddenSectors;
208
-  /**
209
-   * This field is the new 32-bit total count of sectors on the volume.
210
-   * This count includes the count of all sectors in all four regions
211
-   * of the volume.  This field can be 0; if it is 0, then
212
-   * totalSectors16 must be nonzero.
213
-   */
214
-  uint32_t totalSectors32;
215
-  /**
216
-   * Related to the BIOS physical drive number. Floppy drives are
217
-   * identified as 0x00 and physical hard disks are identified as
218
-   * 0x80, regardless of the number of physical disk drives.
219
-   * Typically, this value is set prior to issuing an INT 13h BIOS
220
-   * call to specify the device to access. The value is only
221
-   * relevant if the device is a boot device.
222
-   */
223
-  uint8_t  driveNumber;
224
-
225
-  uint8_t  reserved1;       // used by Windows NT - should be zero for FAT
226
-  uint8_t  bootSignature;   // 0x29 if next three fields are valid
227
-
228
-  /**
229
-   * A random serial number created when formatting a disk,
230
-   * which helps to distinguish between disks.
231
-   * Usually generated by combining date and time.
232
-   */
233
-  uint32_t volumeSerialNumber;
234
-  /**
235
-   * A field once used to store the volume label. The volume label
236
-   * is now stored as a special file in the root directory.
237
-   */
238
-  char     volumeLabel[11];
239
-  /**
240
-   * A field with a value of either FAT, FAT12 or FAT16,
241
-   * depending on the disk format.
242
-   */
243
-  char     fileSystemType[8];
244
-
245
-  uint8_t  bootCode[448];   // X86 boot code
246
-  uint8_t  bootSectorSig0;  // must be 0x55
247
-  uint8_t  bootSectorSig1;  // must be 0xAA
248
-} PACKED;
249
-
250
-typedef struct fat_boot fat_boot_t;   // Type name for FAT Boot Sector
251
-
252
-/**
253
- * \struct fat32_boot
254
- *
255
- * \brief Boot sector for a FAT32 volume.
256
- */
257
-struct fat32_boot {
258
-  /**
259
-   * The first three bytes of the boot sector must be valid,
260
-   * executable x 86-based CPU instructions. This includes a
261
-   * jump instruction that skips the next nonexecutable bytes.
262
-   */
263
-  uint8_t jump[3];
264
-  /**
265
-   * This is typically a string of characters that identifies
266
-   * the operating system that formatted the volume.
267
-   */
268
-  char    oemId[8];
269
-  /**
270
-   * The size of a hardware sector. Valid decimal values for this
271
-   * field are 512, 1024, 2048, and 4096. For most disks used in
272
-   * the United States, the value of this field is 512.
273
-   */
274
-  uint16_t bytesPerSector;
275
-  /**
276
-   * Number of sectors per allocation unit. This value must be a
277
-   * power of 2 that is greater than 0. The legal values are
278
-   * 1, 2, 4, 8, 16, 32, 64, and 128.  128 should be avoided.
279
-   */
280
-  uint8_t  sectorsPerCluster;
281
-  /**
282
-   * The number of sectors preceding the start of the first FAT,
283
-   * including the boot sector. Must not be zero
284
-   */
285
-  uint16_t reservedSectorCount;
286
-  /**
287
-   * The number of copies of the FAT on the volume.
288
-   * The value of this field is always 2.
289
-   */
290
-  uint8_t  fatCount;
291
-  /**
292
-   * FAT12/FAT16 only. For FAT32 volumes, this field must be set to 0.
293
-   */
294
-  uint16_t rootDirEntryCount;
295
-  /**
296
-   * For FAT32 volumes, this field must be 0.
297
-   */
298
-  uint16_t totalSectors16;
299
-  /**
300
-   * This dates back to the old MS-DOS 1.x media determination and is
301
-   * no longer usually used for anything.  0xF8 is the standard value
302
-   * for fixed (nonremovable) media. For removable media, 0xF0 is
303
-   * frequently used. Legal values are 0xF0 or 0xF8-0xFF.
304
-   */
305
-  uint8_t  mediaType;
306
-  /**
307
-   * On FAT32 volumes this field must be 0, and sectorsPerFat32
308
-   * contains the FAT size count.
309
-   */
310
-  uint16_t sectorsPerFat16;
311
-
312
-  uint16_t sectorsPerTrack; // Sectors per track for interrupt 0x13. Not used otherwise.
313
-  uint16_t headCount;       // Number of heads for interrupt 0x13. Not used otherwise.
314
-
315
-  /**
316
-   * Count of hidden sectors preceding the partition that contains this
317
-   * FAT volume. This field is generally only relevant for media
318
-   * visible on interrupt 0x13.
319
-   */
320
-  uint32_t hidddenSectors;
321
-  /**
322
-   * Contains the total number of sectors in the FAT32 volume.
323
-   */
324
-  uint32_t totalSectors32;
325
-  /**
326
-   * Count of sectors occupied by one FAT on FAT32 volumes.
327
-   */
328
-  uint32_t sectorsPerFat32;
329
-  /**
330
-   * This field is only defined for FAT32 media and does not exist on
331
-   * FAT12 and FAT16 media.
332
-   * Bits 0-3 -- Zero-based number of active FAT.
333
-   *             Only valid if mirroring is disabled.
334
-   * Bits 4-6 -- Reserved.
335
-   * Bit 7  -- 0 means the FAT is mirrored at runtime into all FATs.
336
-   *        -- 1 means only one FAT is active; it is the one referenced
337
-   *             in bits 0-3.
338
-   * Bits 8-15  -- Reserved.
339
-   */
340
-  uint16_t fat32Flags;
341
-  /**
342
-   * FAT32 version. High byte is major revision number.
343
-   * Low byte is minor revision number. Only 0.0 define.
344
-   */
345
-  uint16_t fat32Version;
346
-  /**
347
-   * Cluster number of the first cluster of the root directory for FAT32.
348
-   * This usually 2 but not required to be 2.
349
-   */
350
-  uint32_t fat32RootCluster;
351
-  /**
352
-   * Sector number of FSINFO structure in the reserved area of the
353
-   * FAT32 volume. Usually 1.
354
-   */
355
-  uint16_t fat32FSInfo;
356
-  /**
357
-   * If nonzero, indicates the sector number in the reserved area
358
-   * of the volume of a copy of the boot record. Usually 6.
359
-   * No value other than 6 is recommended.
360
-   */
361
-  uint16_t fat32BackBootBlock;
362
-  /**
363
-   * Reserved for future expansion. Code that formats FAT32 volumes
364
-   * should always set all of the bytes of this field to 0.
365
-   */
366
-  uint8_t  fat32Reserved[12];
367
-  /**
368
-   * Related to the BIOS physical drive number. Floppy drives are
369
-   * identified as 0x00 and physical hard disks are identified as
370
-   * 0x80, regardless of the number of physical disk drives.
371
-   * Typically, this value is set prior to issuing an INT 13h BIOS
372
-   * call to specify the device to access. The value is only
373
-   * relevant if the device is a boot device.
374
-   */
375
-  uint8_t  driveNumber;
376
-
377
-  uint8_t  reserved1;       // Used by Windows NT - should be zero for FAT
378
-  uint8_t  bootSignature;   // 0x29 if next three fields are valid
379
-
380
-  /**
381
-   * A random serial number created when formatting a disk,
382
-   * which helps to distinguish between disks.
383
-   * Usually generated by combining date and time.
384
-   */
385
-  uint32_t volumeSerialNumber;
386
-  /**
387
-   * A field once used to store the volume label. The volume label
388
-   * is now stored as a special file in the root directory.
389
-   */
390
-  char     volumeLabel[11];
391
-  /**
392
-   * A text field with a value of FAT32.
393
-   */
394
-  char     fileSystemType[8];
395
-
396
-  uint8_t  bootCode[420];   // X86 boot code
397
-  uint8_t  bootSectorSig0;  // must be 0x55
398
-  uint8_t  bootSectorSig1;  // must be 0xAA
399
-
400
-} PACKED;
401
-
402
-typedef struct fat32_boot fat32_boot_t; // Type name for FAT32 Boot Sector
403
-
404
-uint32_t const FSINFO_LEAD_SIG   = 0x41615252,  // 'AaRR' Lead signature for a FSINFO sector
405
-               FSINFO_STRUCT_SIG = 0x61417272;  // 'aArr' Struct signature for a FSINFO sector
406
-
407
-/**
408
- * \struct fat32_fsinfo
409
- *
410
- * \brief FSINFO sector for a FAT32 volume.
411
- *
412
- */
413
-struct fat32_fsinfo {
414
-  uint32_t  leadSignature;    // must be 0x52, 0x52, 0x61, 0x41 'RRaA'
415
-  uint8_t  reserved1[480];    // must be zero
416
-  uint32_t  structSignature;  // must be 0x72, 0x72, 0x41, 0x61 'rrAa'
417
-          /**
418
-           * Contains the last known free cluster count on the volume.
419
-           * If the value is 0xFFFFFFFF, then the free count is unknown
420
-           * and must be computed. Any other value can be used, but is
421
-           * not necessarily correct. It should be range checked at least
422
-           * to make sure it is <= volume cluster count.
423
-           */
424
-  uint32_t freeCount;
425
-          /**
426
-           * This is a hint for the FAT driver. It indicates the cluster
427
-           * number at which the driver should start looking for free clusters.
428
-           * If the value is 0xFFFFFFFF, then there is no hint and the driver
429
-           * should start looking at cluster 2.
430
-           */
431
-  uint32_t nextFree;
432
-
433
-  uint8_t  reserved2[12];     // must be zero
434
-  uint8_t  tailSignature[4];  // must be 0x00, 0x00, 0x55, 0xAA
435
-} PACKED;
436
-
437
-typedef struct fat32_fsinfo fat32_fsinfo_t; // Type name for FAT32 FSINFO Sector
438
-
439
-// End Of Chain values for FAT entries
440
-uint16_t const FAT12EOC = 0xFFF,          // FAT12 end of chain value used by Microsoft.
441
-               FAT12EOC_MIN = 0xFF8,      // Minimum value for FAT12 EOC.  Use to test for EOC.
442
-               FAT16EOC = 0xFFFF,         // FAT16 end of chain value used by Microsoft.
443
-               FAT16EOC_MIN = 0xFFF8;     // Minimum value for FAT16 EOC.  Use to test for EOC.
444
-uint32_t const FAT32EOC = 0x0FFFFFFF,     // FAT32 end of chain value used by Microsoft.
445
-               FAT32EOC_MIN = 0x0FFFFFF8, // Minimum value for FAT32 EOC.  Use to test for EOC.
446
-               FAT32MASK = 0x0FFFFFFF;    // Mask a for FAT32 entry. Entries are 28 bits.
447
-
448
-/**
449
- * \struct directoryEntry
450
- * \brief FAT short directory entry
451
- *
452
- * Short means short 8.3 name, not the entry size.
453
- *
454
- * Date Format. A FAT directory entry date stamp is a 16-bit field that is
455
- * basically a date relative to the MS-DOS epoch of 01/01/1980. Here is the
456
- * format (bit 0 is the LSB of the 16-bit word, bit 15 is the MSB of the
457
- * 16-bit word):
458
- *
459
- * Bits 9-15: Count of years from 1980, valid value range 0-127
460
- * inclusive (1980-2107).
461
- *
462
- * Bits 5-8: Month of year, 1 = January, valid value range 1-12 inclusive.
463
- *
464
- * Bits 0-4: Day of month, valid value range 1-31 inclusive.
465
- *
466
- * Time Format. A FAT directory entry time stamp is a 16-bit field that has
467
- * a granularity of 2 seconds. Here is the format (bit 0 is the LSB of the
468
- * 16-bit word, bit 15 is the MSB of the 16-bit word).
469
- *
470
- * Bits 11-15: Hours, valid value range 0-23 inclusive.
471
- *
472
- * Bits 5-10: Minutes, valid value range 0-59 inclusive.
473
- *
474
- * Bits 0-4: 2-second count, valid value range 0-29 inclusive (0 - 58 seconds).
475
- *
476
- * The valid time range is from Midnight 00:00:00 to 23:59:58.
477
- */
478
-struct directoryEntry {
479
-  /**
480
-   * Short 8.3 name.
481
-   *
482
-   * The first eight bytes contain the file name with blank fill.
483
-   * The last three bytes contain the file extension with blank fill.
484
-   */
485
-  uint8_t  name[11];
486
-  /**
487
-   * Entry attributes.
488
-   *
489
-   * The upper two bits of the attribute byte are reserved and should
490
-   * always be set to 0 when a file is created and never modified or
491
-   * looked at after that.  See defines that begin with DIR_ATT_.
492
-   */
493
-  uint8_t  attributes;
494
-  /**
495
-   * Reserved for use by Windows NT. Set value to 0 when a file is
496
-   * created and never modify or look at it after that.
497
-   */
498
-  uint8_t  reservedNT;
499
-  /**
500
-   * The granularity of the seconds part of creationTime is 2 seconds
501
-   * so this field is a count of tenths of a second and it's valid
502
-   * value range is 0-199 inclusive. (WHG note - seems to be hundredths)
503
-   */
504
-  uint8_t  creationTimeTenths;
505
-
506
-  uint16_t creationTime;    // Time file was created.
507
-  uint16_t creationDate;    // Date file was created.
508
-
509
-  /**
510
-   * Last access date. Note that there is no last access time, only
511
-   * a date.  This is the date of last read or write. In the case of
512
-   * a write, this should be set to the same date as lastWriteDate.
513
-   */
514
-  uint16_t lastAccessDate;
515
-  /**
516
-   * High word of this entry's first cluster number (always 0 for a
517
-   * FAT12 or FAT16 volume).
518
-   */
519
-  uint16_t firstClusterHigh;
520
-
521
-  uint16_t lastWriteTime;   // Time of last write. File creation is considered a write.
522
-  uint16_t lastWriteDate;   // Date of last write. File creation is considered a write.
523
-  uint16_t firstClusterLow; // Low word of this entry's first cluster number.
524
-  uint32_t fileSize;        // 32-bit unsigned holding this file's size in bytes.
525
-} PACKED;
526
-
527
-/**
528
- * \struct directoryVFATEntry
529
- * \brief VFAT long filename directory entry
530
- *
531
- * directoryVFATEntries are found in the same list as normal directoryEntry.
532
- * But have the attribute field set to DIR_ATT_LONG_NAME.
533
- *
534
- * Long filenames are saved in multiple directoryVFATEntries.
535
- * Each entry containing 13 UTF-16 characters.
536
- */
537
-struct directoryVFATEntry {
538
-  /**
539
-   * Sequence number. Consists of 2 parts:
540
-   *  bit 6:   indicates first long filename block for the next file
541
-   *  bit 0-4: the position of this long filename block (first block is 1)
542
-   */
543
-  uint8_t  sequenceNumber;
544
-
545
-  uint16_t name1[5];        // First set of UTF-16 characters
546
-  uint8_t  attributes;      // attributes (at the same location as in directoryEntry), always 0x0F
547
-  uint8_t  reservedNT;      // Reserved for use by Windows NT. Always 0.
548
-  uint8_t  checksum;        // Checksum of the short 8.3 filename, can be used to checked if the file system as modified by a not-long-filename aware implementation.
549
-  uint16_t name2[6];        // Second set of UTF-16 characters
550
-  uint16_t firstClusterLow; // firstClusterLow is always zero for longFilenames
551
-  uint16_t name3[2];        // Third set of UTF-16 characters
552
-} PACKED;
553
-
554
-// Definitions for directory entries
555
-//
556
-typedef struct directoryEntry dir_t;          // Type name for directoryEntry
557
-typedef struct directoryVFATEntry vfat_t;     // Type name for directoryVFATEntry
558
-
559
-uint8_t const DIR_NAME_0xE5     = 0x05,       // escape for name[0] = 0xE5
560
-              DIR_NAME_DELETED  = 0xE5,       // name[0] value for entry that is free after being "deleted"
561
-              DIR_NAME_FREE     = 0x00,       // name[0] value for entry that is free and no allocated entries follow
562
-              DIR_ATT_READ_ONLY = 0x01,       // file is read-only
563
-              DIR_ATT_HIDDEN    = 0x02,       // File should hidden in directory listings
564
-              DIR_ATT_SYSTEM    = 0x04,       // Entry is for a system file
565
-              DIR_ATT_VOLUME_ID = 0x08,       // Directory entry contains the volume label
566
-              DIR_ATT_DIRECTORY = 0x10,       // Entry is for a directory
567
-              DIR_ATT_ARCHIVE   = 0x20,       // Old DOS archive bit for backup support
568
-              DIR_ATT_LONG_NAME = 0x0F,       // Test value for long name entry.  Test is (d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME.
569
-              DIR_ATT_LONG_NAME_MASK = 0x3F,  // Test mask for long name entry
570
-              DIR_ATT_DEFINED_BITS = 0x3F;    // defined attribute bits
571
-
572
-/**
573
- * Directory entry is part of a long name
574
- * \param[in] dir Pointer to a directory entry.
575
- *
576
- * \return true if the entry is for part of a long name else false.
577
- */
578
-static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) {
579
-  return (dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME;
580
-}
581
-
582
-/** Mask for file/subdirectory tests */
583
-uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY);
584
-
585
-/**
586
- * Directory entry is for a file
587
- * \param[in] dir Pointer to a directory entry.
588
- *
589
- * \return true if the entry is for a normal file else false.
590
- */
591
-static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
592
-  return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0;
593
-}
594
-
595
-/**
596
- * Directory entry is for a subdirectory
597
- * \param[in] dir Pointer to a directory entry.
598
- *
599
- * \return true if the entry is for a subdirectory else false.
600
- */
601
-static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
602
-  return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY;
603
-}
604
-
605
-/**
606
- * Directory entry is for a file or subdirectory
607
- * \param[in] dir Pointer to a directory entry.
608
- *
609
- * \return true if the entry is for a normal file or subdirectory else false.
610
- */
611
-static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
612
-  return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
613
-}
614
-
615
-#endif // SDFATSTRUCTS_H

+ 0
- 91
Marlin/SdFatUtil.cpp View File

@@ -1,91 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Arduino SdFat Library
25
- * Copyright (C) 2008 by William Greiman
26
- *
27
- * This file is part of the Arduino Sd2Card Library
28
- */
29
-#include "MarlinConfig.h"
30
-
31
-#if ENABLED(SDSUPPORT)
32
-
33
-#include "SdFatUtil.h"
34
-#include "serial.h"
35
-
36
-/**
37
- * Amount of free RAM
38
- * \return The number of free bytes.
39
- */
40
-#ifdef __arm__
41
-extern "C" char* sbrk(int incr);
42
-int SdFatUtil::FreeRam() {
43
-  char top;
44
-  return &top - reinterpret_cast<char*>(sbrk(0));
45
-}
46
-#else  // __arm__
47
-extern char* __brkval;
48
-extern char __bss_end;
49
-/**
50
- * Amount of free RAM
51
- * \return The number of free bytes.
52
- */
53
-int SdFatUtil::FreeRam() {
54
-  char top;
55
-  return __brkval ? &top - __brkval : &top - &__bss_end;
56
-}
57
-#endif  // __arm
58
-
59
-/**
60
- * %Print a string in flash memory.
61
- *
62
- * \param[in] pr Print object for output.
63
- * \param[in] str Pointer to string stored in flash memory.
64
- */
65
-void SdFatUtil::print_P(PGM_P str) {
66
-  for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c);
67
-}
68
-
69
-/**
70
- * %Print a string in flash memory followed by a CR/LF.
71
- *
72
- * \param[in] pr Print object for output.
73
- * \param[in] str Pointer to string stored in flash memory.
74
- */
75
-void SdFatUtil::println_P(PGM_P str) { print_P(str); MYSERIAL.println(); }
76
-
77
-/**
78
- * %Print a string in flash memory to Serial.
79
- *
80
- * \param[in] str Pointer to string stored in flash memory.
81
- */
82
-void SdFatUtil::SerialPrint_P(PGM_P str) { print_P(str); }
83
-
84
-/**
85
- * %Print a string in flash memory to Serial followed by a CR/LF.
86
- *
87
- * \param[in] str Pointer to string stored in flash memory.
88
- */
89
-void SdFatUtil::SerialPrintln_P(PGM_P str) { println_P(str); }
90
-
91
-#endif // SDSUPPORT

+ 0
- 51
Marlin/SdFatUtil.h View File

@@ -1,51 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Arduino SdFat Library
25
- * Copyright (C) 2008 by William Greiman
26
- *
27
- * This file is part of the Arduino Sd2Card Library
28
- */
29
-#ifndef _SDFATUTIL_H_
30
-#define _SDFATUTIL_H_
31
-
32
-/**
33
- * \file
34
- * \brief Useful utility functions.
35
- */
36
-/** Store and print a string in flash memory.*/
37
-#define PgmPrint(x) SerialPrint_P(PSTR(x))
38
-/** Store and print a string in flash memory followed by a CR/LF.*/
39
-#define PgmPrintln(x) SerialPrintln_P(PSTR(x))
40
-
41
-namespace SdFatUtil {
42
-  int FreeRam();
43
-  void print_P(PGM_P str);
44
-  void println_P(PGM_P str);
45
-  void SerialPrint_P(PGM_P str);
46
-  void SerialPrintln_P(PGM_P str);
47
-}
48
-
49
-using namespace SdFatUtil;  // NOLINT
50
-
51
-#endif // _SDFATUTIL_H_

+ 0
- 100
Marlin/SdFile.cpp View File

@@ -1,100 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Arduino SdFat Library
25
- * Copyright (C) 2009 by William Greiman
26
- *
27
- * This file is part of the Arduino Sd2Card Library
28
- */
29
-#include "MarlinConfig.h"
30
-
31
-#if ENABLED(SDSUPPORT)
32
-
33
-#include "SdFile.h"
34
-
35
-/**
36
- *  Create a file object and open it in the current working directory.
37
- *
38
- * \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
39
- *
40
- * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
41
- * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
42
- */
43
-SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { }
44
-
45
-/**
46
- * Write data to an open file.
47
- *
48
- * \note Data is moved to the cache but may not be written to the
49
- * storage device until sync() is called.
50
- *
51
- * \param[in] buf Pointer to the location of the data to be written.
52
- *
53
- * \param[in] nbyte Number of bytes to write.
54
- *
55
- * \return For success write() returns the number of bytes written, always
56
- * \a nbyte.  If an error occurs, write() returns -1.  Possible errors
57
- * include write() is called before a file has been opened, write is called
58
- * for a read-only file, device is full, a corrupt file system or an I/O error.
59
- *
60
- */
61
-int16_t SdFile::write(const void* buf, uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); }
62
-
63
-/**
64
- * Write a byte to a file. Required by the Arduino Print class.
65
- * \param[in] b the byte to be written.
66
- * Use writeError to check for errors.
67
- */
68
-#if ARDUINO >= 100
69
-  size_t SdFile::write(uint8_t b) { return SdBaseFile::write(&b, 1); }
70
-#else
71
-  void SdFile::write(uint8_t b) { SdBaseFile::write(&b, 1); }
72
-#endif
73
-
74
-/**
75
- * Write a string to a file. Used by the Arduino Print class.
76
- * \param[in] str Pointer to the string.
77
- * Use writeError to check for errors.
78
- */
79
-void SdFile::write(const char* str) { SdBaseFile::write(str, strlen(str)); }
80
-
81
-/**
82
- * Write a PROGMEM string to a file.
83
- * \param[in] str Pointer to the PROGMEM string.
84
- * Use writeError to check for errors.
85
- */
86
-void SdFile::write_P(PGM_P str) {
87
-  for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c);
88
-}
89
-
90
-/**
91
- * Write a PROGMEM string followed by CR/LF to a file.
92
- * \param[in] str Pointer to the PROGMEM string.
93
- * Use writeError to check for errors.
94
- */
95
-void SdFile::writeln_P(PGM_P str) {
96
-  write_P(str);
97
-  write_P(PSTR("\r\n"));
98
-}
99
-
100
-#endif // SDSUPPORT

+ 0
- 60
Marlin/SdFile.h View File

@@ -1,60 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * \file
25
- * \brief SdFile class
26
- */
27
-
28
-/**
29
- * Arduino SdFat Library
30
- * Copyright (C) 2009 by William Greiman
31
- *
32
- * This file is part of the Arduino Sd2Card Library
33
- */
34
-#ifndef _SDFILE_H_
35
-#define _SDFILE_H_
36
-
37
-#include "SdBaseFile.h"
38
-#include <Print.h>
39
-
40
-/**
41
- * \class SdFile
42
- * \brief SdBaseFile with Print.
43
- */
44
-class SdFile : public SdBaseFile, public Print {
45
- public:
46
-  SdFile() {}
47
-  SdFile(const char* name, uint8_t oflag);
48
-  #if ARDUINO >= 100
49
-    size_t write(uint8_t b);
50
-  #else
51
-   void write(uint8_t b);
52
-  #endif
53
-
54
-  int16_t write(const void* buf, uint16_t nbyte);
55
-  void write(const char* str);
56
-  void write_P(PGM_P str);
57
-  void writeln_P(PGM_P str);
58
-};
59
-
60
-#endif // _SDFILE_H_

+ 0
- 267
Marlin/SdInfo.h View File

@@ -1,267 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Arduino Sd2Card Library
25
- * Copyright (C) 2009 by William Greiman
26
- *
27
- * This file is part of the Arduino Sd2Card Library
28
- */
29
-#ifndef _SDINFO_H_
30
-#define _SDINFO_H_
31
-
32
-#include <stdint.h>
33
-
34
-// Based on the document:
35
-//
36
-// SD Specifications
37
-// Part 1
38
-// Physical Layer
39
-// Simplified Specification
40
-// Version 3.01
41
-// May 18, 2010
42
-//
43
-// http://www.sdcard.org/developers/tech/sdcard/pls/simplified_specs
44
-
45
-// SD card commands
46
-uint8_t const CMD0 = 0x00,    // GO_IDLE_STATE - init card in spi mode if CS low
47
-              CMD8 = 0x08,    // SEND_IF_COND - verify SD Memory Card interface operating condition
48
-              CMD9 = 0x09,    // SEND_CSD - read the Card Specific Data (CSD register)
49
-              CMD10 = 0x0A,   // SEND_CID - read the card identification information (CID register)
50
-              CMD12 = 0x0C,   // STOP_TRANSMISSION - end multiple block read sequence
51
-              CMD13 = 0x0D,   // SEND_STATUS - read the card status register
52
-              CMD17 = 0x11,   // READ_SINGLE_BLOCK - read a single data block from the card
53
-              CMD18 = 0x12,   // READ_MULTIPLE_BLOCK - read a multiple data blocks from the card
54
-              CMD24 = 0x18,   // WRITE_BLOCK - write a single data block to the card
55
-              CMD25 = 0x19,   // WRITE_MULTIPLE_BLOCK - write blocks of data until a STOP_TRANSMISSION
56
-              CMD32 = 0x20,   // ERASE_WR_BLK_START - sets the address of the first block to be erased
57
-              CMD33 = 0x21,   // ERASE_WR_BLK_END - sets the address of the last block of the continuous range to be erased*/
58
-              CMD38 = 0x26,   // ERASE - erase all previously selected blocks */
59
-              CMD55 = 0x37,   // APP_CMD - escape for application specific command */
60
-              CMD58 = 0x3A,   // READ_OCR - read the OCR register of a card */
61
-              ACMD23 = 0x17,  // SET_WR_BLK_ERASE_COUNT - Set the number of write blocks to be pre-erased before writing */
62
-              ACMD41 = 0x29;  // SD_SEND_OP_COMD - Sends host capacity support information and activates the card's initialization process */
63
-
64
-/** status for card in the ready state */
65
-uint8_t const R1_READY_STATE = 0x00;
66
-/** status for card in the idle state */
67
-uint8_t const R1_IDLE_STATE = 0x01;
68
-/** status bit for illegal command */
69
-uint8_t const R1_ILLEGAL_COMMAND = 0x04;
70
-/** start data token for read or write single block*/
71
-uint8_t const DATA_START_BLOCK = 0xFE;
72
-/** stop token for write multiple blocks*/
73
-uint8_t const STOP_TRAN_TOKEN = 0xFD;
74
-/** start data token for write multiple blocks*/
75
-uint8_t const WRITE_MULTIPLE_TOKEN = 0xFC;
76
-/** mask for data response tokens after a write block operation */
77
-uint8_t const DATA_RES_MASK = 0x1F;
78
-/** write data accepted token */
79
-uint8_t const DATA_RES_ACCEPTED = 0x05;
80
-
81
-/** Card IDentification (CID) register */
82
-typedef struct CID {
83
-  // byte 0
84
-  /** Manufacturer ID */
85
-  unsigned char mid;
86
-  // byte 1-2
87
-  /** OEM/Application ID */
88
-  char oid[2];
89
-  // byte 3-7
90
-  /** Product name */
91
-  char pnm[5];
92
-  // byte 8
93
-  /** Product revision least significant digit */
94
-  unsigned char prv_m : 4;
95
-  /** Product revision most significant digit */
96
-  unsigned char prv_n : 4;
97
-  // byte 9-12
98
-  /** Product serial number */
99
-  uint32_t psn;
100
-  // byte 13
101
-  /** Manufacturing date year low digit */
102
-  unsigned char mdt_year_high : 4;
103
-  /** not used */
104
-  unsigned char reserved : 4;
105
-  // byte 14
106
-  /** Manufacturing date month */
107
-  unsigned char mdt_month : 4;
108
-  /** Manufacturing date year low digit */
109
-  unsigned char mdt_year_low : 4;
110
-  // byte 15
111
-  /** not used always 1 */
112
-  unsigned char always1 : 1;
113
-  /** CRC7 checksum */
114
-  unsigned char crc : 7;
115
-} cid_t;
116
-
117
-/** CSD for version 1.00 cards */
118
-typedef struct CSDV1 {
119
-  // byte 0
120
-  unsigned char reserved1 : 6;
121
-  unsigned char csd_ver : 2;
122
-  // byte 1
123
-  unsigned char taac;
124
-  // byte 2
125
-  unsigned char nsac;
126
-  // byte 3
127
-  unsigned char tran_speed;
128
-  // byte 4
129
-  unsigned char ccc_high;
130
-  // byte 5
131
-  unsigned char read_bl_len : 4;
132
-  unsigned char ccc_low : 4;
133
-  // byte 6
134
-  unsigned char c_size_high : 2;
135
-  unsigned char reserved2 : 2;
136
-  unsigned char dsr_imp : 1;
137
-  unsigned char read_blk_misalign : 1;
138
-  unsigned char write_blk_misalign : 1;
139
-  unsigned char read_bl_partial : 1;
140
-  // byte 7
141
-  unsigned char c_size_mid;
142
-  // byte 8
143
-  unsigned char vdd_r_curr_max : 3;
144
-  unsigned char vdd_r_curr_min : 3;
145
-  unsigned char c_size_low : 2;
146
-  // byte 9
147
-  unsigned char c_size_mult_high : 2;
148
-  unsigned char vdd_w_cur_max : 3;
149
-  unsigned char vdd_w_curr_min : 3;
150
-  // byte 10
151
-  unsigned char sector_size_high : 6;
152
-  unsigned char erase_blk_en : 1;
153
-  unsigned char c_size_mult_low : 1;
154
-  // byte 11
155
-  unsigned char wp_grp_size : 7;
156
-  unsigned char sector_size_low : 1;
157
-  // byte 12
158
-  unsigned char write_bl_len_high : 2;
159
-  unsigned char r2w_factor : 3;
160
-  unsigned char reserved3 : 2;
161
-  unsigned char wp_grp_enable : 1;
162
-  // byte 13
163
-  unsigned char reserved4 : 5;
164
-  unsigned char write_partial : 1;
165
-  unsigned char write_bl_len_low : 2;
166
-  // byte 14
167
-  unsigned char reserved5: 2;
168
-  unsigned char file_format : 2;
169
-  unsigned char tmp_write_protect : 1;
170
-  unsigned char perm_write_protect : 1;
171
-  unsigned char copy : 1;
172
-  /** Indicates the file format on the card */
173
-  unsigned char file_format_grp : 1;
174
-  // byte 15
175
-  unsigned char always1 : 1;
176
-  unsigned char crc : 7;
177
-} csd1_t;
178
-
179
-/** CSD for version 2.00 cards */
180
-typedef struct CSDV2 {
181
-  // byte 0
182
-  unsigned char reserved1 : 6;
183
-  unsigned char csd_ver : 2;
184
-  // byte 1
185
-  /** fixed to 0x0E */
186
-  unsigned char taac;
187
-  // byte 2
188
-  /** fixed to 0 */
189
-  unsigned char nsac;
190
-  // byte 3
191
-  unsigned char tran_speed;
192
-  // byte 4
193
-  unsigned char ccc_high;
194
-  // byte 5
195
-  /** This field is fixed to 9h, which indicates READ_BL_LEN=512 Byte */
196
-  unsigned char read_bl_len : 4;
197
-  unsigned char ccc_low : 4;
198
-  // byte 6
199
-  /** not used */
200
-  unsigned char reserved2 : 4;
201
-  unsigned char dsr_imp : 1;
202
-  /** fixed to 0 */
203
-  unsigned char read_blk_misalign : 1;
204
-  /** fixed to 0 */
205
-  unsigned char write_blk_misalign : 1;
206
-  /** fixed to 0 - no partial read */
207
-  unsigned char read_bl_partial : 1;
208
-  // byte 7
209
-  /** not used */
210
-  unsigned char reserved3 : 2;
211
-  /** high part of card size */
212
-  unsigned char c_size_high : 6;
213
-  // byte 8
214
-  /** middle part of card size */
215
-  unsigned char c_size_mid;
216
-  // byte 9
217
-  /** low part of card size */
218
-  unsigned char c_size_low;
219
-  // byte 10
220
-  /** sector size is fixed at 64 KB */
221
-  unsigned char sector_size_high : 6;
222
-  /** fixed to 1 - erase single is supported */
223
-  unsigned char erase_blk_en : 1;
224
-  /** not used */
225
-  unsigned char reserved4 : 1;
226
-  // byte 11
227
-  unsigned char wp_grp_size : 7;
228
-  /** sector size is fixed at 64 KB */
229
-  unsigned char sector_size_low : 1;
230
-  // byte 12
231
-  /** write_bl_len fixed for 512 byte blocks */
232
-  unsigned char write_bl_len_high : 2;
233
-  /** fixed value of 2 */
234
-  unsigned char r2w_factor : 3;
235
-  /** not used */
236
-  unsigned char reserved5 : 2;
237
-  /** fixed value of 0 - no write protect groups */
238
-  unsigned char wp_grp_enable : 1;
239
-  // byte 13
240
-  unsigned char reserved6 : 5;
241
-  /** always zero - no partial block read*/
242
-  unsigned char write_partial : 1;
243
-  /** write_bl_len fixed for 512 byte blocks */
244
-  unsigned char write_bl_len_low : 2;
245
-  // byte 14
246
-  unsigned char reserved7: 2;
247
-  /** Do not use always 0 */
248
-  unsigned char file_format : 2;
249
-  unsigned char tmp_write_protect : 1;
250
-  unsigned char perm_write_protect : 1;
251
-  unsigned char copy : 1;
252
-  /** Do not use always 0 */
253
-  unsigned char file_format_grp : 1;
254
-  // byte 15
255
-  /** not used always 1 */
256
-  unsigned char always1 : 1;
257
-  /** checksum */
258
-  unsigned char crc : 7;
259
-} csd2_t;
260
-
261
-/** union of old and new style CSD register */
262
-union csd_t {
263
-  csd1_t v1;
264
-  csd2_t v2;
265
-};
266
-
267
-#endif // _SDINFO_H_

+ 0
- 384
Marlin/SdVolume.cpp View File

@@ -1,384 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Arduino SdFat Library
25
- * Copyright (C) 2009 by William Greiman
26
- *
27
- * This file is part of the Arduino Sd2Card Library
28
- */
29
-#include "MarlinConfig.h"
30
-
31
-#if ENABLED(SDSUPPORT)
32
-
33
-#include "SdVolume.h"
34
-
35
-#if !USE_MULTIPLE_CARDS
36
-  // raw block cache
37
-  uint32_t SdVolume::cacheBlockNumber_;  // current block number
38
-  cache_t  SdVolume::cacheBuffer_;       // 512 byte cache for Sd2Card
39
-  Sd2Card* SdVolume::sdCard_;            // pointer to SD card object
40
-  bool     SdVolume::cacheDirty_;        // cacheFlush() will write block if true
41
-  uint32_t SdVolume::cacheMirrorBlock_;  // mirror  block for second FAT
42
-#endif  // USE_MULTIPLE_CARDS
43
-
44
-// find a contiguous group of clusters
45
-bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
46
-  // start of group
47
-  uint32_t bgnCluster;
48
-  // end of group
49
-  uint32_t endCluster;
50
-  // last cluster of FAT
51
-  uint32_t fatEnd = clusterCount_ + 1;
52
-
53
-  // flag to save place to start next search
54
-  bool setStart;
55
-
56
-  // set search start cluster
57
-  if (*curCluster) {
58
-    // try to make file contiguous
59
-    bgnCluster = *curCluster + 1;
60
-
61
-    // don't save new start location
62
-    setStart = false;
63
-  }
64
-  else {
65
-    // start at likely place for free cluster
66
-    bgnCluster = allocSearchStart_;
67
-
68
-    // save next search start if one cluster
69
-    setStart = count == 1;
70
-  }
71
-  // end of group
72
-  endCluster = bgnCluster;
73
-
74
-  // search the FAT for free clusters
75
-  for (uint32_t n = 0;; n++, endCluster++) {
76
-    // can't find space checked all clusters
77
-    if (n >= clusterCount_) return false;
78
-
79
-    // past end - start from beginning of FAT
80
-    if (endCluster > fatEnd) {
81
-      bgnCluster = endCluster = 2;
82
-    }
83
-    uint32_t f;
84
-    if (!fatGet(endCluster, &f)) return false;
85
-
86
-    if (f != 0) {
87
-      // cluster in use try next cluster as bgnCluster
88
-      bgnCluster = endCluster + 1;
89
-    }
90
-    else if ((endCluster - bgnCluster + 1) == count) {
91
-      // done - found space
92
-      break;
93
-    }
94
-  }
95
-  // mark end of chain
96
-  if (!fatPutEOC(endCluster)) return false;
97
-
98
-  // link clusters
99
-  while (endCluster > bgnCluster) {
100
-    if (!fatPut(endCluster - 1, endCluster)) return false;
101
-    endCluster--;
102
-  }
103
-  if (*curCluster != 0) {
104
-    // connect chains
105
-    if (!fatPut(*curCluster, bgnCluster)) return false;
106
-  }
107
-  // return first cluster number to caller
108
-  *curCluster = bgnCluster;
109
-
110
-  // remember possible next free cluster
111
-  if (setStart) allocSearchStart_ = bgnCluster + 1;
112
-
113
-  return true;
114
-}
115
-
116
-bool SdVolume::cacheFlush() {
117
-  if (cacheDirty_) {
118
-    if (!sdCard_->writeBlock(cacheBlockNumber_, cacheBuffer_.data))
119
-      return false;
120
-
121
-    // mirror FAT tables
122
-    if (cacheMirrorBlock_) {
123
-      if (!sdCard_->writeBlock(cacheMirrorBlock_, cacheBuffer_.data))
124
-        return false;
125
-      cacheMirrorBlock_ = 0;
126
-    }
127
-    cacheDirty_ = 0;
128
-  }
129
-  return true;
130
-}
131
-
132
-bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) {
133
-  if (cacheBlockNumber_ != blockNumber) {
134
-    if (!cacheFlush()) return false;
135
-    if (!sdCard_->readBlock(blockNumber, cacheBuffer_.data)) return false;
136
-    cacheBlockNumber_ = blockNumber;
137
-  }
138
-  if (dirty) cacheDirty_ = true;
139
-  return true;
140
-}
141
-
142
-// return the size in bytes of a cluster chain
143
-bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) {
144
-  uint32_t s = 0;
145
-  do {
146
-    if (!fatGet(cluster, &cluster)) return false;
147
-    s += 512UL << clusterSizeShift_;
148
-  } while (!isEOC(cluster));
149
-  *size = s;
150
-  return true;
151
-}
152
-
153
-// Fetch a FAT entry
154
-bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) {
155
-  uint32_t lba;
156
-  if (cluster > (clusterCount_ + 1)) return false;
157
-  if (FAT12_SUPPORT && fatType_ == 12) {
158
-    uint16_t index = cluster;
159
-    index += index >> 1;
160
-    lba = fatStartBlock_ + (index >> 9);
161
-    if (!cacheRawBlock(lba, CACHE_FOR_READ)) return false;
162
-    index &= 0x1FF;
163
-    uint16_t tmp = cacheBuffer_.data[index];
164
-    index++;
165
-    if (index == 512) {
166
-      if (!cacheRawBlock(lba + 1, CACHE_FOR_READ)) return false;
167
-      index = 0;
168
-    }
169
-    tmp |= cacheBuffer_.data[index] << 8;
170
-    *value = cluster & 1 ? tmp >> 4 : tmp & 0xFFF;
171
-    return true;
172
-  }
173
-
174
-  if (fatType_ == 16)
175
-    lba = fatStartBlock_ + (cluster >> 8);
176
-  else if (fatType_ == 32)
177
-    lba = fatStartBlock_ + (cluster >> 7);
178
-  else
179
-    return false;
180
-
181
-  if (lba != cacheBlockNumber_ && !cacheRawBlock(lba, CACHE_FOR_READ))
182
-    return false;
183
-
184
-  *value = (fatType_ == 16) ? cacheBuffer_.fat16[cluster & 0xFF] : (cacheBuffer_.fat32[cluster & 0x7F] & FAT32MASK);
185
-  return true;
186
-}
187
-
188
-// Store a FAT entry
189
-bool SdVolume::fatPut(uint32_t cluster, uint32_t value) {
190
-  uint32_t lba;
191
-  // error if reserved cluster
192
-  if (cluster < 2) return false;
193
-
194
-  // error if not in FAT
195
-  if (cluster > (clusterCount_ + 1)) return false;
196
-
197
-  if (FAT12_SUPPORT && fatType_ == 12) {
198
-    uint16_t index = cluster;
199
-    index += index >> 1;
200
-    lba = fatStartBlock_ + (index >> 9);
201
-    if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
202
-    // mirror second FAT
203
-    if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
204
-    index &= 0x1FF;
205
-    uint8_t tmp = value;
206
-    if (cluster & 1) {
207
-      tmp = (cacheBuffer_.data[index] & 0XF) | tmp << 4;
208
-    }
209
-    cacheBuffer_.data[index] = tmp;
210
-    index++;
211
-    if (index == 512) {
212
-      lba++;
213
-      index = 0;
214
-      if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
215
-      // mirror second FAT
216
-      if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
217
-    }
218
-    tmp = value >> 4;
219
-    if (!(cluster & 1)) {
220
-      tmp = ((cacheBuffer_.data[index] & 0xF0)) | tmp >> 4;
221
-    }
222
-    cacheBuffer_.data[index] = tmp;
223
-    return true;
224
-  }
225
-
226
-  if (fatType_ == 16)
227
-    lba = fatStartBlock_ + (cluster >> 8);
228
-  else if (fatType_ == 32)
229
-    lba = fatStartBlock_ + (cluster >> 7);
230
-  else
231
-    return false;
232
-
233
-  if (!cacheRawBlock(lba, CACHE_FOR_WRITE)) return false;
234
-
235
-  // store entry
236
-  if (fatType_ == 16)
237
-    cacheBuffer_.fat16[cluster & 0xFF] = value;
238
-  else
239
-    cacheBuffer_.fat32[cluster & 0x7F] = value;
240
-
241
-  // mirror second FAT
242
-  if (fatCount_ > 1) cacheMirrorBlock_ = lba + blocksPerFat_;
243
-  return true;
244
-}
245
-
246
-// free a cluster chain
247
-bool SdVolume::freeChain(uint32_t cluster) {
248
-  // clear free cluster location
249
-  allocSearchStart_ = 2;
250
-
251
-  do {
252
-    uint32_t next;
253
-    if (!fatGet(cluster, &next)) return false;
254
-
255
-    // free cluster
256
-    if (!fatPut(cluster, 0)) return false;
257
-
258
-    cluster = next;
259
-  } while (!isEOC(cluster));
260
-
261
-  return true;
262
-}
263
-
264
-/** Volume free space in clusters.
265
- *
266
- * \return Count of free clusters for success or -1 if an error occurs.
267
- */
268
-int32_t SdVolume::freeClusterCount() {
269
-  uint32_t free = 0;
270
-  uint16_t n;
271
-  uint32_t todo = clusterCount_ + 2;
272
-
273
-  if (fatType_ == 16)
274
-    n = 256;
275
-  else if (fatType_ == 32)
276
-    n = 128;
277
-  else // put FAT12 here
278
-    return -1;
279
-
280
-  for (uint32_t lba = fatStartBlock_; todo; todo -= n, lba++) {
281
-    if (!cacheRawBlock(lba, CACHE_FOR_READ)) return -1;
282
-    NOMORE(n, todo);
283
-    if (fatType_ == 16) {
284
-      for (uint16_t i = 0; i < n; i++)
285
-        if (cacheBuffer_.fat16[i] == 0) free++;
286
-    }
287
-    else {
288
-      for (uint16_t i = 0; i < n; i++)
289
-        if (cacheBuffer_.fat32[i] == 0) free++;
290
-    }
291
-  }
292
-  return free;
293
-}
294
-
295
-/** Initialize a FAT volume.
296
- *
297
- * \param[in] dev The SD card where the volume is located.
298
- *
299
- * \param[in] part The partition to be used.  Legal values for \a part are
300
- * 1-4 to use the corresponding partition on a device formatted with
301
- * a MBR, Master Boot Record, or zero if the device is formatted as
302
- * a super floppy with the FAT boot sector in block zero.
303
- *
304
- * \return true for success, false for failure.
305
- * Reasons for failure include not finding a valid partition, not finding a valid
306
- * FAT file system in the specified partition or an I/O error.
307
- */
308
-bool SdVolume::init(Sd2Card* dev, uint8_t part) {
309
-  uint32_t totalBlocks, volumeStartBlock = 0;
310
-  fat32_boot_t* fbs;
311
-
312
-  sdCard_ = dev;
313
-  fatType_ = 0;
314
-  allocSearchStart_ = 2;
315
-  cacheDirty_ = 0;  // cacheFlush() will write block if true
316
-  cacheMirrorBlock_ = 0;
317
-  cacheBlockNumber_ = 0xFFFFFFFF;
318
-
319
-  // if part == 0 assume super floppy with FAT boot sector in block zero
320
-  // if part > 0 assume mbr volume with partition table
321
-  if (part) {
322
-    if (part > 4) return false;
323
-    if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false;
324
-    part_t* p = &cacheBuffer_.mbr.part[part - 1];
325
-    if ((p->boot & 0x7F) != 0  || p->totalSectors < 100 || p->firstSector == 0)
326
-      return false; // not a valid partition
327
-    volumeStartBlock = p->firstSector;
328
-  }
329
-  if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false;
330
-  fbs = &cacheBuffer_.fbs32;
331
-  if (fbs->bytesPerSector != 512 ||
332
-      fbs->fatCount == 0 ||
333
-      fbs->reservedSectorCount == 0 ||
334
-      fbs->sectorsPerCluster == 0) {
335
-    // not valid FAT volume
336
-    return false;
337
-  }
338
-  fatCount_ = fbs->fatCount;
339
-  blocksPerCluster_ = fbs->sectorsPerCluster;
340
-  // determine shift that is same as multiply by blocksPerCluster_
341
-  clusterSizeShift_ = 0;
342
-  while (blocksPerCluster_ != _BV(clusterSizeShift_)) {
343
-    // error if not power of 2
344
-    if (clusterSizeShift_++ > 7) return false;
345
-  }
346
-  blocksPerFat_ = fbs->sectorsPerFat16 ?
347
-                  fbs->sectorsPerFat16 : fbs->sectorsPerFat32;
348
-
349
-  fatStartBlock_ = volumeStartBlock + fbs->reservedSectorCount;
350
-
351
-  // count for FAT16 zero for FAT32
352
-  rootDirEntryCount_ = fbs->rootDirEntryCount;
353
-
354
-  // directory start for FAT16 dataStart for FAT32
355
-  rootDirStart_ = fatStartBlock_ + fbs->fatCount * blocksPerFat_;
356
-
357
-  // data start for FAT16 and FAT32
358
-  dataStartBlock_ = rootDirStart_ + ((32 * fbs->rootDirEntryCount + 511) / 512);
359
-
360
-  // total blocks for FAT16 or FAT32
361
-  totalBlocks = fbs->totalSectors16 ?
362
-                fbs->totalSectors16 : fbs->totalSectors32;
363
-
364
-  // total data blocks
365
-  clusterCount_ = totalBlocks - (dataStartBlock_ - volumeStartBlock);
366
-
367
-  // divide by cluster size to get cluster count
368
-  clusterCount_ >>= clusterSizeShift_;
369
-
370
-  // FAT type is determined by cluster count
371
-  if (clusterCount_ < 4085) {
372
-    fatType_ = 12;
373
-    if (!FAT12_SUPPORT) return false;
374
-  }
375
-  else if (clusterCount_ < 65525)
376
-    fatType_ = 16;
377
-  else {
378
-    rootDirStart_ = fbs->fat32RootCluster;
379
-    fatType_ = 32;
380
-  }
381
-  return true;
382
-}
383
-
384
-#endif // SDSUPPORT

+ 0
- 211
Marlin/SdVolume.h View File

@@ -1,211 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * \file
25
- * \brief SdVolume class
26
- */
27
-
28
-/**
29
- * Arduino SdFat Library
30
- * Copyright (C) 2009 by William Greiman
31
- *
32
- * This file is part of the Arduino Sd2Card Library
33
- */
34
-#ifndef _SDVOLUME_H_
35
-#define _SDVOLUME_H_
36
-
37
-#include "SdFatConfig.h"
38
-#include "Sd2Card.h"
39
-#include "SdFatStructs.h"
40
-
41
-//==============================================================================
42
-// SdVolume class
43
-/**
44
- * \brief Cache for an SD data block
45
- */
46
-union cache_t {
47
-  uint8_t         data[512];  // Used to access cached file data blocks.
48
-  uint16_t        fat16[256]; // Used to access cached FAT16 entries.
49
-  uint32_t        fat32[128]; // Used to access cached FAT32 entries.
50
-  dir_t           dir[16];    // Used to access cached directory entries.
51
-  mbr_t           mbr;        // Used to access a cached Master Boot Record.
52
-  fat_boot_t      fbs;        // Used to access to a cached FAT boot sector.
53
-  fat32_boot_t    fbs32;      // Used to access to a cached FAT32 boot sector.
54
-  fat32_fsinfo_t  fsinfo;     // Used to access to a cached FAT32 FSINFO sector.
55
-};
56
-
57
-/**
58
- * \class SdVolume
59
- * \brief Access FAT16 and FAT32 volumes on SD and SDHC cards.
60
- */
61
-class SdVolume {
62
- public:
63
-  // Create an instance of SdVolume
64
-  SdVolume() : fatType_(0) {}
65
-  /**
66
-   * Clear the cache and returns a pointer to the cache.  Used by the WaveRP
67
-   * recorder to do raw write to the SD card.  Not for normal apps.
68
-   * \return A pointer to the cache buffer or zero if an error occurs.
69
-   */
70
-  cache_t* cacheClear() {
71
-    if (!cacheFlush()) return 0;
72
-    cacheBlockNumber_ = 0xFFFFFFFF;
73
-    return &cacheBuffer_;
74
-  }
75
-
76
-  /**
77
-   * Initialize a FAT volume.  Try partition one first then try super
78
-   * floppy format.
79
-   *
80
-   * \param[in] dev The Sd2Card where the volume is located.
81
-   *
82
-   * \return true for success, false for failure.
83
-   * Reasons for failure include not finding a valid partition, not finding
84
-   * a valid FAT file system or an I/O error.
85
-   */
86
-  bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0); }
87
-  bool init(Sd2Card* dev, uint8_t part);
88
-
89
-  // inline functions that return volume info
90
-  uint8_t blocksPerCluster() const { return blocksPerCluster_; } //> \return The volume's cluster size in blocks.
91
-  uint32_t blocksPerFat() const { return blocksPerFat_; }        //> \return The number of blocks in one FAT.
92
-  uint32_t clusterCount() const { return clusterCount_; }        //> \return The total number of clusters in the volume.
93
-  uint8_t clusterSizeShift() const { return clusterSizeShift_; } //> \return The shift count required to multiply by blocksPerCluster.
94
-  uint32_t dataStartBlock() const { return dataStartBlock_; }    //> \return The logical block number for the start of file data.
95
-  uint8_t fatCount() const { return fatCount_; }                 //> \return The number of FAT structures on the volume.
96
-  uint32_t fatStartBlock() const { return fatStartBlock_; }      //> \return The logical block number for the start of the first FAT.
97
-  uint8_t fatType() const { return fatType_; }                   //> \return The FAT type of the volume. Values are 12, 16 or 32.
98
-  int32_t freeClusterCount();
99
-  uint32_t rootDirEntryCount() const { return rootDirEntryCount_; } /** \return The number of entries in the root directory for FAT16 volumes. */
100
-
101
-  /**
102
-   * \return The logical block number for the start of the root directory
103
-   *   on FAT16 volumes or the first cluster number on FAT32 volumes.
104
-   */
105
-  uint32_t rootDirStart() const { return rootDirStart_; }
106
-
107
-  /**
108
-   * Sd2Card object for this volume
109
-   * \return pointer to Sd2Card object.
110
-   */
111
-  Sd2Card* sdCard() { return sdCard_; }
112
-
113
-  /**
114
-   * Debug access to FAT table
115
-   *
116
-   * \param[in] n cluster number.
117
-   * \param[out] v value of entry
118
-   * \return true for success or false for failure
119
-   */
120
-  bool dbgFat(uint32_t n, uint32_t* v) { return fatGet(n, v); }
121
-
122
- private:
123
-  // Allow SdBaseFile access to SdVolume private data.
124
-  friend class SdBaseFile;
125
-
126
-  // value for dirty argument in cacheRawBlock to indicate read from cache
127
-  static bool const CACHE_FOR_READ = false;
128
-  // value for dirty argument in cacheRawBlock to indicate write to cache
129
-  static bool const CACHE_FOR_WRITE = true;
130
-
131
-  #if USE_MULTIPLE_CARDS
132
-    cache_t cacheBuffer_;        // 512 byte cache for device blocks
133
-    uint32_t cacheBlockNumber_;  // Logical number of block in the cache
134
-    Sd2Card* sdCard_;            // Sd2Card object for cache
135
-    bool cacheDirty_;            // cacheFlush() will write block if true
136
-    uint32_t cacheMirrorBlock_;  // block number for mirror FAT
137
-  #else
138
-    static cache_t cacheBuffer_;        // 512 byte cache for device blocks
139
-    static uint32_t cacheBlockNumber_;  // Logical number of block in the cache
140
-    static Sd2Card* sdCard_;            // Sd2Card object for cache
141
-    static bool cacheDirty_;            // cacheFlush() will write block if true
142
-    static uint32_t cacheMirrorBlock_;  // block number for mirror FAT
143
-  #endif
144
-
145
-  uint32_t allocSearchStart_;   // start cluster for alloc search
146
-  uint8_t blocksPerCluster_;    // cluster size in blocks
147
-  uint32_t blocksPerFat_;       // FAT size in blocks
148
-  uint32_t clusterCount_;       // clusters in one FAT
149
-  uint8_t clusterSizeShift_;    // shift to convert cluster count to block count
150
-  uint32_t dataStartBlock_;     // first data block number
151
-  uint8_t fatCount_;            // number of FATs on volume
152
-  uint32_t fatStartBlock_;      // start block for first FAT
153
-  uint8_t fatType_;             // volume type (12, 16, OR 32)
154
-  uint16_t rootDirEntryCount_;  // number of entries in FAT16 root dir
155
-  uint32_t rootDirStart_;       // root start block for FAT16, cluster for FAT32
156
-
157
-  bool allocContiguous(uint32_t count, uint32_t* curCluster);
158
-  uint8_t blockOfCluster(uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); }
159
-  uint32_t clusterStartBlock(uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); }
160
-  uint32_t blockNumber(uint32_t cluster, uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); }
161
-
162
-  cache_t* cache() { return &cacheBuffer_; }
163
-  uint32_t cacheBlockNumber() const { return cacheBlockNumber_; }
164
-
165
-  #if USE_MULTIPLE_CARDS
166
-    bool cacheFlush();
167
-    bool cacheRawBlock(uint32_t blockNumber, bool dirty);
168
-  #else
169
-    static bool cacheFlush();
170
-    static bool cacheRawBlock(uint32_t blockNumber, bool dirty);
171
-  #endif
172
-
173
-  // used by SdBaseFile write to assign cache to SD location
174
-  void cacheSetBlockNumber(uint32_t blockNumber, bool dirty) {
175
-    cacheDirty_ = dirty;
176
-    cacheBlockNumber_  = blockNumber;
177
-  }
178
-  void cacheSetDirty() { cacheDirty_ |= CACHE_FOR_WRITE; }
179
-  bool chainSize(uint32_t beginCluster, uint32_t* size);
180
-  bool fatGet(uint32_t cluster, uint32_t* value);
181
-  bool fatPut(uint32_t cluster, uint32_t value);
182
-  bool fatPutEOC(uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); }
183
-  bool freeChain(uint32_t cluster);
184
-  bool isEOC(uint32_t cluster) const {
185
-    if (FAT12_SUPPORT && fatType_ == 12) return  cluster >= FAT12EOC_MIN;
186
-    if (fatType_ == 16) return cluster >= FAT16EOC_MIN;
187
-    return  cluster >= FAT32EOC_MIN;
188
-  }
189
-  bool readBlock(uint32_t block, uint8_t* dst) { return sdCard_->readBlock(block, dst); }
190
-  bool writeBlock(uint32_t block, const uint8_t* dst) { return sdCard_->writeBlock(block, dst); }
191
-
192
-  // Deprecated functions
193
-  #if ALLOW_DEPRECATED_FUNCTIONS
194
-    public:
195
-      /**
196
-       * \deprecated Use: bool SdVolume::init(Sd2Card* dev);
197
-       * \param[in] dev The SD card where the volume is located.
198
-       * \return true for success or false for failure.
199
-       */
200
-      bool init(Sd2Card& dev) { return init(&dev); }
201
-      /**
202
-       * \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol);
203
-       * \param[in] dev The SD card where the volume is located.
204
-       * \param[in] part The partition to be used.
205
-       * \return true for success or false for failure.
206
-       */
207
-      bool init(Sd2Card& dev, uint8_t part) { return init(&dev, part); }
208
-  #endif  // ALLOW_DEPRECATED_FUNCTIONS
209
-};
210
-
211
-#endif // _SDVOLUME_H_

+ 47
- 65
Marlin/Version.h View File

@@ -1,9 +1,9 @@
1 1
 /**
2 2
  * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 4
  *
5 5
  * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7 7
  *
8 8
  * This program is free software: you can redistribute it and/or modify
9 9
  * it under the terms of the GNU General Public License as published by
@@ -19,76 +19,58 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
23
+
24
+////////////////////////////
25
+// VENDOR VERSION EXAMPLE //
26
+////////////////////////////
22 27
 
23 28
 /**
24
- * This file is the standard Marlin version identifier file, all fields can be
25
- * overriden by the ones defined on _Version.h by using the Configuration.h
26
- * directive USE_AUTOMATIC_VERSIONING.
29
+ * Marlin release version identifier
27 30
  */
31
+//#define SHORT_BUILD_VERSION "2.0.5"
28 32
 
29
-#if ENABLED(USE_AUTOMATIC_VERSIONING)
30
-
31
-  #include "_Version.h"
32
-
33
-#else
34
-
35
-  /**
36
-   * Marlin release version identifier
37
-   */
38
-  #define SHORT_BUILD_VERSION "1.1.7"
39
-
40
-  /**
41
-   * Verbose version identifier which should contain a reference to the location
42
-   * from where the binary was downloaded or the source code was compiled.
43
-   */
44
-  #define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)"
45
-
46
-  /**
47
-   * The STRING_DISTRIBUTION_DATE represents when the binary file was built,
48
-   * here we define this default string as the date where the latest release
49
-   * version was tagged.
50
-   */
51
-  #define STRING_DISTRIBUTION_DATE "2017-12-15 12:00"
52
-
53
-  /**
54
-   * Required minimum Configuration.h and Configuration_adv.h file versions.
55
-   *
56
-   * You must increment this version number for every significant change such as,
57
-   * but not limited to: ADD, DELETE RENAME OR REPURPOSE any directive/option on
58
-   * the configuration files.
59
-   */
60
-  #define REQUIRED_CONFIGURATION_H_VERSION 010107
61
-  #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010107
33
+/**
34
+ * Verbose version identifier which should contain a reference to the location
35
+ * from where the binary was downloaded or the source code was compiled.
36
+ */
37
+//#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)"
62 38
 
63
-  /**
64
-   * The protocol for communication to the host. Protocol indicates communication
65
-   * standards such as the use of ASCII, "echo:" and "error:" line prefixes, etc.
66
-   * (Other behaviors are given by the firmware version and capabilities report.)
67
-   */
68
-  #define PROTOCOL_VERSION "1.0"
39
+/**
40
+ * The STRING_DISTRIBUTION_DATE represents when the binary file was built,
41
+ * here we define this default string as the date where the latest release
42
+ * version was tagged.
43
+ */
44
+//#define STRING_DISTRIBUTION_DATE "2020-01-31"
69 45
 
70
-  /**
71
-   * Defines a generic printer name to be output to the LCD after booting Marlin.
72
-   */
73
-  #define MACHINE_NAME "3D Printer"
46
+/**
47
+ * Defines a generic printer name to be output to the LCD after booting Marlin.
48
+ */
49
+//#define MACHINE_NAME "3D Printer"
74 50
 
75
-  /**
76
-   * The SOURCE_CODE_URL is the location where users will find the Marlin Source
77
-   * Code which is installed on the device. In most cases —unless the manufacturer
78
-   * has a distinct Github fork— the Source Code URL should just be the main
79
-   * Marlin repository.
80
-   */
81
-  #define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
51
+/**
52
+ * The SOURCE_CODE_URL is the location where users will find the Marlin Source
53
+ * Code which is installed on the device. In most cases —unless the manufacturer
54
+ * has a distinct Github fork— the Source Code URL should just be the main
55
+ * Marlin repository.
56
+ */
57
+//#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
82 58
 
83
-  /**
84
-   * Default generic printer UUID.
85
-   */
86
-  #define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
59
+/**
60
+ * Default generic printer UUID.
61
+ */
62
+//#define DEFAULT_MACHINE_UUID "cede2a2f-41a2-4748-9b12-c55c62f367ff"
87 63
 
88
-  /**
89
-   * The WEBSITE_URL is the location where users can get more information such as
90
-   * documentation about a specific Marlin release.
91
-   */
92
-  #define WEBSITE_URL "http://marlinfw.org"
64
+/**
65
+ * The WEBSITE_URL is the location where users can get more information such as
66
+ * documentation about a specific Marlin release.
67
+ */
68
+//#define WEBSITE_URL "http://marlinfw.org"
93 69
 
94
-#endif // USE_AUTOMATIC_VERSIONING
70
+/**
71
+ * Set the vendor info the serial USB interface, if changable
72
+ * Currently only supported by DUE platform
73
+ */
74
+//#define  USB_DEVICE_VENDOR_ID           0x0000
75
+//#define  USB_DEVICE_PRODUCT_ID          0x0000
76
+//#define  USB_DEVICE_MANUFACTURE_NAME    WEBSITE_URL

+ 0
- 38
Marlin/bitmap_flags.h View File

@@ -1,38 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef _BITMAP_FLAGS_H_
24
-#define _BITMAP_FLAGS_H_
25
-
26
-#include "macros.h"
27
-
28
-/**
29
- * These support functions allow the use of large bit arrays of flags that take very
30
- * little RAM. Currently they are limited to being 16x16 in size. Changing the declaration
31
- * to unsigned long will allow us to go to 32x32 if higher resolution meshes are needed
32
- * in the future.
33
- */
34
-FORCE_INLINE void bitmap_clear(uint16_t bits[16], const uint8_t x, const uint8_t y) { CBI(bits[y], x); }
35
-FORCE_INLINE void bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { SBI(bits[y], x); }
36
-FORCE_INLINE bool is_bitmap_set(uint16_t bits[16], const uint8_t x, const uint8_t y) { return TEST(bits[y], x); }
37
-
38
-#endif // _BITMAP_FLAGS_H_

+ 0
- 46
Marlin/blinkm.cpp View File

@@ -1,46 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * blinkm.cpp - Control a BlinkM over i2c
25
- */
26
-
27
-#include "MarlinConfig.h"
28
-
29
-#if ENABLED(BLINKM)
30
-
31
-#include "blinkm.h"
32
-#include "leds.h"
33
-#include <Wire.h>
34
-
35
-void blinkm_set_led_color(const LEDColor &color) {
36
-  Wire.begin();
37
-  Wire.beginTransmission(0x09);
38
-  Wire.write('o');                    //to disable ongoing script, only needs to be used once
39
-  Wire.write('n');
40
-  Wire.write(color.r);
41
-  Wire.write(color.g);
42
-  Wire.write(color.b);
43
-  Wire.endTransmission();
44
-}
45
-
46
-#endif // BLINKM

+ 0
- 35
Marlin/blinkm.h View File

@@ -1,35 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * blinkm.h - Control a BlinkM over i2c
25
- */
26
-
27
-#ifndef _BLINKM_H_
28
-#define _BLINKM_H_
29
-
30
-struct LEDColor;
31
-typedef LEDColor LEDColor;
32
-
33
-void blinkm_set_led_color(const LEDColor &color);
34
-
35
-#endif // _BLINKM_H_

+ 0
- 152
Marlin/boards.h View File

@@ -1,152 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef BOARDS_H
24
-#define BOARDS_H
25
-
26
-#define BOARD_UNKNOWN -1
27
-
28
-//
29
-// RAMPS 1.3 / 1.4 - ATmega1280, ATmega2560
30
-//
31
-
32
-#define BOARD_RAMPS_OLD         3     // MEGA/RAMPS up to 1.2
33
-
34
-#define BOARD_RAMPS_13_EFB      33    // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
35
-#define BOARD_RAMPS_13_EEB      34    // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
36
-#define BOARD_RAMPS_13_EFF      35    // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
37
-#define BOARD_RAMPS_13_EEF      36    // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
38
-#define BOARD_RAMPS_13_SF       38    // RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
39
-
40
-#define BOARD_RAMPS_14_EFB      43    // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
41
-#define BOARD_RAMPS_14_EEB      44    // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
42
-#define BOARD_RAMPS_14_EFF      45    // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
43
-#define BOARD_RAMPS_14_EEF      46    // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
44
-#define BOARD_RAMPS_14_SF       48    // RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
45
-
46
-#define BOARD_RAMPS_PLUS_EFB   143    // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan, Bed)
47
-#define BOARD_RAMPS_PLUS_EEB   144    // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Bed)
48
-#define BOARD_RAMPS_PLUS_EFF   145    // RAMPS Plus 3DYMY (Power outputs: Hotend, Fan0, Fan1)
49
-#define BOARD_RAMPS_PLUS_EEF   146    // RAMPS Plus 3DYMY (Power outputs: Hotend0, Hotend1, Fan)
50
-#define BOARD_RAMPS_PLUS_SF    148    // RAMPS Plus 3DYMY (Power outputs: Spindle, Controller Fan)
51
-
52
-//
53
-// RAMPS Derivatives - ATmega1280, ATmega2560
54
-//
55
-
56
-#define BOARD_3DRAG             77    // 3Drag Controller
57
-#define BOARD_K8200             78    // Velleman K8200 Controller (derived from 3Drag Controller)
58
-#define BOARD_K8400             79    // Velleman K8400 Controller (derived from 3Drag Controller)
59
-#define BOARD_BAM_DICE          401   // 2PrintBeta BAM&DICE with STK drivers
60
-#define BOARD_BAM_DICE_DUE      402   // 2PrintBeta BAM&DICE Due with STK drivers
61
-#define BOARD_MKS_BASE          40    // MKS BASE 1.0
62
-#define BOARD_MKS_13            47    // MKS v1.3 or 1.4 (maybe higher)
63
-#define BOARD_MKS_GEN_L         53    // MKS GEN L
64
-#define BOARD_ZRIB_V20          504   // zrib V2.0 control board (Chinese knock off RAMPS replica)
65
-#define BOARD_FELIX2            37    // Felix 2.0+ Electronics Board (RAMPS like)
66
-#define BOARD_RIGIDBOARD        42    // Invent-A-Part RigidBoard
67
-#define BOARD_RIGIDBOARD_V2     52    // Invent-A-Part RigidBoard V2
68
-#define BOARD_SAINSMART_2IN1    49    // Sainsmart 2-in-1 board
69
-#define BOARD_ULTIMAKER         7     // Ultimaker
70
-#define BOARD_ULTIMAKER_OLD     71    // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
71
-#define BOARD_AZTEEG_X3         67    // Azteeg X3
72
-#define BOARD_AZTEEG_X3_PRO     68    // Azteeg X3 Pro
73
-#define BOARD_ULTIMAIN_2        72    // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
74
-#define BOARD_RUMBA             80    // Rumba
75
-#define BOARD_BQ_ZUM_MEGA_3D    503   // bq ZUM Mega 3D
76
-#define BOARD_MAKEBOARD_MINI    431   // MakeBoard Mini v2.1.2 is a control board sold by MicroMake
77
-
78
-//
79
-// Other ATmega1280, ATmega2560
80
-//
81
-
82
-#define BOARD_CNCONTROLS_11     111   // Cartesio CN Controls V11
83
-#define BOARD_CNCONTROLS_12     112   // Cartesio CN Controls V12
84
-#define BOARD_CHEAPTRONIC       2     // Cheaptronic v1.0
85
-#define BOARD_CHEAPTRONIC_V2    21    // Cheaptronic v2.0
86
-#define BOARD_MIGHTYBOARD_REVE  200   // Makerbot Mightyboard Revision E
87
-#define BOARD_MEGATRONICS       70    // Megatronics
88
-#define BOARD_MEGATRONICS_2     701   // Megatronics v2.0
89
-#define BOARD_MEGATRONICS_3     703   // Megatronics v3.0
90
-#define BOARD_MEGATRONICS_31    704   // Megatronics v3.1
91
-#define BOARD_RAMBO             301   // Rambo
92
-#define BOARD_MINIRAMBO         302   // Mini-Rambo
93
-#define BOARD_MINIRAMBO_10A     303   // Mini-Rambo 1.0a
94
-#define BOARD_ELEFU_3           21    // Elefu Ra Board (v3)
95
-#define BOARD_LEAPFROG          999   // Leapfrog
96
-#define BOARD_MEGACONTROLLER    310   // Mega controller
97
-#define BOARD_SCOOVO_X9H        321   // abee Scoovo X9H
98
-#define BOARD_GT2560_REV_A      74    // Geeetech GT2560 Rev. A
99
-#define BOARD_GT2560_REV_A_PLUS 75    // Geeetech GT2560 Rev. A+ (with auto level probe)
100
-
101
-//
102
-// ATmega1281, ATmega2561
103
-//
104
-
105
-#define BOARD_MINITRONICS       702   // Minitronics v1.0/1.1
106
-#define BOARD_SILVER_GATE       25    // Silvergate v1.0
107
-
108
-//
109
-// Sanguinololu and Derivatives - ATmega644P, ATmega1284P
110
-//
111
-
112
-#define BOARD_SANGUINOLOLU_11   6     // Sanguinololu < 1.2
113
-#define BOARD_SANGUINOLOLU_12   62    // Sanguinololu 1.2 and above
114
-#define BOARD_MELZI             63    // Melzi
115
-#define BOARD_MELZI_MAKR3D      66    // Melzi with ATmega1284 (MaKr3d version)
116
-#define BOARD_MELZI_CREALITY    89    // Melzi Creality3D board (for CR-10 etc)
117
-#define BOARD_STB_11            64    // STB V1.1
118
-#define BOARD_AZTEEG_X1         65    // Azteeg X1
119
-
120
-//
121
-// Other ATmega644P, ATmega644, ATmega1284P
122
-//
123
-
124
-#define BOARD_GEN3_MONOLITHIC   22    // Gen3 Monolithic Electronics
125
-#define BOARD_GEN3_PLUS         9     // Gen3+
126
-#define BOARD_GEN6              5     // Gen6
127
-#define BOARD_GEN6_DELUXE       51    // Gen6 deluxe
128
-#define BOARD_GEN7_CUSTOM       10    // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
129
-#define BOARD_GEN7_12           11    // Gen7 v1.1, v1.2
130
-#define BOARD_GEN7_13           12    // Gen7 v1.3
131
-#define BOARD_GEN7_14           13    // Gen7 v1.4
132
-#define BOARD_OMCA_A            90    // Alpha OMCA board
133
-#define BOARD_OMCA              91    // Final OMCA board
134
-#define BOARD_SETHI             20    // Sethi 3D_1
135
-#define BOARD_ANET_10           69    // Anet 1.0 (Melzi clone)
136
-
137
-//
138
-// Teensyduino - AT90USB1286, AT90USB1286P
139
-//
140
-
141
-#define BOARD_TEENSYLU          8     // Teensylu
142
-#define BOARD_PRINTRBOARD       81    // Printrboard (AT90USB1286)
143
-#define BOARD_PRINTRBOARD_REVF  811   // Printrboard Revision F (AT90USB1286)
144
-#define BOARD_BRAINWAVE         82    // Brainwave (AT90USB646)
145
-#define BOARD_BRAINWAVE_PRO     85    // Brainwave Pro (AT90USB1286)
146
-#define BOARD_SAV_MKI           83    // SAV Mk-I (AT90USB1286)
147
-#define BOARD_TEENSY2           84    // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84  make
148
-#define BOARD_5DPRINT           88    // 5DPrint D8 Driver Board
149
-
150
-#define MB(board) (MOTHERBOARD==BOARD_##board)
151
-
152
-#endif // __BOARDS_H

+ 0
- 146
Marlin/buzzer.h View File

@@ -1,146 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef __BUZZER_H__
24
-#define __BUZZER_H__
25
-
26
-#include "types.h"
27
-#include "fastio.h"
28
-#include "circularqueue.h"
29
-#include "temperature.h"
30
-
31
-#include "MarlinConfig.h"
32
-
33
-#define TONE_QUEUE_LENGTH 4
34
-
35
-/**
36
- * @brief Tone structure
37
- * @details Simple abstraction of a tone based on a duration and a frequency.
38
- */
39
-struct tone_t {
40
-  uint16_t duration;
41
-  uint16_t frequency;
42
-};
43
-
44
-/**
45
- * @brief Buzzer class
46
- */
47
-class Buzzer {
48
-  private:
49
-    struct state_t {
50
-      tone_t   tone;
51
-      uint32_t endtime;
52
-    } state;
53
-
54
-  protected:
55
-    CircularQueue<tone_t, TONE_QUEUE_LENGTH> buffer;
56
-
57
-    /**
58
-     * @brief Inverts the sate of a digital PIN
59
-     * @details This will invert the current state of an digital IO pin.
60
-     */
61
-    void invert() {
62
-      TOGGLE(BEEPER_PIN);
63
-    }
64
-
65
-    /**
66
-     * @brief Turn off a digital PIN
67
-     * @details Alias of digitalWrite(PIN, LOW) using FastIO
68
-     */
69
-    void off() {
70
-      WRITE(BEEPER_PIN, LOW);
71
-    }
72
-
73
-    /**
74
-     * @brief Turn on a digital PIN
75
-     * @details Alias of digitalWrite(PIN, HIGH) using FastIO
76
-     */
77
-    void on() {
78
-      WRITE(BEEPER_PIN, HIGH);
79
-    }
80
-
81
-    /**
82
-     * @brief Resets the state of the class
83
-     * @details Brings the class state to a known one.
84
-     */
85
-    void reset() {
86
-      this->off();
87
-      this->state.endtime = 0;
88
-    }
89
-
90
-  public:
91
-    /**
92
-     * @brief Class constructor
93
-     */
94
-    Buzzer() {
95
-      SET_OUTPUT(BEEPER_PIN);
96
-      this->reset();
97
-    }
98
-
99
-    /**
100
-     * @brief Add a tone to the queue
101
-     * @details Adds a tone_t structure to the ring buffer, will block IO if the
102
-     *          queue is full waiting for one slot to get available.
103
-     *
104
-     * @param duration Duration of the tone in milliseconds
105
-     * @param frequency Frequency of the tone in hertz
106
-     */
107
-    void tone(const uint16_t &duration, const uint16_t &frequency = 0) {
108
-      while (buffer.isFull()) {
109
-        this->tick();
110
-        thermalManager.manage_heater();
111
-      }
112
-      tone_t tone = { duration, frequency };
113
-      this->buffer.enqueue(tone);
114
-    }
115
-
116
-    /**
117
-     * @brief Loop function
118
-     * @details This function should be called at loop, it will take care of
119
-     *          playing the tones in the queue.
120
-     */
121
-    virtual void tick() {
122
-      const millis_t now = millis();
123
-
124
-      if (!this->state.endtime) {
125
-        if (this->buffer.isEmpty()) return;
126
-
127
-        this->state.tone = this->buffer.dequeue();
128
-        this->state.endtime = now + this->state.tone.duration;
129
-
130
-        if (this->state.tone.frequency > 0) {
131
-          #if ENABLED(SPEAKER)
132
-            CRITICAL_SECTION_START;
133
-            ::tone(BEEPER_PIN, this->state.tone.frequency, this->state.tone.duration);
134
-            CRITICAL_SECTION_END;
135
-          #else
136
-            this->on();
137
-          #endif
138
-        }
139
-      }
140
-      else if (ELAPSED(now, this->state.endtime)) this->reset();
141
-    }
142
-};
143
-
144
-extern Buzzer buzzer;
145
-
146
-#endif

+ 0
- 909
Marlin/cardreader.cpp View File

@@ -1,909 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#include "MarlinConfig.h"
24
-
25
-#if ENABLED(SDSUPPORT)
26
-
27
-#include "cardreader.h"
28
-
29
-#include "ultralcd.h"
30
-#include "stepper.h"
31
-#include "language.h"
32
-
33
-#define LONGEST_FILENAME (longFilename[0] ? longFilename : filename)
34
-
35
-CardReader::CardReader() {
36
-  #if ENABLED(SDCARD_SORT_ALPHA)
37
-    sort_count = 0;
38
-    #if ENABLED(SDSORT_GCODE)
39
-      sort_alpha = true;
40
-      sort_folders = FOLDER_SORTING;
41
-      //sort_reverse = false;
42
-    #endif
43
-  #endif
44
-  sdprinting = cardOK = saving = logging = false;
45
-  filesize = 0;
46
-  sdpos = 0;
47
-  file_subcall_ctr = 0;
48
-
49
-  workDirDepth = 0;
50
-  ZERO(workDirParents);
51
-
52
-  autostart_stilltocheck = true; //the SD start is delayed, because otherwise the serial cannot answer fast enough to make contact with the host software.
53
-  autostart_index = 0;
54
-
55
-  //power to SD reader
56
-  #if SDPOWER > -1
57
-    OUT_WRITE(SDPOWER, HIGH);
58
-  #endif // SDPOWER
59
-
60
-  next_autostart_ms = millis() + 5000;
61
-}
62
-
63
-char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
64
-  char *pos = buffer;
65
-  for (uint8_t i = 0; i < 11; i++) {
66
-    if (p.name[i] == ' ') continue;
67
-    if (i == 8) *pos++ = '.';
68
-    *pos++ = p.name[i];
69
-  }
70
-  *pos++ = 0;
71
-  return buffer;
72
-}
73
-
74
-/**
75
- * Dive into a folder and recurse depth-first to perform a pre-set operation lsAction:
76
- *   LS_Count       - Add +1 to nrFiles for every file within the parent
77
- *   LS_GetFilename - Get the filename of the file indexed by nrFile_index
78
- *   LS_SerialPrint - Print the full path and size of each file to serial output
79
- */
80
-
81
-uint16_t nrFile_index;
82
-
83
-void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
84
-  dir_t p;
85
-  uint8_t cnt = 0;
86
-
87
-  // Read the next entry from a directory
88
-  while (parent.readDir(p, longFilename) > 0) {
89
-
90
-    // If the entry is a directory and the action is LS_SerialPrint
91
-    if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) {
92
-
93
-      // Get the short name for the item, which we know is a folder
94
-      char lfilename[FILENAME_LENGTH];
95
-      createFilename(lfilename, p);
96
-
97
-      // Allocate enough stack space for the full path to a folder, trailing slash, and nul
98
-      bool prepend_is_empty = (prepend[0] == '\0');
99
-      int len = (prepend_is_empty ? 1 : strlen(prepend)) + strlen(lfilename) + 1 + 1;
100
-      char path[len];
101
-
102
-      // Append the FOLDERNAME12/ to the passed string.
103
-      // It contains the full path to the "parent" argument.
104
-      // We now have the full path to the item in this folder.
105
-      strcpy(path, prepend_is_empty ? "/" : prepend); // root slash if prepend is empty
106
-      strcat(path, lfilename); // FILENAME_LENGTH-1 characters maximum
107
-      strcat(path, "/");       // 1 character
108
-
109
-      // Serial.print(path);
110
-
111
-      // Get a new directory object using the full path
112
-      // and dive recursively into it.
113
-      SdFile dir;
114
-      if (!dir.open(parent, lfilename, O_READ)) {
115
-        if (lsAction == LS_SerialPrint) {
116
-          SERIAL_ECHO_START();
117
-          SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
118
-          SERIAL_ECHOLN(lfilename);
119
-        }
120
-      }
121
-      lsDive(path, dir);
122
-      // close() is done automatically by destructor of SdFile
123
-    }
124
-    else {
125
-      uint8_t pn0 = p.name[0];
126
-      if (pn0 == DIR_NAME_FREE) break;
127
-      if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue;
128
-      if (longFilename[0] == '.') continue;
129
-
130
-      if (!DIR_IS_FILE_OR_SUBDIR(&p) || (p.attributes & DIR_ATT_HIDDEN)) continue;
131
-
132
-      filenameIsDir = DIR_IS_SUBDIR(&p);
133
-
134
-      if (!filenameIsDir && (p.name[8] != 'G' || p.name[9] == '~')) continue;
135
-
136
-      switch (lsAction) {  // 1 based file count
137
-        case LS_Count:
138
-          nrFiles++;
139
-          break;
140
-
141
-        case LS_SerialPrint:
142
-          createFilename(filename, p);
143
-          SERIAL_PROTOCOL(prepend);
144
-          SERIAL_PROTOCOL(filename);
145
-          SERIAL_PROTOCOLCHAR(' ');
146
-          SERIAL_PROTOCOLLN(p.fileSize);
147
-          break;
148
-
149
-        case LS_GetFilename:
150
-          createFilename(filename, p);
151
-          if (match != NULL) {
152
-            if (strcasecmp(match, filename) == 0) return;
153
-          }
154
-          else if (cnt == nrFile_index) return;  // 0 based index
155
-          cnt++;
156
-          break;
157
-      }
158
-
159
-    }
160
-  } // while readDir
161
-}
162
-
163
-void CardReader::ls() {
164
-  lsAction = LS_SerialPrint;
165
-  root.rewind();
166
-  lsDive("", root);
167
-}
168
-
169
-#if ENABLED(LONG_FILENAME_HOST_SUPPORT)
170
-
171
-  /**
172
-   * Get a long pretty path based on a DOS 8.3 path
173
-   */
174
-  void CardReader::printLongPath(char *path) {
175
-    lsAction = LS_GetFilename;
176
-
177
-    int i, pathLen = strlen(path);
178
-
179
-    // SERIAL_ECHOPGM("Full Path: "); SERIAL_ECHOLN(path);
180
-
181
-    // Zero out slashes to make segments
182
-    for (i = 0; i < pathLen; i++) if (path[i] == '/') path[i] = '\0';
183
-
184
-    SdFile diveDir = root; // start from the root for segment 1
185
-    for (i = 0; i < pathLen;) {
186
-
187
-      if (path[i] == '\0') i++; // move past a single nul
188
-
189
-      char *segment = &path[i]; // The segment after most slashes
190
-
191
-      // If a segment is empty (extra-slash) then exit
192
-      if (!*segment) break;
193
-
194
-      // Go to the next segment
195
-      while (path[++i]) { }
196
-
197
-      // SERIAL_ECHOPGM("Looking for segment: "); SERIAL_ECHOLN(segment);
198
-
199
-      // Find the item, setting the long filename
200
-      diveDir.rewind();
201
-      lsDive("", diveDir, segment);
202
-
203
-      // Print /LongNamePart to serial output
204
-      SERIAL_PROTOCOLCHAR('/');
205
-      SERIAL_PROTOCOL(longFilename[0] ? longFilename : "???");
206
-
207
-      // If the filename was printed then that's it
208
-      if (!filenameIsDir) break;
209
-
210
-      // SERIAL_ECHOPGM("Opening dir: "); SERIAL_ECHOLN(segment);
211
-
212
-      // Open the sub-item as the new dive parent
213
-      SdFile dir;
214
-      if (!dir.open(diveDir, segment, O_READ)) {
215
-        SERIAL_EOL();
216
-        SERIAL_ECHO_START();
217
-        SERIAL_ECHOPGM(MSG_SD_CANT_OPEN_SUBDIR);
218
-        SERIAL_ECHO(segment);
219
-        break;
220
-      }
221
-
222
-      diveDir.close();
223
-      diveDir = dir;
224
-
225
-    } // while i<pathLen
226
-
227
-    SERIAL_EOL();
228
-  }
229
-
230
-#endif // LONG_FILENAME_HOST_SUPPORT
231
-
232
-void CardReader::initsd() {
233
-  cardOK = false;
234
-  if (root.isOpen()) root.close();
235
-
236
-  #ifndef SPI_SPEED
237
-    #define SPI_SPEED SPI_FULL_SPEED
238
-  #endif
239
-
240
-  if (!card.init(SPI_SPEED, SDSS)
241
-    #if defined(LCD_SDSS) && (LCD_SDSS != SDSS)
242
-      && !card.init(SPI_SPEED, LCD_SDSS)
243
-    #endif
244
-  ) {
245
-    //if (!card.init(SPI_HALF_SPEED,SDSS))
246
-    SERIAL_ECHO_START();
247
-    SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL);
248
-  }
249
-  else if (!volume.init(&card)) {
250
-    SERIAL_ERROR_START();
251
-    SERIAL_ERRORLNPGM(MSG_SD_VOL_INIT_FAIL);
252
-  }
253
-  else if (!root.openRoot(&volume)) {
254
-    SERIAL_ERROR_START();
255
-    SERIAL_ERRORLNPGM(MSG_SD_OPENROOT_FAIL);
256
-  }
257
-  else {
258
-    cardOK = true;
259
-    SERIAL_ECHO_START();
260
-    SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
261
-  }
262
-  setroot();
263
-}
264
-
265
-void CardReader::setroot() {
266
-  /*if (!workDir.openRoot(&volume)) {
267
-    SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
268
-  }*/
269
-  workDir = root;
270
-  curDir = &workDir;
271
-  #if ENABLED(SDCARD_SORT_ALPHA)
272
-    presort();
273
-  #endif
274
-}
275
-
276
-void CardReader::release() {
277
-  sdprinting = false;
278
-  cardOK = false;
279
-}
280
-
281
-void CardReader::openAndPrintFile(const char *name) {
282
-  char cmd[4 + strlen(name) + 1]; // Room for "M23 ", filename, and null
283
-  sprintf_P(cmd, PSTR("M23 %s"), name);
284
-  for (char *c = &cmd[4]; *c; c++) *c = tolower(*c);
285
-  enqueue_and_echo_command(cmd);
286
-  enqueue_and_echo_commands_P(PSTR("M24"));
287
-}
288
-
289
-void CardReader::startFileprint() {
290
-  if (cardOK) {
291
-    sdprinting = true;
292
-    #if ENABLED(SDCARD_SORT_ALPHA)
293
-      flush_presort();
294
-    #endif
295
-  }
296
-}
297
-
298
-void CardReader::stopSDPrint() {
299
-  sdprinting = false;
300
-  if (isFileOpen()) file.close();
301
-}
302
-
303
-void CardReader::openLogFile(char* name) {
304
-  logging = true;
305
-  openFile(name, false);
306
-}
307
-
308
-void appendAtom(SdFile &file, char *& dst, uint8_t &cnt) {
309
-  file.getFilename(dst);
310
-  while (*dst && cnt < MAXPATHNAMELENGTH) { dst++; cnt++; }
311
-  if (cnt < MAXPATHNAMELENGTH) { *dst = '/'; dst++; cnt++; }
312
-}
313
-
314
-void CardReader::getAbsFilename(char *t) {
315
-  *t++ = '/';                                               // Root folder
316
-  uint8_t cnt = 1;
317
-
318
-  for (uint8_t i = 0; i < workDirDepth; i++)                // Loop to current work dir
319
-    appendAtom(workDirParents[i], t, cnt);
320
-
321
-  if (cnt < MAXPATHNAMELENGTH - (FILENAME_LENGTH)) {
322
-    appendAtom(file, t, cnt);
323
-    --t;
324
-  }
325
-  *t = '\0';
326
-}
327
-
328
-void CardReader::openFile(char* name, const bool read, const bool subcall/*=false*/) {
329
-
330
-  if (!cardOK) return;
331
-
332
-  uint8_t doing = 0;
333
-  if (isFileOpen()) {                     // Replacing current file or doing a subroutine
334
-    if (subcall) {
335
-      if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) {
336
-        SERIAL_ERROR_START();
337
-        SERIAL_ERRORPGM("trying to call sub-gcode files with too many levels. MAX level is:");
338
-        SERIAL_ERRORLN(SD_PROCEDURE_DEPTH);
339
-        kill(PSTR(MSG_KILLED));
340
-        return;
341
-      }
342
-
343
-      // Store current filename (based on workDirParents) and position
344
-      getAbsFilename(proc_filenames[file_subcall_ctr]);
345
-      filespos[file_subcall_ctr] = sdpos;
346
-
347
-      SERIAL_ECHO_START();
348
-      SERIAL_ECHOPAIR("SUBROUTINE CALL target:\"", name);
349
-      SERIAL_ECHOPAIR("\" parent:\"", proc_filenames[file_subcall_ctr]);
350
-      SERIAL_ECHOLNPAIR("\" pos", sdpos);
351
-      file_subcall_ctr++;
352
-    }
353
-    else
354
-      doing = 1;
355
-  }
356
-  else if (subcall) {     // Returning from a subcall?
357
-    SERIAL_ECHO_START();
358
-    SERIAL_ECHOLNPGM("END SUBROUTINE");
359
-  }
360
-  else {                  // Opening fresh file
361
-    doing = 2;
362
-    file_subcall_ctr = 0; // Reset procedure depth in case user cancels print while in procedure
363
-  }
364
-
365
-  if (doing) {
366
-    SERIAL_ECHO_START();
367
-    SERIAL_ECHOPGM("Now ");
368
-    serialprintPGM(doing == 1 ? PSTR("doing") : PSTR("fresh"));
369
-    SERIAL_ECHOLNPAIR(" file: ", name);
370
-  }
371
-
372
-  stopSDPrint();
373
-
374
-  SdFile myDir;
375
-  curDir = &root;
376
-  char *fname = name;
377
-  char *dirname_start, *dirname_end;
378
-
379
-  if (name[0] == '/') {
380
-    dirname_start = &name[1];
381
-    while (dirname_start != NULL) {
382
-      dirname_end = strchr(dirname_start, '/');
383
-      //SERIAL_ECHOPGM("start:");SERIAL_ECHOLN((int)(dirname_start - name));
384
-      //SERIAL_ECHOPGM("end  :");SERIAL_ECHOLN((int)(dirname_end - name));
385
-      if (dirname_end != NULL && dirname_end > dirname_start) {
386
-        char subdirname[FILENAME_LENGTH];
387
-        strncpy(subdirname, dirname_start, dirname_end - dirname_start);
388
-        subdirname[dirname_end - dirname_start] = '\0';
389
-        if (!myDir.open(curDir, subdirname, O_READ)) {
390
-          SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
391
-          SERIAL_PROTOCOL(subdirname);
392
-          SERIAL_PROTOCOLCHAR('.');
393
-          return;
394
-        }
395
-        else {
396
-          //SERIAL_ECHOLNPGM("dive ok");
397
-        }
398
-
399
-        curDir = &myDir;
400
-        dirname_start = dirname_end + 1;
401
-      }
402
-      else { // the remainder after all /fsa/fdsa/ is the filename
403
-        fname = dirname_start;
404
-        //SERIAL_ECHOLNPGM("remainder");
405
-        //SERIAL_ECHOLN(fname);
406
-        break;
407
-      }
408
-    }
409
-  }
410
-  else
411
-    curDir = &workDir; // Relative paths start in current directory
412
-
413
-  if (read) {
414
-    if (file.open(curDir, fname, O_READ)) {
415
-      filesize = file.fileSize();
416
-      sdpos = 0;
417
-      SERIAL_PROTOCOLPAIR(MSG_SD_FILE_OPENED, fname);
418
-      SERIAL_PROTOCOLLNPAIR(MSG_SD_SIZE, filesize);
419
-      SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
420
-      getfilename(0, fname);
421
-      lcd_setstatus(longFilename[0] ? longFilename : fname);
422
-    }
423
-    else {
424
-      SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, fname);
425
-      SERIAL_PROTOCOLCHAR('.');
426
-      SERIAL_EOL();
427
-    }
428
-  }
429
-  else { //write
430
-    if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) {
431
-      SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, fname);
432
-      SERIAL_PROTOCOLCHAR('.');
433
-      SERIAL_EOL();
434
-    }
435
-    else {
436
-      saving = true;
437
-      SERIAL_PROTOCOLLNPAIR(MSG_SD_WRITE_TO_FILE, name);
438
-      lcd_setstatus(fname);
439
-    }
440
-  }
441
-}
442
-
443
-void CardReader::removeFile(const char * const name) {
444
-  if (!cardOK) return;
445
-
446
-  stopSDPrint();
447
-
448
-  SdFile myDir;
449
-  curDir = &root;
450
-  const char *fname = name;
451
-
452
-  char *dirname_start, *dirname_end;
453
-  if (name[0] == '/') {
454
-    dirname_start = strchr(name, '/') + 1;
455
-    while (dirname_start != NULL) {
456
-      dirname_end = strchr(dirname_start, '/');
457
-      //SERIAL_ECHOPGM("start:");SERIAL_ECHOLN((int)(dirname_start - name));
458
-      //SERIAL_ECHOPGM("end  :");SERIAL_ECHOLN((int)(dirname_end - name));
459
-      if (dirname_end != NULL && dirname_end > dirname_start) {
460
-        char subdirname[FILENAME_LENGTH];
461
-        strncpy(subdirname, dirname_start, dirname_end - dirname_start);
462
-        subdirname[dirname_end - dirname_start] = 0;
463
-        SERIAL_ECHOLN(subdirname);
464
-        if (!myDir.open(curDir, subdirname, O_READ)) {
465
-          SERIAL_PROTOCOLPAIR(MSG_SD_OPEN_FILE_FAIL, subdirname);
466
-          SERIAL_PROTOCOLCHAR('.');
467
-          SERIAL_EOL();
468
-          return;
469
-        }
470
-
471
-        curDir = &myDir;
472
-        dirname_start = dirname_end + 1;
473
-      }
474
-      else {
475
-        fname = dirname_start;
476
-        break;
477
-      }
478
-    }
479
-  }
480
-  else // Relative paths are rooted in the current directory
481
-    curDir = &workDir;
482
-
483
-  if (file.remove(curDir, fname)) {
484
-    SERIAL_PROTOCOLPGM("File deleted:");
485
-    SERIAL_PROTOCOLLN(fname);
486
-    sdpos = 0;
487
-    #if ENABLED(SDCARD_SORT_ALPHA)
488
-      presort();
489
-    #endif
490
-  }
491
-  else {
492
-    SERIAL_PROTOCOLPGM("Deletion failed, File: ");
493
-    SERIAL_PROTOCOL(fname);
494
-    SERIAL_PROTOCOLCHAR('.');
495
-  }
496
-}
497
-
498
-void CardReader::getStatus() {
499
-  if (cardOK) {
500
-    SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE);
501
-    SERIAL_PROTOCOL(sdpos);
502
-    SERIAL_PROTOCOLCHAR('/');
503
-    SERIAL_PROTOCOLLN(filesize);
504
-  }
505
-  else
506
-    SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING);
507
-}
508
-
509
-void CardReader::write_command(char *buf) {
510
-  char* begin = buf;
511
-  char* npos = NULL;
512
-  char* end = buf + strlen(buf) - 1;
513
-
514
-  file.writeError = false;
515
-  if ((npos = strchr(buf, 'N')) != NULL) {
516
-    begin = strchr(npos, ' ') + 1;
517
-    end = strchr(npos, '*') - 1;
518
-  }
519
-  end[1] = '\r';
520
-  end[2] = '\n';
521
-  end[3] = '\0';
522
-  file.write(begin);
523
-  if (file.writeError) {
524
-    SERIAL_ERROR_START();
525
-    SERIAL_ERRORLNPGM(MSG_SD_ERR_WRITE_TO_FILE);
526
-  }
527
-}
528
-
529
-void CardReader::checkautostart(bool force) {
530
-  if (!force && (!autostart_stilltocheck || PENDING(millis(), next_autostart_ms)))
531
-    return;
532
-
533
-  autostart_stilltocheck = false;
534
-
535
-  if (!cardOK) {
536
-    initsd();
537
-    if (!cardOK) return; // fail
538
-  }
539
-
540
-  char autoname[10];
541
-  sprintf_P(autoname, PSTR("auto%i.g"), autostart_index);
542
-  for (int8_t i = 0; i < (int8_t)strlen(autoname); i++) autoname[i] = tolower(autoname[i]);
543
-
544
-  dir_t p;
545
-
546
-  root.rewind();
547
-
548
-  bool found = false;
549
-  while (root.readDir(p, NULL) > 0) {
550
-    for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]);
551
-    if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) {
552
-      openAndPrintFile(autoname);
553
-      found = true;
554
-    }
555
-  }
556
-  if (!found)
557
-    autostart_index = -1;
558
-  else
559
-    autostart_index++;
560
-}
561
-
562
-void CardReader::closefile(bool store_location) {
563
-  file.sync();
564
-  file.close();
565
-  saving = logging = false;
566
-
567
-  if (store_location) {
568
-    //future: store printer state, filename and position for continuing a stopped print
569
-    // so one can unplug the printer and continue printing the next day.
570
-  }
571
-}
572
-
573
-/**
574
- * Get the name of a file in the current directory by index
575
- */
576
-void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) {
577
-  #if ENABLED(SDSORT_CACHE_NAMES)
578
-    if (match != NULL) {
579
-      while (nr < sort_count) {
580
-        if (strcasecmp(match, sortshort[nr]) == 0) break;
581
-        nr++;
582
-      }
583
-    }
584
-    if (nr < sort_count) {
585
-      strcpy(filename, sortshort[nr]);
586
-      strcpy(longFilename, sortnames[nr]);
587
-      filenameIsDir = TEST(isDir[nr>>3], nr & 0x07);
588
-      return;
589
-    }
590
-  #endif // SDSORT_CACHE_NAMES
591
-  curDir = &workDir;
592
-  lsAction = LS_GetFilename;
593
-  nrFile_index = nr;
594
-  curDir->rewind();
595
-  lsDive("", *curDir, match);
596
-}
597
-
598
-uint16_t CardReader::getnrfilenames() {
599
-  curDir = &workDir;
600
-  lsAction = LS_Count;
601
-  nrFiles = 0;
602
-  curDir->rewind();
603
-  lsDive("", *curDir);
604
-  //SERIAL_ECHOLN(nrFiles);
605
-  return nrFiles;
606
-}
607
-
608
-void CardReader::chdir(const char * relpath) {
609
-  SdFile newDir;
610
-  SdFile *parent = &root;
611
-
612
-  if (workDir.isOpen()) parent = &workDir;
613
-
614
-  if (!newDir.open(*parent, relpath, O_READ)) {
615
-    SERIAL_ECHO_START();
616
-    SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
617
-    SERIAL_ECHOLN(relpath);
618
-  }
619
-  else {
620
-    workDir = newDir;
621
-    if (workDirDepth < MAX_DIR_DEPTH)
622
-      workDirParents[workDirDepth++] = workDir;
623
-    #if ENABLED(SDCARD_SORT_ALPHA)
624
-      presort();
625
-    #endif
626
-  }
627
-}
628
-
629
-int8_t CardReader::updir() {
630
-  if (workDirDepth > 0) {                                               // At least 1 dir has been saved
631
-    workDir = --workDirDepth ? workDirParents[workDirDepth - 1] : root; // Use parent, or root if none
632
-    #if ENABLED(SDCARD_SORT_ALPHA)
633
-      presort();
634
-    #endif
635
-  }
636
-  return workDirDepth;
637
-}
638
-
639
-#if ENABLED(SDCARD_SORT_ALPHA)
640
-
641
-  /**
642
-   * Get the name of a file in the current directory by sort-index
643
-   */
644
-  void CardReader::getfilename_sorted(const uint16_t nr) {
645
-    getfilename(
646
-      #if ENABLED(SDSORT_GCODE)
647
-        sort_alpha &&
648
-      #endif
649
-      (nr < sort_count) ? sort_order[nr] : nr
650
-    );
651
-  }
652
-
653
-  /**
654
-   * Read all the files and produce a sort key
655
-   *
656
-   * We can do this in 3 ways...
657
-   *  - Minimal RAM: Read two filenames at a time sorting along...
658
-   *  - Some RAM: Buffer the directory just for this sort
659
-   *  - Most RAM: Buffer the directory and return filenames from RAM
660
-   */
661
-  void CardReader::presort() {
662
-
663
-    // Sorting may be turned off
664
-    #if ENABLED(SDSORT_GCODE)
665
-      if (!sort_alpha) return;
666
-    #endif
667
-
668
-    // Throw away old sort index
669
-    flush_presort();
670
-
671
-    // If there are files, sort up to the limit
672
-    uint16_t fileCnt = getnrfilenames();
673
-    if (fileCnt > 0) {
674
-
675
-      // Never sort more than the max allowed
676
-      // If you use folders to organize, 20 may be enough
677
-      if (fileCnt > SDSORT_LIMIT) fileCnt = SDSORT_LIMIT;
678
-
679
-      // Sort order is always needed. May be static or dynamic.
680
-      #if ENABLED(SDSORT_DYNAMIC_RAM)
681
-        sort_order = new uint8_t[fileCnt];
682
-      #endif
683
-
684
-      // Use RAM to store the entire directory during pre-sort.
685
-      // SDSORT_LIMIT should be set to prevent over-allocation.
686
-      #if ENABLED(SDSORT_USES_RAM)
687
-
688
-        // If using dynamic ram for names, allocate on the heap.
689
-        #if ENABLED(SDSORT_CACHE_NAMES)
690
-          #if ENABLED(SDSORT_DYNAMIC_RAM)
691
-            sortshort = new char*[fileCnt];
692
-            sortnames = new char*[fileCnt];
693
-          #endif
694
-        #elif ENABLED(SDSORT_USES_STACK)
695
-          char sortnames[fileCnt][SORTED_LONGNAME_MAXLEN];
696
-        #endif
697
-
698
-        // Folder sorting needs 1 bit per entry for flags.
699
-        #if HAS_FOLDER_SORTING
700
-          #if ENABLED(SDSORT_DYNAMIC_RAM)
701
-            isDir = new uint8_t[(fileCnt + 7) >> 3];
702
-          #elif ENABLED(SDSORT_USES_STACK)
703
-            uint8_t isDir[(fileCnt + 7) >> 3];
704
-          #endif
705
-        #endif
706
-
707
-      #else // !SDSORT_USES_RAM
708
-
709
-        // By default re-read the names from SD for every compare
710
-        // retaining only two filenames at a time. This is very
711
-        // slow but is safest and uses minimal RAM.
712
-        char name1[LONG_FILENAME_LENGTH + 1];
713
-
714
-      #endif
715
-
716
-      if (fileCnt > 1) {
717
-
718
-        // Init sort order.
719
-        for (uint16_t i = 0; i < fileCnt; i++) {
720
-          sort_order[i] = i;
721
-          // If using RAM then read all filenames now.
722
-          #if ENABLED(SDSORT_USES_RAM)
723
-            getfilename(i);
724
-            #if ENABLED(SDSORT_DYNAMIC_RAM)
725
-              // Use dynamic method to copy long filename
726
-              sortnames[i] = strdup(LONGEST_FILENAME);
727
-              #if ENABLED(SDSORT_CACHE_NAMES)
728
-                // When caching also store the short name, since
729
-                // we're replacing the getfilename() behavior.
730
-                sortshort[i] = strdup(filename);
731
-              #endif
732
-            #else
733
-              // Copy filenames into the static array
734
-              #if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
735
-                strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
736
-                sortnames[i][SORTED_LONGNAME_MAXLEN - 1] = '\0';
737
-              #else
738
-                strncpy(sortnames[i], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
739
-              #endif
740
-              #if ENABLED(SDSORT_CACHE_NAMES)
741
-                strcpy(sortshort[i], filename);
742
-              #endif
743
-            #endif
744
-            // char out[30];
745
-            // sprintf_P(out, PSTR("---- %i %s %s"), i, filenameIsDir ? "D" : " ", sortnames[i]);
746
-            // SERIAL_ECHOLN(out);
747
-            #if HAS_FOLDER_SORTING
748
-              const uint16_t bit = i & 0x07, ind = i >> 3;
749
-              if (bit == 0) isDir[ind] = 0x00;
750
-              if (filenameIsDir) isDir[ind] |= _BV(bit);
751
-            #endif
752
-          #endif
753
-        }
754
-
755
-        // Bubble Sort
756
-        for (uint16_t i = fileCnt; --i;) {
757
-          bool didSwap = false;
758
-          for (uint16_t j = 0; j < i; ++j) {
759
-            const uint16_t o1 = sort_order[j], o2 = sort_order[j + 1];
760
-
761
-            // Compare names from the array or just the two buffered names
762
-            #if ENABLED(SDSORT_USES_RAM)
763
-              #define _SORT_CMP_NODIR() (strcasecmp(sortnames[o1], sortnames[o2]) > 0)
764
-            #else
765
-              #define _SORT_CMP_NODIR() (strcasecmp(name1, name2) > 0)
766
-            #endif
767
-
768
-            #if HAS_FOLDER_SORTING
769
-              #if ENABLED(SDSORT_USES_RAM)
770
-                // Folder sorting needs an index and bit to test for folder-ness.
771
-                const uint8_t ind1 = o1 >> 3, bit1 = o1 & 0x07,
772
-                              ind2 = o2 >> 3, bit2 = o2 & 0x07;
773
-                #define _SORT_CMP_DIR(fs) \
774
-                  (((isDir[ind1] & _BV(bit1)) != 0) == ((isDir[ind2] & _BV(bit2)) != 0) \
775
-                    ? _SORT_CMP_NODIR() \
776
-                    : (isDir[fs > 0 ? ind1 : ind2] & (fs > 0 ? _BV(bit1) : _BV(bit2))) != 0)
777
-              #else
778
-                #define _SORT_CMP_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_NODIR() : (fs > 0 ? dir1 : !dir1))
779
-              #endif
780
-            #endif
781
-
782
-            // The most economical method reads names as-needed
783
-            // throughout the loop. Slow if there are many.
784
-            #if DISABLED(SDSORT_USES_RAM)
785
-              getfilename(o1);
786
-              strcpy(name1, LONGEST_FILENAME); // save (or getfilename below will trounce it)
787
-              #if HAS_FOLDER_SORTING
788
-                bool dir1 = filenameIsDir;
789
-              #endif
790
-              getfilename(o2);
791
-              char *name2 = LONGEST_FILENAME; // use the string in-place
792
-            #endif // !SDSORT_USES_RAM
793
-
794
-            // Sort the current pair according to settings.
795
-            if (
796
-              #if HAS_FOLDER_SORTING
797
-                #if ENABLED(SDSORT_GCODE)
798
-                  sort_folders ? _SORT_CMP_DIR(sort_folders) : _SORT_CMP_NODIR()
799
-                #else
800
-                  _SORT_CMP_DIR(FOLDER_SORTING)
801
-                #endif
802
-              #else
803
-                _SORT_CMP_NODIR()
804
-              #endif
805
-            ) {
806
-              sort_order[j] = o2;
807
-              sort_order[j + 1] = o1;
808
-              didSwap = true;
809
-            }
810
-          }
811
-          if (!didSwap) break;
812
-        }
813
-        // Using RAM but not keeping names around
814
-        #if ENABLED(SDSORT_USES_RAM) && DISABLED(SDSORT_CACHE_NAMES)
815
-          #if ENABLED(SDSORT_DYNAMIC_RAM)
816
-            for (uint16_t i = 0; i < fileCnt; ++i) free(sortnames[i]);
817
-            #if HAS_FOLDER_SORTING
818
-              free(isDir);
819
-            #endif
820
-          #endif
821
-        #endif
822
-      }
823
-      else {
824
-        sort_order[0] = 0;
825
-        #if ENABLED(SDSORT_USES_RAM) && ENABLED(SDSORT_CACHE_NAMES)
826
-          getfilename(0);
827
-          #if ENABLED(SDSORT_DYNAMIC_RAM)
828
-            sortnames = new char*[1];
829
-            sortnames[0] = strdup(LONGEST_FILENAME); // malloc
830
-            #if ENABLED(SDSORT_CACHE_NAMES)
831
-              sortshort = new char*[1];
832
-              sortshort[0] = strdup(filename);       // malloc
833
-            #endif
834
-            isDir = new uint8_t[1];
835
-          #else
836
-            #if SORTED_LONGNAME_MAXLEN != LONG_FILENAME_LENGTH
837
-              strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
838
-              sortnames[0][SORTED_LONGNAME_MAXLEN - 1] = '\0';
839
-            #else
840
-              strncpy(sortnames[0], LONGEST_FILENAME, SORTED_LONGNAME_MAXLEN);
841
-            #endif
842
-            #if ENABLED(SDSORT_CACHE_NAMES)
843
-              strcpy(sortshort[0], filename);
844
-            #endif
845
-          #endif
846
-          isDir[0] = filenameIsDir ? 0x01 : 0x00;
847
-        #endif
848
-      }
849
-
850
-      sort_count = fileCnt;
851
-    }
852
-  }
853
-
854
-  void CardReader::flush_presort() {
855
-    if (sort_count > 0) {
856
-      #if ENABLED(SDSORT_DYNAMIC_RAM)
857
-        delete sort_order;
858
-        #if ENABLED(SDSORT_CACHE_NAMES)
859
-          for (uint8_t i = 0; i < sort_count; ++i) {
860
-            free(sortshort[i]); // strdup
861
-            free(sortnames[i]); // strdup
862
-          }
863
-          delete sortshort;
864
-          delete sortnames;
865
-        #endif
866
-      #endif
867
-      sort_count = 0;
868
-    }
869
-  }
870
-
871
-#endif // SDCARD_SORT_ALPHA
872
-
873
-uint16_t CardReader::get_num_Files() {
874
-  return
875
-    #if ENABLED(SDCARD_SORT_ALPHA) && SDSORT_USES_RAM && SDSORT_CACHE_NAMES
876
-      nrFiles // no need to access the SD card for filenames
877
-    #else
878
-      getnrfilenames()
879
-    #endif
880
-  ;
881
-}
882
-
883
-void CardReader::printingHasFinished() {
884
-  stepper.synchronize();
885
-  file.close();
886
-  if (file_subcall_ctr > 0) { // Heading up to a parent file that called current as a procedure.
887
-    file_subcall_ctr--;
888
-    openFile(proc_filenames[file_subcall_ctr], true, true);
889
-    setIndex(filespos[file_subcall_ctr]);
890
-    startFileprint();
891
-  }
892
-  else {
893
-    sdprinting = false;
894
-    if (SD_FINISHED_STEPPERRELEASE)
895
-      enqueue_and_echo_commands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
896
-    print_job_timer.stop();
897
-    if (print_job_timer.duration() > 60)
898
-      enqueue_and_echo_commands_P(PSTR("M31"));
899
-    #if ENABLED(SDCARD_SORT_ALPHA)
900
-      presort();
901
-    #endif
902
-
903
-    #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
904
-      lcd_reselect_last_file();
905
-    #endif
906
-  }
907
-}
908
-
909
-#endif // SDSUPPORT

+ 0
- 198
Marlin/cardreader.h View File

@@ -1,198 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef _CARDREADER_H_
24
-#define _CARDREADER_H_
25
-
26
-#include "MarlinConfig.h"
27
-
28
-#if ENABLED(SDSUPPORT)
29
-
30
-#define MAX_DIR_DEPTH 10          // Maximum folder depth
31
-
32
-#include "SdFile.h"
33
-#include "types.h"
34
-#include "enum.h"
35
-
36
-class CardReader {
37
-public:
38
-  CardReader();
39
-
40
-  void initsd();
41
-  void write_command(char *buf);
42
-  // Files auto[0-9].g on the sd card are performed in sequence.
43
-  // This is to delay autostart and hence the initialisation of
44
-  // the sd card to some seconds after the normal init, so the
45
-  // device is available soon after a reset.
46
-
47
-  void checkautostart(bool x);
48
-  void openFile(char* name, const bool read, const bool subcall=false);
49
-  void openLogFile(char* name);
50
-  void removeFile(const char * const name);
51
-  void closefile(bool store_location=false);
52
-  void release();
53
-  void openAndPrintFile(const char *name);
54
-  void startFileprint();
55
-  void stopSDPrint();
56
-  void getStatus();
57
-  void printingHasFinished();
58
-
59
-  #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
60
-    void printLongPath(char *path);
61
-  #endif
62
-
63
-  void getfilename(uint16_t nr, const char* const match=NULL);
64
-  uint16_t getnrfilenames();
65
-
66
-  void getAbsFilename(char *t);
67
-
68
-  void ls();
69
-  void chdir(const char *relpath);
70
-  int8_t updir();
71
-  void setroot();
72
-
73
-  uint16_t get_num_Files();
74
-
75
-  #if ENABLED(SDCARD_SORT_ALPHA)
76
-    void presort();
77
-    void getfilename_sorted(const uint16_t nr);
78
-    #if ENABLED(SDSORT_GCODE)
79
-      FORCE_INLINE void setSortOn(bool b) { sort_alpha = b; presort(); }
80
-      FORCE_INLINE void setSortFolders(int i) { sort_folders = i; presort(); }
81
-      //FORCE_INLINE void setSortReverse(bool b) { sort_reverse = b; }
82
-    #endif
83
-  #endif
84
-
85
-  FORCE_INLINE void pauseSDPrint() { sdprinting = false; }
86
-  FORCE_INLINE bool isFileOpen() { return file.isOpen(); }
87
-  FORCE_INLINE bool eof() { return sdpos >= filesize; }
88
-  FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); }
89
-  FORCE_INLINE void setIndex(long index) { sdpos = index; file.seekSet(index); }
90
-  FORCE_INLINE uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; }
91
-  FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; }
92
-
93
-public:
94
-  bool saving, logging, sdprinting, cardOK, filenameIsDir;
95
-  char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH];
96
-  int autostart_index;
97
-private:
98
-  SdFile root, *curDir, workDir, workDirParents[MAX_DIR_DEPTH];
99
-  uint8_t workDirDepth;
100
-
101
-  // Sort files and folders alphabetically.
102
-  #if ENABLED(SDCARD_SORT_ALPHA)
103
-    uint16_t sort_count;        // Count of sorted items in the current directory
104
-    #if ENABLED(SDSORT_GCODE)
105
-      bool sort_alpha;          // Flag to enable / disable the feature
106
-      int sort_folders;         // Flag to enable / disable folder sorting
107
-      //bool sort_reverse;      // Flag to enable / disable reverse sorting
108
-    #endif
109
-
110
-    // By default the sort index is static
111
-    #if ENABLED(SDSORT_DYNAMIC_RAM)
112
-      uint8_t *sort_order;
113
-    #else
114
-      uint8_t sort_order[SDSORT_LIMIT];
115
-    #endif
116
-
117
-    #if ENABLED(SDSORT_USES_RAM) && ENABLED(SDSORT_CACHE_NAMES) && DISABLED(SDSORT_DYNAMIC_RAM)
118
-      #define SORTED_LONGNAME_MAXLEN ((SDSORT_CACHE_VFATS) * (FILENAME_LENGTH) + 1)
119
-    #else
120
-      #define SORTED_LONGNAME_MAXLEN LONG_FILENAME_LENGTH
121
-    #endif
122
-
123
-    // Cache filenames to speed up SD menus.
124
-    #if ENABLED(SDSORT_USES_RAM)
125
-
126
-      // If using dynamic ram for names, allocate on the heap.
127
-      #if ENABLED(SDSORT_CACHE_NAMES)
128
-        #if ENABLED(SDSORT_DYNAMIC_RAM)
129
-          char **sortshort, **sortnames;
130
-        #else
131
-          char sortshort[SDSORT_LIMIT][FILENAME_LENGTH];
132
-          char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
133
-        #endif
134
-      #elif DISABLED(SDSORT_USES_STACK)
135
-        char sortnames[SDSORT_LIMIT][SORTED_LONGNAME_MAXLEN];
136
-      #endif
137
-
138
-      // Folder sorting uses an isDir array when caching items.
139
-      #if HAS_FOLDER_SORTING
140
-        #if ENABLED(SDSORT_DYNAMIC_RAM)
141
-          uint8_t *isDir;
142
-        #elif ENABLED(SDSORT_CACHE_NAMES) || DISABLED(SDSORT_USES_STACK)
143
-          uint8_t isDir[(SDSORT_LIMIT+7)>>3];
144
-        #endif
145
-      #endif
146
-
147
-    #endif // SDSORT_USES_RAM
148
-
149
-  #endif // SDCARD_SORT_ALPHA
150
-
151
-  Sd2Card card;
152
-  SdVolume volume;
153
-  SdFile file;
154
-
155
-  #define SD_PROCEDURE_DEPTH 1
156
-  #define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1)
157
-  uint8_t file_subcall_ctr;
158
-  uint32_t filespos[SD_PROCEDURE_DEPTH];
159
-  char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
160
-  uint32_t filesize, sdpos;
161
-
162
-  millis_t next_autostart_ms;
163
-  bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
164
-
165
-  LsAction lsAction; //stored for recursion.
166
-  uint16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
167
-  char* diveDirName;
168
-  void lsDive(const char *prepend, SdFile parent, const char * const match=NULL);
169
-
170
-  #if ENABLED(SDCARD_SORT_ALPHA)
171
-    void flush_presort();
172
-  #endif
173
-};
174
-
175
-#if PIN_EXISTS(SD_DETECT)
176
-  #if ENABLED(SD_DETECT_INVERTED)
177
-    #define IS_SD_INSERTED (READ(SD_DETECT_PIN) == HIGH)
178
-  #else
179
-    #define IS_SD_INSERTED (READ(SD_DETECT_PIN) == LOW)
180
-  #endif
181
-#else
182
-  // No card detect line? Assume the card is inserted.
183
-  #define IS_SD_INSERTED true
184
-#endif
185
-
186
-extern CardReader card;
187
-
188
-#endif // SDSUPPORT
189
-
190
-#if ENABLED(SDSUPPORT)
191
-  #define IS_SD_PRINTING (card.sdprinting)
192
-  #define IS_SD_FILE_OPEN (card.isFileOpen())
193
-#else
194
-  #define IS_SD_PRINTING (false)
195
-  #define IS_SD_FILE_OPEN (false)
196
-#endif
197
-
198
-#endif // _CARDREADER_H_

+ 0
- 145
Marlin/circularqueue.h View File

@@ -1,145 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef __CIRCULARQUEUE_H__
24
-#define __CIRCULARQUEUE_H__
25
-
26
-#include <Arduino.h>
27
-
28
-/**
29
- * @brief   Circular Queue class
30
- * @details Implementation of the classic ring buffer data structure
31
- */
32
-template<typename T, uint8_t N>
33
-class CircularQueue {
34
-  private:
35
-
36
-    /**
37
-     * @brief   Buffer structure
38
-     * @details This structure consolidates all the overhead required to handle
39
-     *          a circular queue such as the pointers and the buffer vector.
40
-     */
41
-    struct buffer_t {
42
-      uint8_t head;
43
-      uint8_t tail;
44
-      uint8_t count;
45
-      uint8_t size;
46
-      T queue[N];
47
-    } buffer;
48
-
49
-  public:
50
-    /**
51
-     * @brief   Class constructor
52
-     * @details This class requires two template parameters, T defines the type
53
-     *          of item this queue will handle and N defines the maximum number of
54
-     *          items that can be stored on the queue.
55
-     */
56
-    CircularQueue<T, N>() {
57
-      this->buffer.size = N;
58
-      this->buffer.count = this->buffer.head = this->buffer.tail = 0;
59
-    }
60
-
61
-    /**
62
-     * @brief   Removes and returns a item from the queue
63
-     * @details Removes the oldest item on the queue, pointed to by the
64
-     *          buffer_t head field. The item is returned to the caller.
65
-     * @return  type T item
66
-     */
67
-    T dequeue() {
68
-      if (this->isEmpty()) return T();
69
-
70
-      uint8_t index = this->buffer.head;
71
-
72
-      --this->buffer.count;
73
-      if (++this->buffer.head == this->buffer.size)
74
-        this->buffer.head = 0;
75
-
76
-      return this->buffer.queue[index];
77
-    }
78
-
79
-    /**
80
-     * @brief   Adds an item to the queue
81
-     * @details Adds an item to the queue on the location pointed by the buffer_t
82
-     *          tail variable. Returns false if no queue space is available.
83
-     * @param   item Item to be added to the queue
84
-     * @return  true if the operation was successful
85
-     */
86
-    bool enqueue(T const &item) {
87
-      if (this->isFull()) return false;
88
-
89
-      this->buffer.queue[this->buffer.tail] = item;
90
-
91
-      ++this->buffer.count;
92
-      if (++this->buffer.tail == this->buffer.size)
93
-        this->buffer.tail = 0;
94
-
95
-      return true;
96
-    }
97
-
98
-    /**
99
-     * @brief   Checks if the queue has no items
100
-     * @details Returns true if there are no items on the queue, false otherwise.
101
-     * @return  true if queue is empty
102
-     */
103
-    bool isEmpty() {
104
-      return this->buffer.count == 0;
105
-    }
106
-
107
-    /**
108
-     * @brief   Checks if the queue is full
109
-     * @details Returns true if the queue is full, false otherwise.
110
-     * @return  true if queue is full
111
-     */
112
-    bool isFull() {
113
-      return this->buffer.count == this->buffer.size;
114
-    }
115
-
116
-    /**
117
-     * @brief   Gets the queue size
118
-     * @details Returns the maximum number of items a queue can have.
119
-     * @return  the queue size
120
-     */
121
-    uint8_t size() {
122
-      return this->buffer.size;
123
-    }
124
-
125
-    /**
126
-     * @brief   Gets the next item from the queue without removing it
127
-     * @details Returns the next item in the queue without removing it
128
-     *          or updating the pointers.
129
-     * @return  first item in the queue
130
-     */
131
-    T peek() {
132
-      return this->buffer.queue[this->buffer.head];
133
-    }
134
-
135
-    /**
136
-     * @brief Gets the number of items on the queue
137
-     * @details Returns the current number of items stored on the queue.
138
-     * @return number of items in the queue
139
-     */
140
-    uint8_t count() {
141
-      return this->buffer.count;
142
-    }
143
-};
144
-
145
-#endif

+ 0
- 2139
Marlin/configuration_store.cpp
File diff suppressed because it is too large
View File


+ 0
- 82
Marlin/configuration_store.h View File

@@ -1,82 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef CONFIGURATION_STORE_H
24
-#define CONFIGURATION_STORE_H
25
-
26
-#include "MarlinConfig.h"
27
-
28
-class MarlinSettings {
29
-  public:
30
-    MarlinSettings() { }
31
-
32
-    static void reset();
33
-    static bool save();
34
-
35
-    #if ENABLED(EEPROM_SETTINGS)
36
-      static bool load();
37
-
38
-      #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
39
-                                         // That can store is enabled
40
-        FORCE_INLINE static int get_start_of_meshes() { return meshes_begin; }
41
-        FORCE_INLINE static int get_end_of_meshes() { return meshes_end; }
42
-        static int calc_num_meshes();
43
-        static void store_mesh(int8_t slot);
44
-        static void load_mesh(int8_t slot, void *into = 0);
45
-
46
-        //static void delete_mesh();    // necessary if we have a MAT
47
-        //static void defrag_meshes();  // "
48
-      #endif
49
-    #else
50
-      FORCE_INLINE
51
-      static bool load() { reset(); report(); return true; }
52
-    #endif
53
-
54
-    #if DISABLED(DISABLE_M503)
55
-      static void report(const bool forReplay=false);
56
-    #else
57
-      FORCE_INLINE
58
-      static void report(const bool forReplay=false) { UNUSED(forReplay); }
59
-    #endif
60
-
61
-  private:
62
-    static void postprocess();
63
-
64
-    #if ENABLED(EEPROM_SETTINGS)
65
-      static bool eeprom_error;
66
-
67
-      #if ENABLED(AUTO_BED_LEVELING_UBL) // Eventually make these available if any leveling system
68
-                                         // That can store is enabled
69
-        static int meshes_begin;
70
-        const static int meshes_end = E2END - 128; // 128 is a placeholder for the size of the MAT; the MAT will always
71
-                                                   // live at the very end of the eeprom
72
-
73
-      #endif
74
-
75
-      static void write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc);
76
-      static void read_data(int &pos, uint8_t *value, uint16_t size, uint16_t *crc);
77
-    #endif
78
-};
79
-
80
-extern MarlinSettings settings;
81
-
82
-#endif // CONFIGURATION_STORE_H

+ 0
- 151
Marlin/dac_mcp4728.cpp View File

@@ -1,151 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * mcp4728.cpp - Arduino library for MicroChip MCP4728 I2C D/A converter
25
- *
26
- * For implementation details, please take a look at the datasheet:
27
- * http://ww1.microchip.com/downloads/en/DeviceDoc/22187a.pdf
28
- *
29
- * For discussion and feedback, please go to:
30
- * http://arduino.cc/forum/index.php/topic,51842.0.html
31
- */
32
-
33
-#include "dac_mcp4728.h"
34
-#include "enum.h"
35
-
36
-#if ENABLED(DAC_STEPPER_CURRENT)
37
-
38
-uint16_t mcp4728_values[XYZE];
39
-
40
-/**
41
- * Begin I2C, get current values (input register and eeprom) of mcp4728
42
- */
43
-void mcp4728_init() {
44
-  Wire.begin();
45
-  Wire.requestFrom(int(DAC_DEV_ADDRESS), 24);
46
-  while (Wire.available()) {
47
-    char deviceID = Wire.read(),
48
-         hiByte = Wire.read(),
49
-         loByte = Wire.read();
50
-
51
-    if (!(deviceID & 0x08))
52
-      mcp4728_values[(deviceID & 0x30) >> 4] = word((hiByte & 0x0F), loByte);
53
-  }
54
-}
55
-
56
-/**
57
- * Write input resister value to specified channel using fastwrite method.
58
- * Channel : 0-3, Values : 0-4095
59
- */
60
-uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value) {
61
-  mcp4728_values[channel] = value;
62
-  return mcp4728_fastWrite();
63
-}
64
-
65
-/**
66
- * Write all input resistor values to EEPROM using SequencialWrite method.
67
- * This will update both input register and EEPROM value
68
- * This will also write current Vref, PowerDown, Gain settings to EEPROM
69
- */
70
-uint8_t mcp4728_eepromWrite() {
71
-  Wire.beginTransmission(DAC_DEV_ADDRESS);
72
-  Wire.write(SEQWRITE);
73
-  LOOP_XYZE(i) {
74
-    Wire.write(DAC_STEPPER_VREF << 7 | DAC_STEPPER_GAIN << 4 | highByte(mcp4728_values[i]));
75
-    Wire.write(lowByte(mcp4728_values[i]));
76
-  }
77
-  return Wire.endTransmission();
78
-}
79
-
80
-/**
81
- * Write Voltage reference setting to all input regiters
82
- */
83
-uint8_t mcp4728_setVref_all(uint8_t value) {
84
-  Wire.beginTransmission(DAC_DEV_ADDRESS);
85
-  Wire.write(VREFWRITE | (value ? 0x0F : 0x00));
86
-  return Wire.endTransmission();
87
-}
88
-/**
89
- * Write Gain setting to all input regiters
90
- */
91
-uint8_t mcp4728_setGain_all(uint8_t value) {
92
-  Wire.beginTransmission(DAC_DEV_ADDRESS);
93
-  Wire.write(GAINWRITE | (value ? 0x0F : 0x00));
94
-  return Wire.endTransmission();
95
-}
96
-
97
-/**
98
- * Return Input Register value
99
- */
100
-uint16_t mcp4728_getValue(uint8_t channel) { return mcp4728_values[channel]; }
101
-
102
-/**
103
- * Steph: Might be useful in the future
104
- * Return Vout
105
- *
106
-uint16_t mcp4728_getVout(uint8_t channel) {
107
-  uint32_t vref = 2048,
108
-           vOut = (vref * mcp4728_values[channel] * (_DAC_STEPPER_GAIN + 1)) / 4096;
109
-  if (vOut > defaultVDD) vOut = defaultVDD;
110
-  return vOut;
111
-}
112
-*/
113
-
114
-/**
115
- * Returns DAC values as a 0-100 percentage of drive strength
116
- */
117
-uint8_t mcp4728_getDrvPct(uint8_t channel) { return uint8_t(100.0 * mcp4728_values[channel] / (DAC_STEPPER_MAX) + 0.5); }
118
-
119
-/**
120
- * Receives all Drive strengths as 0-100 percent values, updates
121
- * DAC Values array and calls fastwrite to update the DAC.
122
- */
123
-void mcp4728_setDrvPct(uint8_t pct[XYZE]) {
124
-  LOOP_XYZE(i) mcp4728_values[i] = 0.01 * pct[i] * (DAC_STEPPER_MAX);
125
-  mcp4728_fastWrite();
126
-}
127
-
128
-/**
129
- * FastWrite input register values - All DAC ouput update. refer to DATASHEET 5.6.1
130
- * DAC Input and PowerDown bits update.
131
- * No EEPROM update
132
- */
133
-uint8_t mcp4728_fastWrite() {
134
-  Wire.beginTransmission(DAC_DEV_ADDRESS);
135
-  LOOP_XYZE(i) {
136
-    Wire.write(highByte(mcp4728_values[i]));
137
-    Wire.write(lowByte(mcp4728_values[i]));
138
-  }
139
-  return Wire.endTransmission();
140
-}
141
-
142
-/**
143
- * Common function for simple general commands
144
- */
145
-uint8_t mcp4728_simpleCommand(byte simpleCommand) {
146
-  Wire.beginTransmission(GENERALCALL);
147
-  Wire.write(simpleCommand);
148
-  return Wire.endTransmission();
149
-}
150
-
151
-#endif // DAC_STEPPER_CURRENT

+ 0
- 66
Marlin/dac_mcp4728.h View File

@@ -1,66 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Arduino library for MicroChip MCP4728 I2C D/A converter.
25
- */
26
-
27
-#ifndef DAC_MCP4728_H
28
-#define DAC_MCP4728_H
29
-
30
-#include "MarlinConfig.h"
31
-
32
-#if ENABLED(DAC_STEPPER_CURRENT)
33
-#include "Wire.h"
34
-
35
-#define defaultVDD     DAC_STEPPER_MAX //was 5000 but differs with internal Vref
36
-#define BASE_ADDR      0x60
37
-#define RESET          0B00000110
38
-#define WAKE           0B00001001
39
-#define UPDATE         0B00001000
40
-#define MULTIWRITE     0B01000000
41
-#define SINGLEWRITE    0B01011000
42
-#define SEQWRITE       0B01010000
43
-#define VREFWRITE      0B10000000
44
-#define GAINWRITE      0B11000000
45
-#define POWERDOWNWRITE 0B10100000
46
-#define GENERALCALL    0B00000000
47
-#define GAINWRITE      0B11000000
48
-
49
-// This is taken from the original lib, makes it easy to edit if needed
50
-// DAC_OR_ADDRESS defined in pins_BOARD.h  file
51
-#define DAC_DEV_ADDRESS (BASE_ADDR | DAC_OR_ADDRESS)
52
-
53
-
54
-void mcp4728_init();
55
-uint8_t mcp4728_analogWrite(uint8_t channel, uint16_t value);
56
-uint8_t mcp4728_eepromWrite();
57
-uint8_t mcp4728_setVref_all(uint8_t value);
58
-uint8_t mcp4728_setGain_all(uint8_t value);
59
-uint16_t mcp4728_getValue(uint8_t channel);
60
-uint8_t mcp4728_fastWrite();
61
-uint8_t mcp4728_simpleCommand(byte simpleCommand);
62
-uint8_t mcp4728_getDrvPct(uint8_t channel);
63
-void mcp4728_setDrvPct(uint8_t pct[XYZE]);
64
-
65
-#endif
66
-#endif // DAC_MCP4728_H

+ 0
- 106
Marlin/digipot_mcp4018.cpp View File

@@ -1,106 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#include "MarlinConfig.h"
24
-
25
-#if ENABLED(DIGIPOT_I2C) && ENABLED(DIGIPOT_MCP4018)
26
-
27
-#include "enum.h"
28
-#include "Stream.h"
29
-#include "utility/twi.h"
30
-#include <SlowSoftI2CMaster.h>  //https://github.com/stawel/SlowSoftI2CMaster
31
-
32
-// Settings for the I2C based DIGIPOT (MCP4018) based on WT150
33
-
34
-#define DIGIPOT_I2C_ADDRESS             0x2F
35
-
36
-#define DIGIPOT_A4988_Rsx               0.250
37
-#define DIGIPOT_A4988_Vrefmax           1.666
38
-#define DIGIPOT_A4988_MAX_VALUE         127
39
-
40
-#define DIGIPOT_A4988_Itripmax(Vref)    ((Vref)/(8.0*DIGIPOT_A4988_Rsx))
41
-
42
-#define DIGIPOT_A4988_FACTOR            ((DIGIPOT_A4988_MAX_VALUE)/DIGIPOT_A4988_Itripmax(DIGIPOT_A4988_Vrefmax))
43
-#define DIGIPOT_A4988_MAX_CURRENT       2.0
44
-
45
-static byte current_to_wiper(const float current) {
46
-  const int16_t value = ceil(float(DIGIPOT_A4988_FACTOR) * current);
47
-  return byte(constrain(value, 0, DIGIPOT_A4988_MAX_VALUE));
48
-}
49
-
50
-const uint8_t sda_pins[DIGIPOT_I2C_NUM_CHANNELS] = {
51
-  DIGIPOTS_I2C_SDA_X
52
-  #if DIGIPOT_I2C_NUM_CHANNELS > 1
53
-    , DIGIPOTS_I2C_SDA_Y
54
-    #if DIGIPOT_I2C_NUM_CHANNELS > 2
55
-      , DIGIPOTS_I2C_SDA_Z
56
-      #if DIGIPOT_I2C_NUM_CHANNELS > 3
57
-        , DIGIPOTS_I2C_SDA_E0
58
-        #if DIGIPOT_I2C_NUM_CHANNELS > 4
59
-          , DIGIPOTS_I2C_SDA_E1
60
-        #endif
61
-      #endif
62
-    #endif
63
-  #endif
64
-};
65
-
66
-static SlowSoftI2CMaster pots[DIGIPOT_I2C_NUM_CHANNELS] = {
67
-  SlowSoftI2CMaster { sda_pins[X_AXIS], DIGIPOTS_I2C_SCL }
68
-  #if DIGIPOT_I2C_NUM_CHANNELS > 1
69
-    , SlowSoftI2CMaster { sda_pins[Y_AXIS], DIGIPOTS_I2C_SCL }
70
-    #if DIGIPOT_I2C_NUM_CHANNELS > 2
71
-      , SlowSoftI2CMaster { sda_pins[Z_AXIS], DIGIPOTS_I2C_SCL }
72
-      #if DIGIPOT_I2C_NUM_CHANNELS > 3
73
-        , SlowSoftI2CMaster { sda_pins[E_AXIS], DIGIPOTS_I2C_SCL }
74
-        #if DIGIPOT_I2C_NUM_CHANNELS > 4
75
-          , SlowSoftI2CMaster { sda_pins[E_AXIS + 1], DIGIPOTS_I2C_SCL }
76
-        #endif
77
-      #endif
78
-    #endif
79
-  #endif
80
-};
81
-
82
-static void i2c_send(const uint8_t channel, const byte v) {
83
-  if (WITHIN(channel, 0, DIGIPOT_I2C_NUM_CHANNELS - 1)) {
84
-    pots[channel].i2c_start(((DIGIPOT_I2C_ADDRESS) << 1) | I2C_WRITE);
85
-    pots[channel].i2c_write(v);
86
-    pots[channel].i2c_stop();
87
-  }
88
-}
89
-
90
-// This is for the MCP4018 I2C based digipot
91
-void digipot_i2c_set_current(uint8_t channel, float current) {
92
-  i2c_send(channel, current_to_wiper(min(max(current, 0.0f), float(DIGIPOT_A4988_MAX_CURRENT))));
93
-}
94
-
95
-void digipot_i2c_init() {
96
-  static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
97
-
98
-  for (uint8_t i = 0; i < DIGIPOT_I2C_NUM_CHANNELS; i++)
99
-    pots[i].i2c_init();
100
-
101
-  // setup initial currents as defined in Configuration_adv.h
102
-  for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
103
-    digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
104
-}
105
-
106
-#endif // DIGIPOT_I2C && DIGIPOT_MCP4018

+ 0
- 79
Marlin/digipot_mcp4451.cpp View File

@@ -1,79 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#include "MarlinConfig.h"
24
-
25
-#if ENABLED(DIGIPOT_I2C) && DISABLED(DIGIPOT_MCP4018)
26
-
27
-#include "Stream.h"
28
-#include "utility/twi.h"
29
-#include "Wire.h"
30
-
31
-// Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro
32
-#if MB(5DPRINT)
33
-  #define DIGIPOT_I2C_FACTOR 117.96
34
-  #define DIGIPOT_I2C_MAX_CURRENT 1.736
35
-#else
36
-  #define DIGIPOT_I2C_FACTOR 106.7
37
-  #define DIGIPOT_I2C_MAX_CURRENT 2.5
38
-#endif
39
-
40
-static byte current_to_wiper(const float current) {
41
-  return byte(CEIL(float((DIGIPOT_I2C_FACTOR * current))));
42
-}
43
-
44
-static void i2c_send(const byte addr, const byte a, const byte b) {
45
-  Wire.beginTransmission(addr);
46
-  Wire.write(a);
47
-  Wire.write(b);
48
-  Wire.endTransmission();
49
-}
50
-
51
-// This is for the MCP4451 I2C based digipot
52
-void digipot_i2c_set_current(uint8_t channel, float current) {
53
-  current = min((float) max(current, 0.0f), DIGIPOT_I2C_MAX_CURRENT);
54
-  // these addresses are specific to Azteeg X3 Pro, can be set to others,
55
-  // In this case first digipot is at address A0=0, A1= 0, second one is at A0=0, A1= 1
56
-  byte addr = 0x2C; // channel 0-3
57
-  if (channel >= 4) {
58
-    addr = 0x2E; // channel 4-7
59
-    channel -= 4;
60
-  }
61
-
62
-  // Initial setup
63
-  i2c_send(addr, 0x40, 0xFF);
64
-  i2c_send(addr, 0xA0, 0xFF);
65
-
66
-  // Set actual wiper value
67
-  byte addresses[4] = { 0x00, 0x10, 0x60, 0x70 };
68
-  i2c_send(addr, addresses[channel], current_to_wiper(current));
69
-}
70
-
71
-void digipot_i2c_init() {
72
-  static const float digipot_motor_current[] PROGMEM = DIGIPOT_I2C_MOTOR_CURRENTS;
73
-  Wire.begin();
74
-  // setup initial currents as defined in Configuration_adv.h
75
-  for (uint8_t i = 0; i < COUNT(digipot_motor_current); i++)
76
-    digipot_i2c_set_current(i, pgm_read_float(&digipot_motor_current[i]));
77
-}
78
-
79
-#endif // DIGIPOT_I2C

+ 0
- 563
Marlin/dogm_bitmaps.h View File

@@ -1,563 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Standard Marlin Bitmap for splashscreen
25
- *
26
- * You may use one of the following tools to generate the C++ bitmap array from
27
- * a black and white image:
28
- *
29
- *  - http://www.marlinfw.org/tools/u8glib/converter.html
30
- *  - http://www.digole.com/tools/PicturetoC_Hex_converter.php
31
- *
32
- * Please note that using the high-res version takes 402Bytes of PROGMEM.
33
- */
34
-
35
-//#define START_BMPHIGH
36
-
37
-#if ENABLED(SHOW_BOOTSCREEN)
38
-  #if ENABLED(START_BMPHIGH)
39
-    #define START_BMPWIDTH      112
40
-    #define START_BMPHEIGHT      38
41
-
42
-    const unsigned char start_bmp[] PROGMEM = {
43
-      0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
44
-      0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
45
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF,
46
-      0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF,
47
-      0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF,
48
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
49
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF,
50
-      0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x3F, 0xFF,
51
-      0xC0, 0x0F, 0xC0, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x00, 0x1F, 0xFF,
52
-      0xC0, 0x3F, 0xE1, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x0F, 0xFF,
53
-      0xC0, 0x7F, 0xF3, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x07, 0xFF,
54
-      0xC0, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x03, 0xFF,
55
-      0xC1, 0xF8, 0x7F, 0x87, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xFF,
56
-      0xC1, 0xF0, 0x3F, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xFF,
57
-      0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x1F, 0x00, 0x03, 0xE0, 0x78, 0x3C, 0x03, 0xF0, 0x7F,
58
-      0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0xC0, 0x0F, 0xF8, 0x78, 0x3C, 0x07, 0xFC, 0x3F,
59
-      0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0xE0, 0x1F, 0xFC, 0x78, 0x3C, 0x0F, 0xFE, 0x1F,
60
-      0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0xF0, 0x3F, 0xFE, 0x78, 0x3C, 0x1F, 0xFE, 0x0F,
61
-      0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xF3, 0xF8, 0x3F, 0x3E, 0x78, 0x3C, 0x3F, 0x3F, 0x07,
62
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xE0, 0xFC, 0x7C, 0x1F, 0x78, 0x3C, 0x3E, 0x1F, 0x07,
63
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x7C, 0x7C, 0x0F, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
64
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x7C, 0x78, 0x0F, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
65
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
66
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
67
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
68
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
69
-      0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xE0, 0x3C, 0x78, 0x00, 0x7C, 0x3C, 0x3C, 0x0F, 0x03,
70
-      0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0x3F, 0xF8, 0x00, 0x7F, 0xBC, 0x3C, 0x0F, 0x03,
71
-      0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0x3F, 0xF8, 0x00, 0x3F, 0xBF, 0xFC, 0x0F, 0x03,
72
-      0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0xFF, 0x3F, 0xF8, 0x00, 0x1F, 0xBF, 0xFC, 0x0F, 0x03,
73
-      0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0x3F, 0xF8, 0x00, 0x0F, 0xBF, 0xFC, 0x0F, 0x03,
74
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
75
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
76
-      0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E,
77
-      0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
78
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
79
-      0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
80
-      0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80 };
81
-  #else
82
-    #define START_BMPWIDTH      56
83
-    #define START_BMPHEIGHT     19
84
-
85
-    const unsigned char start_bmp[] PROGMEM = {
86
-      0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
87
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF,
88
-      0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
89
-      0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F,
90
-      0x83, 0xCF, 0x00, 0x00, 0x0C, 0x30, 0x3F,
91
-      0x87, 0xFF, 0x80, 0x00, 0x0C, 0x30, 0x1F,
92
-      0x86, 0x79, 0x80, 0x00, 0x0C, 0x00, 0x0F,
93
-      0x8C, 0x30, 0xC7, 0x83, 0x8C, 0x30, 0xE7,
94
-      0x8C, 0x30, 0xCF, 0xC7, 0xCC, 0x31, 0xF3,
95
-      0x8C, 0x30, 0xDC, 0xEC, 0xEC, 0x33, 0xB9,
96
-      0x8C, 0x30, 0xD8, 0x6C, 0x6C, 0x33, 0x19,
97
-      0x8C, 0x30, 0xD0, 0x6C, 0x0C, 0x33, 0x19,
98
-      0x8C, 0x30, 0xD8, 0x6C, 0x0C, 0x33, 0x19,
99
-      0x8C, 0x30, 0xDC, 0x6C, 0x0E, 0x3B, 0x19,
100
-      0x8C, 0x30, 0xCF, 0x7C, 0x07, 0x9F, 0x19,
101
-      0x8C, 0x30, 0xC7, 0x7C, 0x03, 0x8F, 0x19,
102
-      0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
103
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
104
-      0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8 };
105
-  #endif
106
-#endif
107
-
108
-// Here comes a compile-time operation to match the extruder symbols
109
-// on the info screen to the set number of extruders in configuration.h
110
-//
111
-// When only one extruder is selected, the "1" on the symbol will not
112
-// be displayed.
113
-
114
-#define STATUS_SCREENWIDTH     115 // Width in pixels
115
-#define STATUS_SCREENHEIGHT     19 // Height in pixels
116
-
117
-#if HAS_TEMP_BED
118
-  #if HOTENDS == 0
119
-    const unsigned char status_screen0_bmp[] PROGMEM = {
120
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
121
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
122
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
123
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
124
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
125
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
126
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
127
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
128
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
129
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
130
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
131
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
132
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
133
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
134
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
135
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
136
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
137
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
138
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
139
-    };
140
-    const unsigned char status_screen1_bmp[] PROGMEM = {
141
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
142
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
143
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
144
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
145
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
146
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
147
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
148
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
149
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
150
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
151
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
152
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
153
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
154
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
155
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
156
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
157
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
158
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
159
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
160
-    };
161
-  #elif HOTENDS == 1
162
-    const unsigned char status_screen0_bmp[] PROGMEM = {
163
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
164
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
165
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
166
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
167
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
168
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
169
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
170
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
171
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
172
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
173
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
174
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
175
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
176
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
177
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
178
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
179
-      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
180
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
181
-      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
182
-    };
183
-
184
-    const unsigned char status_screen1_bmp[] PROGMEM = {
185
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
186
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
187
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
188
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
189
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
190
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
191
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
192
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
193
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
194
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
195
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
196
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
197
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
198
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
199
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
200
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
201
-      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
202
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
203
-      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
204
-    };
205
-  #elif HOTENDS == 2
206
-    const unsigned char status_screen0_bmp[] PROGMEM = {
207
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
208
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
209
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
210
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
211
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
212
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
213
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
214
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
215
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
216
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
217
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
218
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
219
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
220
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
221
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
222
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
223
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
224
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
225
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
226
-    };
227
-
228
-    const unsigned char status_screen1_bmp[] PROGMEM = {
229
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
230
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
231
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
232
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
233
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
234
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
235
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
236
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
237
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
238
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
239
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
240
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
241
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
242
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
243
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
244
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
245
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
246
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
247
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
248
-    };
249
-  #else
250
-    const unsigned char status_screen0_bmp[] PROGMEM = {
251
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
252
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
253
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
254
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
255
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
256
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
257
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
258
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
259
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
260
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
261
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
262
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
263
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
264
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
265
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
266
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
267
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
268
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
269
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
270
-    };
271
-
272
-    const unsigned char status_screen1_bmp[] PROGMEM = {
273
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
274
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
275
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
276
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
277
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
278
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
279
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
280
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
281
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
282
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
283
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
284
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
285
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
286
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
287
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
288
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
289
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
290
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
291
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
292
-    };
293
-  #endif // HOTENDS
294
-#else
295
-  #if HOTENDS == 0
296
-    const unsigned char status_screen0_bmp[] PROGMEM = {
297
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
298
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
299
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
300
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
301
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
302
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
303
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
304
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
305
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
306
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
307
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
308
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
309
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
310
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
311
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
312
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
313
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
314
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
315
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
316
-    };
317
-    const unsigned char status_screen1_bmp[] PROGMEM = {
318
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
319
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
320
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
321
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
322
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
323
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
324
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
325
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
326
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
327
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
328
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
329
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
330
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
331
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
332
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
333
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
334
-      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
335
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
336
-      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
337
-    };
338
-  #elif HOTENDS == 1
339
-    const unsigned char status_screen0_bmp[] PROGMEM = {
340
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
341
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
342
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
343
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
344
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
345
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
346
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
347
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
348
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
349
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
350
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
351
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
352
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
353
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
354
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
355
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
356
-      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
357
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
358
-      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
359
-    };
360
-
361
-    const unsigned char status_screen1_bmp[] PROGMEM = {
362
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
363
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
364
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
365
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
366
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
367
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
368
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
369
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
370
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
371
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
372
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
373
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
374
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
375
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
376
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
377
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
378
-      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
379
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
380
-      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
381
-    };
382
-  #elif HOTENDS == 2
383
-    const unsigned char status_screen0_bmp[] PROGMEM = {
384
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
385
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
386
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
387
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
388
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
389
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
390
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
391
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
392
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
393
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
394
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
395
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
396
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
397
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
398
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
399
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
400
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
401
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
402
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
403
-    };
404
-
405
-    const unsigned char status_screen1_bmp[] PROGMEM = {
406
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
407
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
408
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
409
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
410
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
411
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
412
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
413
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
414
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
415
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
416
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
417
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
418
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
419
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
420
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
421
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
422
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
423
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
424
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
425
-    };
426
-  #else
427
-    const unsigned char status_screen0_bmp[] PROGMEM = {
428
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
429
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
430
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
431
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
432
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
433
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
434
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
435
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
436
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
437
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
438
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
439
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
440
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
441
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
442
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
443
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
444
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
445
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
446
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
447
-    };
448
-
449
-    const unsigned char status_screen1_bmp[] PROGMEM = {
450
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
451
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
452
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
453
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
454
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
455
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
456
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
457
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
458
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
459
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
460
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
461
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
462
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
463
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
464
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
465
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
466
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
467
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
468
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
469
-    };
470
-  #endif // HOTENDS
471
-#endif // HAS_TEMP_BED
472
-
473
-#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY)
474
-
475
-  const unsigned char cw_bmp[] PROGMEM = {
476
-    0x03,0xF8,0x00, // 000000111111100000000000
477
-    0x0F,0xF7,0x00, // 000011111111111000000000
478
-    0x17,0x0F,0x00, // 000111100000111100000000
479
-    0x38,0x07,0x00, // 001110000000011100000000
480
-    0x38,0x03,0x80, // 001110000000001110000000
481
-    0x70,0x03,0x80, // 011100000000001110000000
482
-    0x70,0x0F,0xE0, // 011100000000111111100000
483
-    0x70,0x07,0xC0, // 011100000000011111000000
484
-    0x70,0x03,0x80, // 011100000000001110000000
485
-    0x70,0x01,0x00, // 011100000000000100000000
486
-    0x70,0x00,0x00, // 011100000000000000000000
487
-    0x68,0x00,0x00, // 001110000000000000000000
488
-    0x38,0x07,0x00, // 001110000000011100000000
489
-    0x17,0x0F,0x00, // 000111100000111100000000
490
-    0x0F,0xFE,0x00, // 000011111111111000000000
491
-    0x03,0xF8,0x00  // 000000111111100000000000
492
-  };
493
-
494
-  const unsigned char ccw_bmp[] PROGMEM = {
495
-    0x00,0xFE,0x00, // 000000001111111000000000
496
-    0x03,0xFF,0x80, // 000000111111111110000000
497
-    0x07,0x83,0xC0, // 000001111000001111000000
498
-    0x0E,0x01,0xC0, // 000011100000000111000000
499
-    0x0E,0x00,0xE0, // 000011100000000011100000
500
-    0x1C,0x00,0xE0, // 000111000000000011100000
501
-    0x7F,0x00,0xE0, // 011111110000000011100000
502
-    0x3E,0x00,0xE0, // 001111100000000011100000
503
-    0x1C,0x00,0xE0, // 000111000000000011100000
504
-    0x08,0x00,0xE0, // 000010000000000011100000
505
-    0x00,0x00,0xE0, // 000000000000000011100000
506
-    0x00,0x01,0xC0, // 000000000000000111000000
507
-    0x0E,0x01,0xC0, // 000011100000000111000000
508
-    0x0F,0x07,0x80, // 000011110000011110000000
509
-    0x07,0xFF,0x00, // 000001111111111100000000
510
-    0x01,0xFC,0x00  // 000000011111110000000000
511
-  };
512
-
513
-  const unsigned char up_arrow_bmp[] PROGMEM = {
514
-    0x04,0x00, // 000001000000
515
-    0x0E,0x00, // 000011100000
516
-    0x1F,0x00, // 000111110000
517
-    0x3F,0x80, // 001111111000
518
-    0x7F,0xC0, // 011111111100
519
-    0x0E,0x00, // 000011100000
520
-    0x0E,0x00, // 000011100000
521
-    0x0E,0x00, // 000011100000
522
-    0x0E,0x00, // 000011100000
523
-    0x0E,0x00, // 000011100000
524
-    0x0E,0x00, // 000011100000
525
-    0x0E,0x00, // 000011100000
526
-    0x0E,0x00  // 000011100000
527
-  };
528
-
529
-  const unsigned char down_arrow_bmp[] PROGMEM = {
530
-    0x0E,0x00, // 000011100000
531
-    0x0E,0x00, // 000011100000
532
-    0x0E,0x00, // 000011100000
533
-    0x0E,0x00, // 000011100000
534
-    0x0E,0x00, // 000011100000
535
-    0x0E,0x00, // 000011100000
536
-    0x0E,0x00, // 000011100000
537
-    0x0E,0x00, // 000011100000
538
-    0x7F,0xC0, // 011111111100
539
-    0x3F,0x80, // 001111111000
540
-    0x1F,0x00, // 000111110000
541
-    0x0E,0x00, // 000011100000
542
-    0x04,0x00  // 000001000000
543
-  };
544
-
545
-  const unsigned char offset_bedline_bmp[] PROGMEM = {
546
-    0xFF,0xFF,0xFF // 111111111111111111111111
547
-  };
548
-
549
-  const unsigned char nozzle_bmp[] PROGMEM = {
550
-    0x7F,0x80, // 0111111110000000
551
-    0xFF,0xC0, // 1111111111000000
552
-    0xFF,0xC0, // 1111111111000000
553
-    0xFF,0xC0, // 1111111111000000
554
-    0x7F,0x80, // 0111111110000000
555
-    0x7F,0x80, // 0111111110000000
556
-    0xFF,0xC0, // 1111111111000000
557
-    0xFF,0xC0, // 1111111111000000
558
-    0xFF,0xC0, // 1111111111000000
559
-    0x3F,0x00, // 0011111100000000
560
-    0x1E,0x00, // 0001111000000000
561
-    0x0C,0x00  // 0000110000000000
562
-  };
563
-#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY

+ 0
- 180
Marlin/dogm_font_data_6x9_marlin.h View File

@@ -1,180 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  Fontname: -Misc-Fixed-Medium-R-Normal--9-90-75-75-C-60-ISO10646-1
25
-  Copyright: Public domain font.  Share and enjoy.
26
-  Capital A Height: 6, '1' Height: 6
27
-  Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 7 len= 9
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-2 dx= 0 dy= 0
30
-  Pure Font   ascent = 6 descent=-2
31
-  X Font      ascent = 6 descent=-2
32
-  Max Font    ascent = 7 descent=-2
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t u8g_font_6x9[2300] U8G_SECTION(".progmem.u8g_font_6x9") = {
36
-  0, 6, 9, 0, 254, 6, 1, 137, 2, 254, 32, 255, 254, 7, 254, 6,
37
-  254, 0, 0, 0, 6, 0, 7, 1, 6, 6, 6, 2, 0, 128, 128, 128,
38
-  128, 0, 128, 3, 3, 3, 6, 1, 3, 160, 160, 160, 5, 7, 7, 6,
39
-  0, 255, 80, 80, 248, 80, 248, 80, 80, 5, 9, 9, 6, 0, 254, 32,
40
-  112, 168, 160, 112, 40, 168, 112, 32, 6, 8, 8, 6, 0, 255, 64, 168,
41
-  72, 16, 32, 72, 84, 8, 5, 7, 7, 6, 0, 255, 96, 144, 144, 96,
42
-  152, 144, 104, 1, 3, 3, 6, 2, 3, 128, 128, 128, 2, 7, 7, 6,
43
-  2, 255, 64, 128, 128, 128, 128, 128, 64, 2, 7, 7, 6, 2, 255, 128,
44
-  64, 64, 64, 64, 64, 128, 5, 5, 5, 6, 0, 0, 136, 80, 248, 80,
45
-  136, 5, 5, 5, 6, 0, 0, 32, 32, 248, 32, 32, 2, 4, 4, 6,
46
-  2, 254, 192, 64, 64, 128, 5, 1, 1, 6, 0, 2, 248, 2, 2, 2,
47
-  6, 2, 0, 192, 192, 4, 6, 6, 6, 1, 0, 16, 16, 32, 64, 128,
48
-  128, 4, 6, 6, 6, 1, 0, 96, 144, 144, 144, 144, 96, 3, 6, 6,
49
-  6, 1, 0, 64, 192, 64, 64, 64, 224, 4, 6, 6, 6, 1, 0, 96,
50
-  144, 16, 32, 64, 240, 4, 6, 6, 6, 1, 0, 240, 32, 96, 16, 16,
51
-  224, 5, 6, 6, 6, 0, 0, 16, 48, 80, 144, 248, 16, 4, 6, 6,
52
-  6, 1, 0, 240, 128, 224, 16, 16, 224, 4, 6, 6, 6, 1, 0, 96,
53
-  128, 224, 144, 144, 96, 4, 6, 6, 6, 1, 0, 240, 16, 16, 32, 64,
54
-  64, 4, 6, 6, 6, 1, 0, 96, 144, 96, 144, 144, 96, 4, 6, 6,
55
-  6, 1, 0, 96, 144, 144, 112, 16, 96, 2, 5, 5, 6, 2, 0, 192,
56
-  192, 0, 192, 192, 2, 7, 7, 6, 2, 254, 192, 192, 0, 192, 64, 64,
57
-  128, 5, 5, 5, 6, 0, 0, 24, 96, 128, 96, 24, 5, 3, 3, 6,
58
-  0, 1, 248, 0, 248, 5, 5, 5, 6, 0, 0, 192, 48, 8, 48, 192,
59
-  4, 7, 7, 6, 1, 0, 96, 144, 16, 96, 64, 0, 64, 5, 6, 6,
60
-  6, 0, 0, 112, 144, 168, 176, 128, 112, 5, 6, 6, 6, 0, 0, 32,
61
-  80, 136, 248, 136, 136, 5, 6, 6, 6, 0, 0, 240, 136, 240, 136, 136,
62
-  240, 4, 6, 6, 6, 1, 0, 96, 144, 128, 128, 144, 96, 4, 6, 6,
63
-  6, 1, 0, 224, 144, 144, 144, 144, 224, 4, 6, 6, 6, 1, 0, 240,
64
-  128, 224, 128, 128, 240, 4, 6, 6, 6, 1, 0, 240, 128, 224, 128, 128,
65
-  128, 4, 6, 6, 6, 1, 0, 96, 144, 128, 176, 144, 96, 4, 6, 6,
66
-  6, 1, 0, 144, 144, 240, 144, 144, 144, 3, 6, 6, 6, 1, 0, 224,
67
-  64, 64, 64, 64, 224, 5, 6, 6, 6, 0, 0, 56, 16, 16, 16, 144,
68
-  96, 4, 6, 6, 6, 1, 0, 144, 160, 192, 160, 144, 144, 4, 6, 6,
69
-  6, 1, 0, 128, 128, 128, 128, 128, 240, 5, 6, 6, 6, 0, 0, 136,
70
-  216, 168, 168, 136, 136, 4, 6, 6, 6, 1, 0, 144, 208, 176, 144, 144,
71
-  144, 5, 6, 6, 6, 0, 0, 112, 136, 136, 136, 136, 112, 4, 6, 6,
72
-  6, 1, 0, 224, 144, 144, 224, 128, 128, 4, 7, 7, 6, 1, 255, 96,
73
-  144, 144, 208, 176, 96, 16, 4, 6, 6, 6, 1, 0, 224, 144, 144, 224,
74
-  144, 144, 4, 6, 6, 6, 1, 0, 96, 144, 64, 32, 144, 96, 5, 6,
75
-  6, 6, 0, 0, 248, 32, 32, 32, 32, 32, 4, 6, 6, 6, 1, 0,
76
-  144, 144, 144, 144, 144, 96, 4, 6, 6, 6, 1, 0, 144, 144, 144, 240,
77
-  96, 96, 5, 6, 6, 6, 0, 0, 136, 136, 168, 168, 216, 136, 5, 6,
78
-  6, 6, 0, 0, 136, 80, 32, 32, 80, 136, 5, 6, 6, 6, 0, 0,
79
-  136, 136, 80, 32, 32, 32, 4, 6, 6, 6, 1, 0, 240, 16, 32, 64,
80
-  128, 240, 3, 6, 6, 6, 1, 0, 224, 128, 128, 128, 128, 224, 4, 6,
81
-  6, 6, 1, 0, 128, 128, 64, 32, 16, 16, 3, 6, 6, 6, 1, 0,
82
-  224, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 3, 32, 80, 136, 5,
83
-  1, 1, 6, 0, 254, 248, 2, 2, 2, 6, 2, 4, 128, 64, 4, 4,
84
-  4, 6, 1, 0, 112, 144, 144, 112, 4, 6, 6, 6, 1, 0, 128, 128,
85
-  224, 144, 144, 224, 4, 4, 4, 6, 1, 0, 112, 128, 128, 112, 4, 6,
86
-  6, 6, 1, 0, 16, 16, 112, 144, 144, 112, 4, 4, 4, 6, 1, 0,
87
-  96, 176, 192, 112, 4, 6, 6, 6, 1, 0, 32, 80, 64, 224, 64, 64,
88
-  4, 6, 6, 6, 1, 254, 96, 144, 144, 112, 16, 96, 4, 6, 6, 6,
89
-  1, 0, 128, 128, 224, 144, 144, 144, 3, 6, 6, 6, 1, 0, 64, 0,
90
-  192, 64, 64, 224, 3, 8, 8, 6, 1, 254, 32, 0, 96, 32, 32, 32,
91
-  160, 64, 4, 6, 6, 6, 1, 0, 128, 128, 160, 192, 160, 144, 3, 6,
92
-  6, 6, 1, 0, 192, 64, 64, 64, 64, 224, 5, 4, 4, 6, 0, 0,
93
-  208, 168, 168, 136, 4, 4, 4, 6, 1, 0, 224, 144, 144, 144, 4, 4,
94
-  4, 6, 1, 0, 96, 144, 144, 96, 4, 6, 6, 6, 1, 254, 224, 144,
95
-  144, 224, 128, 128, 4, 6, 6, 6, 1, 254, 112, 144, 144, 112, 16, 16,
96
-  4, 4, 4, 6, 1, 0, 160, 208, 128, 128, 4, 4, 4, 6, 1, 0,
97
-  112, 192, 48, 224, 4, 6, 6, 6, 1, 0, 64, 64, 224, 64, 80, 32,
98
-  4, 4, 4, 6, 1, 0, 144, 144, 144, 112, 4, 4, 4, 6, 1, 0,
99
-  144, 144, 96, 96, 5, 4, 4, 6, 0, 0, 136, 168, 168, 80, 4, 4,
100
-  4, 6, 1, 0, 144, 96, 96, 144, 4, 6, 6, 6, 1, 254, 144, 144,
101
-  144, 112, 144, 96, 4, 4, 4, 6, 1, 0, 240, 32, 64, 240, 3, 7,
102
-  7, 6, 1, 0, 32, 64, 64, 128, 64, 64, 32, 1, 7, 7, 6, 2,
103
-  255, 128, 128, 128, 128, 128, 128, 128, 3, 7, 7, 6, 1, 0, 128, 64,
104
-  64, 32, 64, 64, 128, 4, 2, 2, 6, 1, 3, 80, 160, 255, 255, 255,
105
-  255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
106
-  255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0,
107
-  0, 6, 0, 7, 1, 6, 6, 6, 2, 0, 128, 0, 128, 128, 128, 128,
108
-  4, 6, 6, 6, 1, 255, 32, 112, 160, 160, 112, 32, 5, 7, 7, 6,
109
-  0, 255, 48, 72, 64, 240, 64, 64, 248, 5, 5, 5, 6, 0, 0, 168,
110
-  80, 136, 80, 168, 5, 6, 6, 6, 0, 0, 136, 80, 248, 32, 248, 32,
111
-  1, 7, 7, 6, 2, 255, 128, 128, 128, 0, 128, 128, 128, 4, 7, 7,
112
-  6, 1, 255, 112, 128, 96, 144, 96, 16, 224, 3, 1, 1, 6, 1, 5,
113
-  160, 6, 7, 7, 6, 0, 0, 120, 132, 148, 164, 148, 132, 120, 3, 5,
114
-  5, 6, 1, 1, 96, 160, 96, 0, 224, 5, 5, 5, 6, 0, 0, 40,
115
-  80, 160, 80, 40, 4, 3, 3, 6, 1, 0, 240, 16, 16, 4, 1, 1,
116
-  6, 1, 2, 240, 6, 7, 7, 6, 0, 0, 120, 132, 180, 164, 164, 132,
117
-  120, 4, 1, 1, 6, 1, 5, 240, 4, 3, 3, 6, 1, 2, 96, 144,
118
-  96, 5, 7, 7, 6, 0, 255, 32, 32, 248, 32, 32, 0, 248, 3, 5,
119
-  5, 6, 1, 1, 64, 160, 32, 64, 224, 3, 5, 5, 6, 1, 1, 192,
120
-  32, 64, 32, 192, 2, 2, 2, 6, 2, 4, 64, 128, 4, 5, 5, 6,
121
-  1, 255, 144, 144, 176, 208, 128, 5, 6, 6, 6, 0, 0, 120, 232, 232,
122
-  104, 40, 40, 1, 1, 1, 6, 2, 2, 128, 2, 2, 2, 6, 2, 254,
123
-  64, 128, 3, 5, 5, 6, 1, 1, 64, 192, 64, 64, 224, 3, 5, 5,
124
-  6, 1, 1, 64, 160, 64, 0, 224, 5, 5, 5, 6, 0, 0, 160, 80,
125
-  40, 80, 160, 5, 8, 8, 6, 0, 255, 64, 192, 64, 80, 112, 48, 120,
126
-  16, 5, 8, 8, 6, 0, 255, 64, 192, 64, 80, 104, 8, 16, 56, 5,
127
-  8, 8, 6, 0, 255, 192, 32, 64, 48, 240, 48, 120, 16, 4, 7, 7,
128
-  6, 1, 0, 32, 0, 32, 96, 128, 144, 96, 5, 7, 7, 6, 0, 0,
129
-  64, 32, 32, 80, 112, 136, 136, 5, 7, 7, 6, 0, 0, 16, 32, 32,
130
-  80, 112, 136, 136, 5, 7, 7, 6, 0, 0, 32, 80, 32, 80, 112, 136,
131
-  136, 5, 7, 7, 6, 0, 0, 40, 80, 32, 80, 112, 136, 136, 5, 7,
132
-  7, 6, 0, 0, 80, 0, 32, 80, 112, 136, 136, 5, 7, 7, 6, 0,
133
-  0, 32, 80, 32, 80, 112, 136, 136, 5, 6, 6, 6, 0, 0, 120, 160,
134
-  240, 160, 160, 184, 4, 8, 8, 6, 1, 254, 96, 144, 128, 128, 144, 96,
135
-  32, 64, 4, 7, 7, 6, 1, 0, 64, 32, 240, 128, 224, 128, 240, 4,
136
-  7, 7, 6, 1, 0, 32, 64, 240, 128, 224, 128, 240, 4, 7, 7, 6,
137
-  1, 0, 32, 80, 240, 128, 224, 128, 240, 4, 7, 7, 6, 1, 0, 80,
138
-  0, 240, 128, 224, 128, 240, 3, 7, 7, 6, 1, 0, 128, 64, 224, 64,
139
-  64, 64, 224, 3, 7, 7, 6, 1, 0, 32, 64, 224, 64, 64, 64, 224,
140
-  3, 7, 7, 6, 1, 0, 64, 160, 224, 64, 64, 64, 224, 3, 7, 7,
141
-  6, 1, 0, 160, 0, 224, 64, 64, 64, 224, 5, 6, 6, 6, 0, 0,
142
-  112, 72, 232, 72, 72, 112, 4, 7, 7, 6, 1, 0, 80, 160, 144, 208,
143
-  176, 144, 144, 4, 7, 7, 6, 1, 0, 64, 32, 96, 144, 144, 144, 96,
144
-  4, 7, 7, 6, 1, 0, 32, 64, 96, 144, 144, 144, 96, 4, 7, 7,
145
-  6, 1, 0, 32, 80, 96, 144, 144, 144, 96, 4, 7, 7, 6, 1, 0,
146
-  80, 160, 96, 144, 144, 144, 96, 4, 7, 7, 6, 1, 0, 80, 0, 96,
147
-  144, 144, 144, 96, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 4,
148
-  8, 8, 6, 1, 255, 16, 112, 176, 176, 208, 208, 224, 128, 4, 7, 7,
149
-  6, 1, 0, 64, 32, 144, 144, 144, 144, 96, 4, 7, 7, 6, 1, 0,
150
-  32, 64, 144, 144, 144, 144, 96, 4, 7, 7, 6, 1, 0, 32, 80, 144,
151
-  144, 144, 144, 96, 4, 7, 7, 6, 1, 0, 80, 0, 144, 144, 144, 144,
152
-  96, 5, 7, 7, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32, 4, 6,
153
-  6, 6, 1, 0, 128, 224, 144, 144, 224, 128, 4, 6, 6, 6, 1, 0,
154
-  96, 144, 160, 160, 144, 160, 4, 7, 7, 6, 1, 0, 64, 32, 0, 112,
155
-  144, 144, 112, 4, 7, 7, 6, 1, 0, 32, 64, 0, 112, 144, 144, 112,
156
-  4, 7, 7, 6, 1, 0, 32, 80, 0, 112, 144, 144, 112, 4, 7, 7,
157
-  6, 1, 0, 80, 160, 0, 112, 144, 144, 112, 4, 6, 6, 6, 1, 0,
158
-  80, 0, 112, 144, 144, 112, 4, 7, 7, 6, 1, 0, 32, 80, 32, 112,
159
-  144, 144, 112, 5, 4, 4, 6, 0, 0, 112, 168, 176, 120, 4, 6, 6,
160
-  6, 1, 254, 112, 128, 128, 112, 32, 64, 4, 7, 7, 6, 1, 0, 64,
161
-  32, 0, 96, 176, 192, 112, 4, 7, 7, 6, 1, 0, 32, 64, 0, 96,
162
-  176, 192, 112, 4, 7, 7, 6, 1, 0, 32, 80, 0, 96, 176, 192, 112,
163
-  4, 6, 6, 6, 1, 0, 80, 0, 96, 176, 192, 112, 3, 7, 7, 6,
164
-  1, 0, 128, 64, 0, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0, 32,
165
-  64, 0, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0, 64, 160, 0, 192,
166
-  64, 64, 224, 3, 6, 6, 6, 1, 0, 160, 0, 192, 64, 64, 224, 4,
167
-  7, 7, 6, 1, 0, 48, 96, 16, 112, 144, 144, 96, 4, 7, 7, 6,
168
-  1, 0, 80, 160, 0, 224, 144, 144, 144, 4, 7, 7, 6, 1, 0, 64,
169
-  32, 0, 96, 144, 144, 96, 4, 7, 7, 6, 1, 0, 32, 64, 0, 96,
170
-  144, 144, 96, 4, 7, 7, 6, 1, 0, 32, 80, 0, 96, 144, 144, 96,
171
-  4, 7, 7, 6, 1, 0, 80, 160, 0, 96, 144, 144, 96, 4, 6, 6,
172
-  6, 1, 0, 80, 0, 96, 144, 144, 96, 5, 5, 5, 6, 0, 0, 32,
173
-  0, 248, 0, 32, 4, 4, 4, 6, 1, 0, 112, 176, 208, 224, 4, 7,
174
-  7, 6, 1, 0, 64, 32, 0, 144, 144, 144, 112, 4, 7, 7, 6, 1,
175
-  0, 32, 64, 0, 144, 144, 144, 112, 4, 7, 7, 6, 1, 0, 32, 80,
176
-  0, 144, 144, 144, 112, 4, 6, 6, 6, 1, 0, 80, 0, 144, 144, 144,
177
-  112, 4, 9, 9, 6, 1, 254, 32, 64, 0, 144, 144, 144, 112, 144, 96,
178
-  4, 8, 8, 6, 1, 254, 128, 128, 224, 144, 144, 224, 128, 128, 4, 8,
179
-  8, 6, 1, 254, 80, 0, 144, 144, 144, 112, 144, 96
180
-};

+ 0
- 194
Marlin/dogm_font_data_HD44780_C.h View File

@@ -1,194 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  Fontname: HD44780_C v1.2
25
-  Copyright: A. Hardtung, public domain
26
-  Capital A Height: 7, '1' Height: 7
27
-  Calculated Max Values w= 5 h= 8 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 8
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
30
-  Pure Font   ascent = 7 descent=-1
31
-  X Font      ascent = 7 descent=-1
32
-  Max Font    ascent = 8 descent=-1
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t HD44780_C_5x7[2522] U8G_SECTION(".progmem.HD44780_C_5x7") = {
36
-  0, 6, 9, 0, 254, 7, 1, 145, 3, 34, 32, 255, 255, 8, 255, 7,
37
-  255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
38
-  128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
39
-  0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
40
-  120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
41
-  64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
42
-  2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
43
-  64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
44
-  32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
45
-  5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
46
-  64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
47
-  192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
48
-  0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
49
-  192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
50
-  128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
51
-  5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
52
-  6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
53
-  48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
54
-  32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
55
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5,
56
-  5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
57
-  192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
58
-  32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
59
-  0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
60
-  8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168,
61
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7,
62
-  7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0,
63
-  0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144,
64
-  136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
65
-  128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5,
66
-  7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6,
67
-  0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128,
68
-  128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
69
-  16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136,
70
-  5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7,
71
-  6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0,
72
-  136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136,
73
-  136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128,
74
-  128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7,
75
-  7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0,
76
-  0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32,
77
-  32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136,
78
-  136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5,
79
-  7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6,
80
-  0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136,
81
-  136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32,
82
-  64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224,
83
-  5, 7, 7, 6, 0, 0, 32, 112, 160, 160, 168, 112, 32, 3, 7, 7,
84
-  6, 1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4,
85
-  32, 80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5,
86
-  128, 64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7,
87
-  6, 0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0,
88
-  112, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136,
89
-  136, 120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7,
90
-  6, 0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255,
91
-  112, 136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200,
92
-  136, 136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128,
93
-  3, 8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7,
94
-  7, 6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1,
95
-  0, 192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168,
96
-  168, 168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5,
97
-  5, 6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240,
98
-  136, 136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8,
99
-  8, 5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6,
100
-  0, 0, 112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224,
101
-  64, 64, 72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5,
102
-  5, 5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0,
103
-  136, 136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136,
104
-  5, 6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6,
105
-  0, 0, 248, 16, 32, 64, 248, 5, 5, 5, 6, 0, 2, 184, 168, 168,
106
-  168, 184, 5, 5, 5, 6, 0, 2, 184, 136, 184, 160, 184, 5, 5, 5,
107
-  6, 0, 2, 184, 160, 184, 136, 184, 5, 6, 6, 6, 0, 1, 8, 40,
108
-  72, 248, 64, 32, 5, 5, 5, 6, 0, 0, 56, 112, 224, 136, 240, 0,
109
-  0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
110
-  0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
111
-  6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
112
-  0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
113
-  0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
114
-  6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
115
-  0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
116
-  0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
117
-  6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
118
-  0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
119
-  0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
120
-  6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5,
121
-  7, 7, 6, 0, 0, 248, 136, 128, 240, 136, 136, 240, 5, 7, 7, 6,
122
-  0, 0, 248, 136, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 80,
123
-  0, 248, 128, 240, 128, 248, 5, 7, 7, 6, 0, 0, 168, 168, 168, 112,
124
-  168, 168, 168, 5, 7, 7, 6, 0, 0, 240, 8, 8, 112, 8, 8, 240,
125
-  5, 7, 7, 6, 0, 0, 136, 136, 152, 168, 200, 136, 136, 5, 8, 8,
126
-  6, 0, 0, 80, 32, 136, 152, 168, 168, 200, 136, 5, 7, 7, 6, 0,
127
-  0, 120, 40, 40, 40, 40, 168, 72, 5, 7, 7, 6, 0, 0, 248, 136,
128
-  136, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 136, 136, 136, 80, 32,
129
-  64, 128, 5, 7, 7, 6, 0, 0, 32, 112, 168, 168, 168, 112, 32, 5,
130
-  7, 7, 6, 0, 0, 136, 136, 136, 120, 8, 8, 8, 5, 7, 7, 6,
131
-  0, 0, 168, 168, 168, 168, 168, 168, 248, 5, 7, 7, 6, 0, 0, 192,
132
-  64, 64, 112, 72, 72, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 200,
133
-  168, 168, 200, 5, 7, 7, 6, 0, 0, 112, 136, 8, 56, 8, 136, 112,
134
-  5, 7, 7, 6, 0, 0, 144, 168, 168, 232, 168, 168, 144, 5, 7, 7,
135
-  6, 0, 0, 120, 136, 136, 120, 40, 72, 136, 5, 7, 7, 6, 0, 0,
136
-  24, 96, 128, 240, 136, 136, 112, 4, 5, 5, 6, 0, 0, 224, 144, 224,
137
-  144, 224, 5, 5, 5, 6, 0, 0, 248, 136, 128, 128, 128, 5, 7, 7,
138
-  6, 0, 0, 80, 0, 112, 136, 248, 128, 112, 5, 5, 5, 6, 0, 0,
139
-  168, 168, 112, 168, 168, 5, 5, 5, 6, 0, 0, 240, 8, 48, 8, 240,
140
-  5, 5, 5, 6, 0, 0, 136, 152, 168, 200, 136, 5, 7, 7, 6, 0,
141
-  0, 80, 32, 136, 152, 168, 200, 136, 4, 5, 5, 6, 0, 0, 144, 160,
142
-  192, 160, 144, 5, 5, 5, 6, 0, 0, 248, 40, 40, 168, 72, 5, 5,
143
-  5, 6, 0, 0, 136, 216, 168, 136, 136, 5, 5, 5, 6, 0, 0, 136,
144
-  136, 248, 136, 136, 5, 5, 5, 6, 0, 0, 248, 136, 136, 136, 136, 5,
145
-  5, 5, 6, 0, 0, 248, 32, 32, 32, 32, 5, 5, 5, 6, 0, 0,
146
-  136, 136, 120, 8, 8, 5, 5, 5, 6, 0, 0, 168, 168, 168, 168, 248,
147
-  5, 5, 5, 6, 0, 0, 192, 64, 112, 72, 112, 5, 5, 5, 6, 0,
148
-  0, 136, 136, 200, 168, 200, 4, 5, 5, 6, 0, 0, 128, 128, 224, 144,
149
-  224, 5, 5, 5, 6, 0, 0, 112, 136, 56, 136, 112, 5, 5, 5, 6,
150
-  0, 0, 144, 168, 232, 168, 144, 5, 5, 5, 6, 0, 0, 120, 136, 120,
151
-  40, 72, 5, 5, 5, 6, 0, 1, 32, 72, 144, 72, 32, 5, 5, 5,
152
-  6, 0, 1, 32, 144, 72, 144, 32, 5, 3, 3, 6, 0, 0, 72, 144,
153
-  216, 5, 3, 3, 6, 0, 4, 216, 72, 144, 5, 7, 7, 6, 0, 0,
154
-  144, 208, 176, 144, 56, 40, 56, 5, 7, 7, 6, 0, 0, 32, 0, 32,
155
-  64, 128, 136, 112, 5, 7, 7, 6, 0, 0, 24, 32, 32, 112, 32, 32,
156
-  192, 5, 7, 7, 6, 0, 0, 32, 80, 64, 240, 64, 64, 120, 1, 2,
157
-  2, 6, 2, 0, 128, 128, 1, 4, 4, 6, 2, 0, 128, 128, 128, 128,
158
-  3, 5, 5, 6, 1, 0, 160, 160, 160, 0, 224, 3, 5, 5, 6, 1,
159
-  0, 160, 160, 160, 0, 160, 5, 7, 7, 6, 0, 0, 160, 0, 232, 16,
160
-  32, 64, 128, 5, 5, 5, 6, 0, 1, 216, 112, 32, 112, 216, 5, 7,
161
-  7, 6, 0, 0, 160, 64, 168, 16, 32, 64, 128, 3, 6, 6, 6, 1,
162
-  1, 224, 64, 64, 64, 64, 224, 5, 6, 6, 6, 0, 1, 248, 80, 80,
163
-  80, 80, 248, 5, 7, 7, 6, 0, 0, 32, 112, 168, 32, 32, 32, 32,
164
-  5, 7, 7, 6, 0, 0, 32, 32, 32, 32, 168, 112, 32, 5, 7, 7,
165
-  6, 0, 0, 128, 144, 176, 248, 176, 144, 128, 5, 7, 7, 6, 0, 0,
166
-  8, 72, 104, 248, 104, 72, 8, 5, 7, 7, 6, 0, 0, 128, 136, 168,
167
-  248, 168, 136, 128, 5, 7, 7, 6, 0, 0, 128, 224, 136, 16, 32, 64,
168
-  128, 2, 2, 2, 6, 2, 2, 192, 192, 5, 8, 8, 6, 0, 255, 120,
169
-  40, 40, 40, 72, 136, 248, 136, 5, 8, 8, 6, 0, 255, 136, 136, 136,
170
-  136, 136, 136, 248, 8, 5, 8, 8, 6, 0, 255, 168, 168, 168, 168, 168,
171
-  168, 248, 8, 5, 6, 6, 6, 0, 255, 120, 40, 72, 136, 248, 136, 5,
172
-  7, 7, 6, 0, 255, 32, 32, 112, 168, 168, 112, 32, 5, 6, 6, 6,
173
-  0, 255, 136, 136, 136, 136, 248, 8, 5, 6, 6, 6, 0, 255, 168, 168,
174
-  168, 168, 248, 8, 2, 2, 2, 6, 2, 6, 64, 128, 3, 1, 1, 6,
175
-  1, 7, 160, 5, 2, 2, 6, 0, 6, 72, 176, 5, 8, 8, 6, 0,
176
-  0, 16, 32, 0, 112, 136, 248, 128, 112, 5, 6, 6, 6, 0, 255, 112,
177
-  128, 136, 112, 32, 96, 3, 7, 7, 6, 1, 0, 160, 0, 160, 160, 160,
178
-  32, 192, 5, 6, 6, 6, 0, 1, 32, 112, 112, 112, 248, 32, 5, 5,
179
-  5, 6, 0, 1, 80, 0, 136, 0, 80, 5, 5, 5, 6, 0, 1, 112,
180
-  136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8,
181
-  8, 5, 7, 7, 6, 0, 0, 136, 144, 184, 72, 184, 8, 56, 5, 7,
182
-  7, 6, 0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0,
183
-  0, 192, 64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 136,
184
-  248, 136, 248, 136, 248, 136, 4, 5, 5, 6, 0, 2, 192, 0, 48, 0,
185
-  96, 5, 8, 8, 6, 0, 0, 64, 160, 224, 168, 8, 40, 120, 32, 5,
186
-  8, 8, 6, 0, 0, 64, 112, 64, 120, 64, 112, 64, 224, 5, 8, 8,
187
-  6, 0, 0, 32, 112, 32, 248, 32, 112, 32, 112, 5, 7, 7, 6, 0,
188
-  0, 104, 0, 232, 0, 104, 16, 56, 5, 8, 8, 6, 0, 0, 16, 112,
189
-  16, 240, 16, 112, 16, 56, 5, 7, 7, 6, 0, 1, 32, 112, 32, 248,
190
-  32, 112, 32, 5, 8, 8, 6, 0, 0, 16, 144, 80, 48, 80, 144, 16,
191
-  56, 5, 8, 8, 6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 5,
192
-  7, 7, 6, 0, 0, 120, 168, 168, 120, 40, 40, 40, 5, 8, 8, 6,
193
-  0, 0, 248, 248, 248, 248, 248, 248, 248, 248
194
-};

+ 0
- 192
Marlin/dogm_font_data_HD44780_J.h View File

@@ -1,192 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  Fontname: HD44780_J
25
-  Copyright: A. Hardtung, public domain
26
-  Capital A Height: 7, '1' Height: 7
27
-  Calculated Max Values w= 6 h=10 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 8
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-2 dx= 0 dy= 0
30
-  Pure Font   ascent = 7 descent=-1
31
-  X Font      ascent = 7 descent=-1
32
-  Max Font    ascent = 8 descent=-2
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t HD44780_J_5x7[2492] U8G_SECTION(".progmem.HD44780_J_5x7") = {
36
-  0, 6, 9, 0, 254, 7, 1, 145, 3, 34, 32, 255, 255, 8, 254, 7,
37
-  255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
38
-  128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
39
-  0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
40
-  120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
41
-  64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
42
-  2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
43
-  64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
44
-  32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
45
-  5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
46
-  64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
47
-  192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
48
-  0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
49
-  192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
50
-  128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
51
-  5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
52
-  6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
53
-  48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
54
-  32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
55
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5,
56
-  5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
57
-  192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
58
-  32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
59
-  0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
60
-  8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168,
61
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7,
62
-  7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0,
63
-  0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144,
64
-  136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
65
-  128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5,
66
-  7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6,
67
-  0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128,
68
-  128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
69
-  16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136,
70
-  5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7,
71
-  6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0,
72
-  136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136,
73
-  136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128,
74
-  128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7,
75
-  7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0,
76
-  0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32,
77
-  32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136,
78
-  136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5,
79
-  7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6,
80
-  0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136,
81
-  136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32,
82
-  64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224,
83
-  5, 7, 7, 6, 0, 0, 136, 80, 248, 32, 248, 32, 32, 3, 7, 7,
84
-  6, 1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4,
85
-  32, 80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5,
86
-  128, 64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7,
87
-  6, 0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0,
88
-  112, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136,
89
-  136, 120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7,
90
-  6, 0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255,
91
-  112, 136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200,
92
-  136, 136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128,
93
-  3, 8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7,
94
-  7, 6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1,
95
-  0, 192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168,
96
-  168, 168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5,
97
-  5, 6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240,
98
-  136, 136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8,
99
-  8, 5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6,
100
-  0, 0, 112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224,
101
-  64, 64, 72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5,
102
-  5, 5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0,
103
-  136, 136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136,
104
-  5, 6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6,
105
-  0, 0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64,
106
-  128, 64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128,
107
-  128, 3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 5,
108
-  5, 6, 0, 1, 32, 16, 248, 16, 32, 5, 5, 5, 6, 0, 1, 32,
109
-  64, 248, 64, 32, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
110
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
111
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
112
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
113
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
114
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
115
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
116
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
117
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
118
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
119
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
120
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
121
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 3, 3, 3, 6, 0, 0,
122
-  224, 160, 224, 3, 4, 4, 6, 2, 3, 224, 128, 128, 128, 3, 4, 4,
123
-  6, 0, 0, 32, 32, 32, 224, 3, 3, 3, 6, 0, 0, 128, 64, 32,
124
-  2, 2, 2, 6, 1, 2, 192, 192, 5, 6, 6, 6, 0, 0, 248, 8,
125
-  248, 8, 16, 32, 5, 5, 5, 6, 0, 0, 248, 8, 48, 32, 64, 4,
126
-  5, 5, 6, 0, 0, 16, 32, 96, 160, 32, 5, 5, 5, 6, 0, 0,
127
-  32, 248, 136, 8, 48, 5, 4, 4, 6, 0, 0, 248, 32, 32, 248, 5,
128
-  5, 5, 6, 0, 0, 16, 248, 48, 80, 144, 5, 5, 5, 6, 0, 0,
129
-  64, 248, 72, 80, 64, 5, 4, 4, 6, 0, 0, 112, 16, 16, 248, 4,
130
-  5, 5, 6, 0, 0, 240, 16, 240, 16, 240, 5, 4, 4, 6, 0, 0,
131
-  168, 168, 8, 48, 5, 1, 1, 6, 0, 3, 248, 5, 7, 7, 6, 0,
132
-  0, 248, 8, 40, 48, 32, 32, 64, 5, 7, 7, 6, 0, 0, 8, 16,
133
-  32, 96, 160, 32, 32, 5, 7, 7, 6, 0, 0, 32, 248, 136, 136, 8,
134
-  16, 32, 5, 6, 6, 6, 0, 0, 248, 32, 32, 32, 32, 248, 5, 7,
135
-  7, 6, 0, 0, 16, 248, 16, 48, 80, 144, 16, 5, 7, 7, 6, 0,
136
-  0, 64, 248, 72, 72, 72, 72, 144, 5, 7, 7, 6, 0, 0, 32, 248,
137
-  32, 248, 32, 32, 32, 5, 6, 6, 6, 0, 0, 120, 72, 136, 8, 16,
138
-  96, 5, 7, 7, 6, 0, 0, 64, 120, 144, 16, 16, 16, 32, 5, 6,
139
-  6, 6, 0, 0, 248, 8, 8, 8, 8, 248, 5, 7, 7, 6, 0, 0,
140
-  80, 248, 80, 80, 16, 32, 64, 5, 6, 6, 6, 0, 0, 192, 8, 200,
141
-  8, 16, 224, 5, 6, 6, 6, 0, 0, 248, 8, 16, 32, 80, 136, 5,
142
-  7, 7, 6, 0, 0, 64, 248, 72, 80, 64, 64, 56, 5, 6, 6, 6,
143
-  0, 0, 136, 136, 72, 8, 16, 96, 5, 6, 6, 6, 0, 0, 120, 72,
144
-  168, 24, 16, 96, 5, 7, 7, 6, 0, 0, 16, 224, 32, 248, 32, 32,
145
-  64, 5, 6, 6, 6, 0, 0, 168, 168, 168, 8, 16, 32, 5, 7, 7,
146
-  6, 0, 0, 112, 0, 248, 32, 32, 32, 64, 3, 7, 7, 6, 1, 0,
147
-  128, 128, 128, 192, 160, 128, 128, 5, 7, 7, 6, 0, 0, 32, 32, 248,
148
-  32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 112, 0, 0, 0, 0, 248,
149
-  5, 6, 6, 6, 0, 0, 248, 8, 80, 32, 80, 128, 5, 7, 7, 6,
150
-  0, 0, 32, 248, 16, 32, 112, 168, 32, 3, 7, 7, 6, 1, 0, 32,
151
-  32, 32, 32, 32, 64, 128, 5, 6, 6, 6, 0, 0, 32, 16, 136, 136,
152
-  136, 136, 5, 7, 7, 6, 0, 0, 128, 128, 248, 128, 128, 128, 120, 5,
153
-  6, 6, 6, 0, 0, 248, 8, 8, 8, 16, 96, 5, 5, 5, 6, 0,
154
-  1, 64, 160, 16, 8, 8, 5, 7, 7, 6, 0, 0, 32, 248, 32, 32,
155
-  168, 168, 32, 5, 6, 6, 6, 0, 0, 248, 8, 8, 80, 32, 16, 4,
156
-  6, 6, 6, 1, 0, 224, 0, 224, 0, 224, 16, 5, 6, 6, 6, 0,
157
-  0, 32, 64, 128, 136, 248, 8, 5, 6, 6, 6, 0, 0, 8, 8, 80,
158
-  32, 80, 128, 5, 6, 6, 6, 0, 0, 248, 64, 248, 64, 64, 56, 5,
159
-  7, 7, 6, 0, 0, 64, 64, 248, 72, 80, 64, 64, 5, 7, 7, 6,
160
-  0, 0, 112, 16, 16, 16, 16, 16, 248, 5, 6, 6, 6, 0, 0, 248,
161
-  8, 248, 8, 8, 248, 5, 7, 7, 6, 0, 0, 112, 0, 248, 8, 8,
162
-  16, 32, 4, 7, 7, 6, 0, 0, 144, 144, 144, 144, 16, 32, 64, 5,
163
-  6, 6, 6, 0, 0, 32, 160, 160, 168, 168, 176, 5, 7, 7, 6, 0,
164
-  0, 128, 128, 128, 136, 144, 160, 192, 5, 6, 6, 6, 0, 0, 248, 136,
165
-  136, 136, 136, 248, 5, 6, 6, 6, 0, 0, 248, 136, 136, 8, 16, 32,
166
-  5, 6, 6, 6, 0, 0, 192, 0, 8, 8, 16, 224, 4, 3, 3, 6,
167
-  0, 4, 32, 144, 64, 3, 3, 3, 6, 0, 4, 224, 160, 224, 5, 5,
168
-  5, 6, 0, 1, 72, 168, 144, 144, 104, 5, 7, 7, 6, 0, 0, 80,
169
-  0, 112, 8, 120, 136, 120, 4, 8, 8, 6, 1, 255, 96, 144, 144, 224,
170
-  144, 144, 224, 128, 5, 5, 5, 6, 0, 0, 112, 128, 96, 136, 112, 5,
171
-  6, 6, 6, 0, 255, 136, 136, 152, 232, 136, 128, 5, 5, 5, 6, 0,
172
-  0, 120, 160, 144, 136, 112, 5, 7, 7, 6, 0, 254, 48, 72, 136, 136,
173
-  240, 128, 128, 5, 8, 8, 6, 0, 254, 120, 136, 136, 136, 120, 8, 8,
174
-  112, 5, 5, 5, 6, 0, 1, 56, 32, 32, 160, 64, 4, 3, 3, 6,
175
-  0, 3, 16, 208, 16, 4, 8, 8, 6, 0, 255, 16, 0, 48, 16, 16,
176
-  16, 144, 96, 3, 3, 3, 6, 0, 4, 160, 64, 160, 5, 7, 7, 6,
177
-  0, 0, 32, 112, 160, 160, 168, 112, 32, 5, 7, 7, 6, 0, 0, 64,
178
-  64, 224, 64, 224, 64, 120, 5, 7, 7, 6, 0, 0, 112, 0, 176, 200,
179
-  136, 136, 136, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 136, 136, 112,
180
-  5, 7, 7, 6, 0, 255, 176, 200, 136, 136, 240, 128, 128, 5, 7, 7,
181
-  6, 0, 255, 104, 152, 136, 136, 120, 8, 8, 5, 6, 6, 6, 0, 0,
182
-  112, 136, 248, 136, 136, 112, 5, 3, 3, 6, 0, 2, 88, 168, 208, 5,
183
-  5, 5, 6, 0, 0, 112, 136, 136, 80, 216, 5, 7, 7, 6, 0, 0,
184
-  80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 248, 128, 64,
185
-  32, 64, 128, 248, 5, 5, 5, 6, 0, 0, 248, 80, 80, 80, 152, 5,
186
-  7, 7, 6, 0, 0, 248, 0, 136, 80, 32, 80, 136, 5, 7, 7, 6,
187
-  0, 255, 136, 136, 136, 136, 120, 8, 112, 5, 6, 6, 6, 0, 0, 8,
188
-  240, 32, 248, 32, 32, 5, 5, 5, 6, 0, 0, 248, 64, 120, 72, 136,
189
-  5, 5, 5, 6, 0, 0, 248, 168, 248, 136, 136, 5, 5, 5, 6, 0,
190
-  1, 32, 0, 248, 0, 32, 0, 0, 0, 6, 0, 0, 6, 10, 10, 6,
191
-  0, 254, 252, 252, 252, 252, 252, 252, 252, 252, 252, 252
192
-};

+ 0
- 226
Marlin/dogm_font_data_HD44780_W.h View File

@@ -1,226 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  Fontname: HD44780_W
25
-  Copyright: A.Hardtung, public domain
26
-  Capital A Height: 7, '1' Height: 7
27
-  Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
30
-  Pure Font   ascent = 7 descent=-1
31
-  X Font      ascent = 7 descent=-1
32
-  Max Font    ascent = 8 descent=-1
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t HD44780_W_5x7[3034] U8G_SECTION(".progmem.HD44780_W_5x7") = {
36
-  0, 6, 9, 0, 254, 7, 2, 79, 3, 222, 16, 255, 255, 8, 255, 7,
37
-  255, 4, 7, 7, 6, 0, 0, 16, 48, 112, 240, 112, 48, 16, 4, 7,
38
-  7, 6, 1, 0, 128, 192, 224, 240, 224, 192, 128, 5, 3, 3, 6, 0,
39
-  4, 216, 72, 144, 5, 3, 3, 6, 0, 4, 216, 144, 72, 5, 7, 7,
40
-  6, 0, 0, 32, 112, 248, 0, 32, 112, 248, 5, 7, 7, 6, 0, 0,
41
-  248, 112, 32, 0, 248, 112, 32, 5, 5, 5, 6, 0, 1, 112, 248, 248,
42
-  248, 112, 5, 7, 7, 6, 0, 0, 8, 8, 40, 72, 248, 64, 32, 5,
43
-  7, 7, 6, 0, 0, 32, 112, 168, 32, 32, 32, 32, 5, 7, 7, 6,
44
-  0, 0, 32, 32, 32, 32, 168, 112, 32, 5, 5, 5, 6, 0, 1, 32,
45
-  64, 248, 64, 32, 5, 5, 5, 6, 0, 1, 32, 16, 248, 16, 32, 5,
46
-  7, 7, 6, 0, 0, 16, 32, 64, 32, 16, 0, 248, 5, 7, 7, 6,
47
-  0, 0, 64, 32, 16, 32, 64, 0, 248, 5, 5, 5, 6, 0, 1, 32,
48
-  32, 112, 112, 248, 5, 5, 5, 6, 0, 0, 248, 112, 112, 32, 32, 0,
49
-  0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128,
50
-  0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6, 0, 0,
51
-  80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32, 120, 160,
52
-  112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32, 64, 152,
53
-  24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104, 2, 3,
54
-  3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32, 64, 128,
55
-  128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32, 32, 64,
56
-  128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5, 5, 6,
57
-  0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192, 64, 128,
58
-  5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192, 192, 5,
59
-  5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0,
60
-  112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64, 192, 64,
61
-  64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112, 128, 128,
62
-  248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240, 5, 7,
63
-  7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7, 6, 0,
64
-  0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0, 48, 64,
65
-  128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, 32,
66
-  32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136, 112, 5,
67
-  7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5, 5, 6,
68
-  2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192, 192, 0,
69
-  192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64, 32, 16,
70
-  5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1, 0, 128,
71
-  64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136, 8, 16,
72
-  32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168, 112, 5,
73
-  7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7, 7, 6,
74
-  0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, 0, 112,
75
-  136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144, 136, 136,
76
-  136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 248,
77
-  5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5, 7, 7,
78
-  6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6, 0, 0,
79
-  136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128, 128, 128,
80
-  128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16, 16, 144,
81
-  96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136, 5, 7,
82
-  7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7, 6, 0,
83
-  0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 136, 136,
84
-  200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 136,
85
-  136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128, 128, 5,
86
-  7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7, 7, 6,
87
-  0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0, 0, 120,
88
-  128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32, 32, 32,
89
-  32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 136, 112,
90
-  5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5, 7, 7,
91
-  6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6, 0, 0,
92
-  136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136, 136, 136,
93
-  80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32, 64, 128,
94
-  248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224, 5, 5,
95
-  5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, 1, 0, 224,
96
-  32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, 80, 136, 5,
97
-  1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, 64, 5, 5,
98
-  5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 128,
99
-  128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, 128, 128, 136,
100
-  112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, 120, 5, 5,
101
-  5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, 0, 0, 48,
102
-  72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, 136, 136, 120,
103
-  8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, 136, 136, 1,
104
-  7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 8, 8, 6,
105
-  1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, 6, 0, 0,
106
-  128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, 192, 64, 64,
107
-  64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, 168, 168, 5,
108
-  5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, 6, 0, 0,
109
-  112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, 136, 240, 128,
110
-  128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, 5, 5, 5,
111
-  6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, 0, 112, 128,
112
-  112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, 64, 64, 72, 48,
113
-  5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, 5, 6, 0,
114
-  0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, 136, 168, 168,
115
-  80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, 6, 6, 6,
116
-  0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, 0, 248, 16,
117
-  32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, 64, 64, 32,
118
-  1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, 3, 7, 7,
119
-  6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 6, 6, 6, 0, 1,
120
-  8, 40, 72, 248, 64, 32, 5, 7, 7, 6, 0, 0, 32, 80, 136, 136,
121
-  136, 136, 248, 5, 7, 7, 6, 0, 0, 248, 136, 128, 240, 136, 136, 240,
122
-  5, 8, 8, 6, 0, 255, 120, 40, 40, 40, 72, 136, 248, 136, 5, 7,
123
-  7, 6, 0, 0, 168, 168, 168, 112, 168, 168, 168, 5, 7, 7, 6, 0,
124
-  0, 240, 8, 8, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 136, 136,
125
-  152, 168, 200, 136, 136, 5, 8, 8, 6, 0, 0, 80, 32, 136, 152, 168,
126
-  168, 200, 136, 5, 7, 7, 6, 0, 0, 120, 40, 40, 40, 40, 168, 72,
127
-  5, 7, 7, 6, 0, 0, 248, 136, 136, 136, 136, 136, 136, 5, 7, 7,
128
-  6, 0, 0, 136, 136, 136, 80, 32, 64, 128, 5, 8, 8, 6, 0, 255,
129
-  136, 136, 136, 136, 136, 136, 248, 8, 5, 7, 7, 6, 0, 0, 136, 136,
130
-  136, 120, 8, 8, 8, 5, 7, 7, 6, 0, 0, 168, 168, 168, 168, 168,
131
-  168, 248, 5, 8, 8, 6, 0, 255, 168, 168, 168, 168, 168, 168, 248, 8,
132
-  5, 7, 7, 6, 0, 0, 192, 64, 64, 112, 72, 72, 112, 5, 7, 7,
133
-  6, 0, 0, 136, 136, 136, 200, 168, 168, 200, 5, 7, 7, 6, 0, 0,
134
-  112, 136, 40, 80, 8, 136, 112, 5, 5, 5, 6, 0, 0, 64, 160, 144,
135
-  144, 104, 5, 7, 7, 6, 0, 0, 32, 48, 40, 40, 32, 224, 224, 5,
136
-  7, 7, 6, 0, 0, 248, 136, 128, 128, 128, 128, 128, 5, 5, 5, 6,
137
-  0, 0, 248, 80, 80, 80, 152, 5, 7, 7, 6, 0, 0, 248, 128, 64,
138
-  32, 64, 128, 248, 5, 5, 5, 6, 0, 0, 120, 144, 144, 144, 96, 5,
139
-  7, 7, 6, 0, 0, 48, 40, 56, 40, 200, 216, 24, 5, 6, 6, 6,
140
-  0, 0, 8, 112, 160, 32, 32, 16, 5, 6, 6, 6, 0, 1, 32, 112,
141
-  112, 112, 248, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136,
142
-  112, 5, 5, 5, 6, 0, 0, 112, 136, 136, 80, 216, 5, 7, 7, 6,
143
-  0, 0, 48, 72, 32, 80, 136, 136, 112, 5, 3, 3, 6, 0, 2, 88,
144
-  168, 208, 5, 6, 6, 6, 0, 0, 80, 248, 248, 248, 112, 32, 5, 5,
145
-  5, 6, 0, 0, 112, 128, 96, 136, 112, 5, 7, 7, 6, 0, 0, 112,
146
-  136, 136, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 216, 216, 216, 216,
147
-  216, 216, 216, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128,
148
-  5, 7, 7, 6, 0, 0, 32, 112, 160, 160, 168, 112, 32, 5, 7, 7,
149
-  6, 0, 0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0,
150
-  136, 112, 80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 248, 32, 248,
151
-  32, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5,
152
-  8, 8, 6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 5, 7, 7,
153
-  6, 0, 0, 24, 32, 32, 112, 32, 32, 192, 5, 7, 7, 6, 0, 0,
154
-  248, 136, 184, 184, 184, 136, 248, 5, 7, 7, 6, 0, 0, 112, 8, 120,
155
-  136, 120, 0, 248, 5, 5, 5, 6, 0, 1, 40, 80, 160, 80, 40, 5,
156
-  7, 7, 6, 0, 0, 144, 168, 168, 232, 168, 168, 144, 5, 7, 7, 6,
157
-  0, 0, 120, 136, 136, 120, 40, 72, 136, 5, 7, 7, 6, 0, 0, 248,
158
-  136, 168, 136, 152, 168, 248, 2, 3, 3, 6, 2, 4, 64, 128, 192, 4,
159
-  5, 5, 6, 0, 3, 96, 144, 144, 144, 96, 5, 7, 7, 6, 0, 0,
160
-  32, 32, 248, 32, 32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32,
161
-  64, 240, 3, 5, 5, 6, 0, 3, 224, 32, 224, 32, 224, 5, 8, 8,
162
-  6, 0, 0, 224, 144, 224, 128, 144, 184, 144, 24, 5, 8, 8, 6, 0,
163
-  255, 136, 136, 136, 136, 152, 232, 128, 128, 5, 7, 7, 6, 0, 0, 120,
164
-  152, 152, 120, 24, 24, 24, 2, 2, 2, 6, 2, 2, 192, 192, 5, 5,
165
-  5, 6, 0, 0, 80, 136, 168, 168, 80, 3, 5, 5, 6, 0, 3, 64,
166
-  192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 112, 0,
167
-  248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5, 7, 7, 6,
168
-  0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6, 0, 0, 136,
169
-  144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192, 64, 192, 72,
170
-  216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32, 64, 128, 136,
171
-  112, 5, 8, 8, 6, 0, 0, 64, 32, 32, 80, 136, 248, 136, 136, 5,
172
-  8, 8, 6, 0, 0, 16, 32, 32, 80, 136, 248, 136, 136, 5, 8, 8,
173
-  6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6, 0,
174
-  0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0, 80,
175
-  0, 32, 80, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0, 32, 80, 32,
176
-  112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96, 160, 184, 224,
177
-  160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136, 112, 32, 96,
178
-  5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128, 248, 5, 8,
179
-  8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5, 8, 8, 6,
180
-  0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7, 6, 0, 0,
181
-  80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0, 128, 64, 0,
182
-  224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64, 0, 224, 64,
183
-  64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224, 64, 64, 64,
184
-  224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64, 224, 5, 7,
185
-  7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8, 8, 6, 0,
186
-  0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6, 0, 0, 64,
187
-  32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 112,
188
-  136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136,
189
-  136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112, 136, 136, 136,
190
-  112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136, 136, 112, 5,
191
-  5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 7, 7, 6, 0, 0,
192
-  112, 32, 112, 168, 112, 32, 112, 5, 8, 8, 6, 0, 0, 64, 32, 136,
193
-  136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 136, 136,
194
-  136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 136, 136, 136, 136,
195
-  112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136, 136, 136, 112, 5,
196
-  8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32, 32, 5, 8, 8,
197
-  6, 0, 0, 192, 64, 112, 72, 72, 112, 64, 224, 5, 7, 7, 6, 0,
198
-  0, 48, 72, 72, 112, 72, 72, 176, 5, 8, 8, 6, 0, 0, 64, 32,
199
-  0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112,
200
-  8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 8, 120,
201
-  136, 120, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112, 8, 120, 136, 120,
202
-  5, 7, 7, 6, 0, 0, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8,
203
-  6, 0, 0, 32, 80, 32, 112, 8, 120, 136, 120, 5, 6, 6, 6, 0,
204
-  0, 208, 40, 120, 160, 168, 80, 5, 6, 6, 6, 0, 255, 112, 128, 136,
205
-  112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248, 128,
206
-  112, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 128, 112, 5,
207
-  8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 128, 112, 5, 7, 7,
208
-  6, 0, 0, 80, 0, 112, 136, 248, 128, 112, 3, 8, 8, 6, 1, 0,
209
-  128, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64,
210
-  0, 64, 192, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 64,
211
-  192, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 64, 192, 64, 64,
212
-  224, 5, 7, 7, 6, 0, 0, 160, 64, 160, 16, 120, 136, 112, 5, 8,
213
-  8, 6, 0, 0, 104, 144, 0, 176, 200, 136, 136, 136, 5, 8, 8, 6,
214
-  0, 0, 64, 32, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0,
215
-  16, 32, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80,
216
-  0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112,
217
-  136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 136, 136,
218
-  112, 5, 5, 5, 6, 0, 1, 32, 0, 248, 0, 32, 5, 7, 7, 6,
219
-  0, 0, 16, 32, 112, 168, 112, 32, 64, 5, 8, 8, 6, 0, 0, 64,
220
-  32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0, 0, 16, 32, 0,
221
-  136, 136, 136, 152, 104, 5, 8, 8, 6, 0, 0, 32, 80, 0, 136, 136,
222
-  136, 152, 104, 5, 7, 7, 6, 0, 0, 80, 0, 136, 136, 136, 152, 104,
223
-  5, 9, 9, 6, 0, 255, 16, 32, 0, 136, 136, 136, 248, 8, 112, 4,
224
-  7, 7, 6, 1, 0, 192, 64, 96, 80, 96, 64, 224, 5, 8, 8, 6,
225
-  0, 255, 80, 0, 136, 136, 136, 248, 8, 112
226
-};

+ 0
- 286
Marlin/dogm_font_data_ISO10646_1.h View File

@@ -1,286 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  Fontname: ISO10646-1
25
-  Copyright: A.Hardtung, public domain
26
-  Capital A Height: 7, '1' Height: 7
27
-  Calculated Max Values w= 5 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
30
-  Pure Font   ascent = 7 descent=-1
31
-  X Font      ascent = 7 descent=-1
32
-  Max Font    ascent = 8 descent=-1
33
-*/
34
-#include <U8glib.h>
35
-
36
-#if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7)
37
-
38
-  //
39
-  // Reduced font (only symbols 32 - 127) - About 1400 bytes smaller
40
-  //
41
-  const u8g_fntpgm_uint8_t ISO10646_1_5x7[] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
42
-    0,6,9,0,254,7,1,146,3,33,32,127,255,7,255,7,
43
-    255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
44
-    128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
45
-    0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
46
-    120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
47
-    64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
48
-    2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
49
-    64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
50
-    32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
51
-    5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
52
-    64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
53
-    192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
54
-    0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
55
-    192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
56
-    128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
57
-    5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
58
-    6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
59
-    112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
60
-    32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
61
-    112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
62
-    5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
63
-    192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
64
-    32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
65
-    0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
66
-    8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
67
-    168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
68
-    7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
69
-    0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
70
-    136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
71
-    128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
72
-    5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
73
-    6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
74
-    128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
75
-    16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
76
-    136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
77
-    7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
78
-    0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
79
-    136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
80
-    128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
81
-    7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
82
-    0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
83
-    32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
84
-    136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
85
-    5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
86
-    6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
87
-    136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
88
-    32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
89
-    224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
90
-    1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
91
-    80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
92
-    64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
93
-    0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
94
-    128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
95
-    120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
96
-    0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
97
-    136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
98
-    136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
99
-    8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
100
-    6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
101
-    192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
102
-    168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
103
-    6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
104
-    136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
105
-    5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
106
-    0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
107
-    64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
108
-    5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
109
-    136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
110
-    6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
111
-    0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
112
-    64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
113
-    3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
114
-    6,0,2,104,144,0,0,0,6,0,0};
115
-
116
-#else
117
-
118
-  //
119
-  // Extended (original) font (symbols 32 - 255)
120
-  //
121
-  const u8g_fntpgm_uint8_t ISO10646_1_5x7[] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
122
-    0, 6, 9, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 8, 255, 7,
123
-    255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
124
-    128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
125
-    0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
126
-    120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
127
-    64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
128
-    2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
129
-    64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
130
-    32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
131
-    5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
132
-    64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
133
-    192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
134
-    0, 0, 112, 136, 136, 136, 136, 136, 112, 3, 7, 7, 6, 1, 0, 64,
135
-    192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
136
-    128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
137
-    5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
138
-    6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
139
-    112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
140
-    32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
141
-    112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5,
142
-    5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
143
-    192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
144
-    32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
145
-    0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
146
-    8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168,
147
-    168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5,
148
-    7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6,
149
-    0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240,
150
-    136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240,
151
-    128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128,
152
-    5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7,
153
-    6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0,
154
-    128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16,
155
-    16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144,
156
-    136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7,
157
-    7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0,
158
-    0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136,
159
-    136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
160
-    128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5,
161
-    7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6,
162
-    0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248,
163
-    32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136,
164
-    136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32,
165
-    5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7,
166
-    6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0,
167
-    136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16,
168
-    32, 64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128,
169
-    224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6,
170
-    1, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32,
171
-    80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128,
172
-    64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6,
173
-    0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112,
174
-    128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136,
175
-    120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6,
176
-    0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112,
177
-    136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136,
178
-    136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3,
179
-    8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7,
180
-    6, 0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0,
181
-    192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168,
182
-    168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5,
183
-    6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136,
184
-    136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8,
185
-    5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0,
186
-    0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64,
187
-    64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5,
188
-    5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136,
189
-    136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5,
190
-    6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0,
191
-    0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128,
192
-    64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128,
193
-    3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2,
194
-    6, 0, 2, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
195
-    0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
196
-    6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
197
-    0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
198
-    0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
199
-    6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
200
-    0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
201
-    0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
202
-    6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
203
-    0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
204
-    0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
205
-    6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0,
206
-    0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0,
207
-    0, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 5, 7,
208
-    7, 6, 0, 0, 32, 112, 168, 160, 168, 112, 32, 5, 7, 7, 6, 0,
209
-    0, 48, 64, 64, 224, 64, 80, 168, 5, 5, 5, 6, 0, 0, 136, 112,
210
-    80, 112, 136, 5, 7, 7, 6, 0, 0, 136, 80, 32, 248, 32, 248, 32,
211
-    1, 7, 7, 6, 2, 0, 128, 128, 128, 0, 128, 128, 128, 5, 8, 8,
212
-    6, 0, 0, 48, 72, 32, 80, 80, 32, 144, 96, 3, 1, 1, 6, 1,
213
-    7, 160, 5, 7, 7, 6, 0, 0, 248, 136, 184, 184, 184, 136, 248, 5,
214
-    7, 7, 6, 0, 1, 112, 8, 120, 136, 120, 0, 248, 5, 5, 5, 6,
215
-    0, 1, 40, 80, 160, 80, 40, 5, 3, 3, 6, 0, 1, 248, 8, 8,
216
-    2, 2, 2, 6, 2, 6, 64, 128, 5, 7, 7, 6, 0, 0, 248, 136,
217
-    168, 136, 152, 168, 248, 5, 1, 1, 6, 0, 6, 248, 4, 4, 4, 6,
218
-    0, 3, 96, 144, 144, 96, 5, 7, 7, 6, 0, 0, 32, 32, 248, 32,
219
-    32, 0, 248, 4, 5, 5, 6, 0, 3, 96, 144, 32, 64, 240, 3, 5,
220
-    5, 6, 0, 3, 224, 32, 224, 32, 224, 2, 2, 2, 6, 2, 6, 64,
221
-    128, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 152, 232, 128, 128, 5,
222
-    7, 7, 6, 0, 0, 120, 152, 152, 120, 24, 24, 24, 2, 2, 2, 6,
223
-    2, 2, 192, 192, 2, 2, 2, 6, 2, 255, 64, 128, 3, 5, 5, 6,
224
-    0, 3, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 1, 112, 136, 136,
225
-    136, 112, 0, 248, 5, 5, 5, 6, 0, 1, 160, 80, 40, 80, 160, 5,
226
-    7, 7, 6, 0, 0, 136, 144, 168, 88, 184, 8, 8, 5, 7, 7, 6,
227
-    0, 0, 136, 144, 184, 72, 152, 32, 56, 5, 8, 8, 6, 0, 0, 192,
228
-    64, 192, 72, 216, 56, 8, 8, 5, 7, 7, 6, 0, 0, 32, 0, 32,
229
-    64, 128, 136, 112, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248,
230
-    136, 136, 5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 248, 136, 136,
231
-    5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136, 248, 136, 136, 5, 8,
232
-    8, 6, 0, 0, 104, 144, 0, 112, 136, 248, 136, 136, 5, 8, 8, 6,
233
-    0, 0, 80, 0, 112, 136, 136, 248, 136, 136, 5, 8, 8, 6, 0, 0,
234
-    32, 80, 32, 112, 136, 248, 136, 136, 5, 7, 7, 6, 0, 0, 56, 96,
235
-    160, 184, 224, 160, 184, 5, 8, 8, 6, 0, 255, 112, 136, 128, 128, 136,
236
-    112, 32, 96, 5, 8, 8, 6, 0, 0, 64, 32, 0, 248, 128, 240, 128,
237
-    248, 5, 8, 8, 6, 0, 0, 8, 16, 0, 248, 128, 240, 128, 248, 5,
238
-    8, 8, 6, 0, 0, 32, 80, 0, 248, 128, 240, 128, 248, 5, 7, 7,
239
-    6, 0, 0, 80, 0, 248, 128, 240, 128, 248, 3, 8, 8, 6, 1, 0,
240
-    128, 64, 0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 32, 64,
241
-    0, 224, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 64, 160, 0, 224,
242
-    64, 64, 64, 224, 3, 7, 7, 6, 1, 0, 160, 0, 224, 64, 64, 64,
243
-    224, 5, 7, 7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8,
244
-    8, 6, 0, 0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6,
245
-    0, 0, 64, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0,
246
-    16, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80,
247
-    0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112,
248
-    136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136,
249
-    136, 112, 5, 5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 8, 8,
250
-    6, 0, 255, 16, 112, 168, 168, 168, 168, 112, 64, 5, 8, 8, 6, 0,
251
-    0, 64, 32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16,
252
-    32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0,
253
-    136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136,
254
-    136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32,
255
-    32, 5, 9, 9, 6, 0, 255, 192, 64, 112, 72, 72, 112, 64, 64, 224,
256
-    4, 8, 8, 6, 1, 255, 96, 144, 144, 160, 144, 144, 224, 128, 5, 8,
257
-    8, 6, 0, 0, 64, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6,
258
-    0, 0, 16, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0,
259
-    32, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 104, 144,
260
-    0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 80, 0, 112, 8,
261
-    120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 32, 112, 8, 120, 136,
262
-    120, 5, 6, 6, 6, 0, 0, 208, 40, 120, 160, 168, 80, 5, 6, 6,
263
-    6, 0, 255, 112, 128, 136, 112, 32, 96, 5, 8, 8, 6, 0, 0, 64,
264
-    32, 0, 112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 16, 32, 0,
265
-    112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136,
266
-    248, 128, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112,
267
-    3, 8, 8, 6, 1, 0, 128, 64, 0, 64, 192, 64, 64, 224, 3, 8,
268
-    8, 6, 1, 0, 32, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6,
269
-    1, 0, 64, 160, 0, 64, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0,
270
-    160, 0, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 160, 64, 160,
271
-    16, 120, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 176, 200, 136,
272
-    136, 136, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 136, 136, 112,
273
-    5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 136, 136, 112, 5, 8,
274
-    8, 6, 0, 0, 32, 80, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6,
275
-    0, 0, 104, 144, 0, 112, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0,
276
-    80, 0, 112, 136, 136, 136, 112, 5, 5, 5, 6, 0, 1, 32, 0, 248,
277
-    0, 32, 5, 7, 7, 6, 0, 255, 16, 112, 168, 168, 168, 112, 64, 5,
278
-    8, 8, 6, 0, 0, 64, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8,
279
-    6, 0, 0, 16, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0,
280
-    0, 32, 80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 80,
281
-    0, 136, 136, 136, 152, 104, 5, 9, 9, 6, 0, 255, 16, 32, 0, 136,
282
-    136, 136, 248, 8, 112, 4, 7, 7, 6, 1, 255, 192, 64, 96, 80, 96,
283
-    64, 224, 5, 8, 8, 6, 0, 255, 80, 0, 136, 136, 136, 120, 8, 112
284
-  };
285
-
286
-#endif

+ 0
- 184
Marlin/dogm_font_data_ISO10646_1_PL.h View File

@@ -1,184 +0,0 @@
1
-/*
2
-  Fontname: ISO10646-1-PL
3
-  Copyright: A.Hardtung, public domain
4
-  Capital A Height: 7, '1' Height: 7
5
-  Calculated Max Values w= 5 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
6
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
7
-  Calculated Min Values           x= 0 y=-2 dx= 0 dy= 0
8
-  Pure Font   ascent = 7 descent=-1
9
-  X Font      ascent = 7 descent=-1
10
-  Max Font    ascent = 8 descent=-2
11
-*/
12
-#include <U8glib.h>
13
-const u8g_fntpgm_uint8_t ISO10646_1_PL_5x7[2732] U8G_FONT_SECTION(".progmem.ISO10646_1_PL_5x7") = {
14
-  0,6,9,0,254,7,1,146,3,33,32,255,255,8,254,7,
15
-  255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
16
-  128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
17
-  0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
18
-  120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
19
-  64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
20
-  2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
21
-  64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
22
-  32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
23
-  5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
24
-  64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
25
-  192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
26
-  0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
27
-  192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
28
-  128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
29
-  5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
30
-  6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
31
-  112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32
-  32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
33
-  112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
34
-  5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
35
-  192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
36
-  32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
37
-  0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
38
-  8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
39
-  168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
40
-  7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
41
-  0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
42
-  136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
43
-  128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
44
-  5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
45
-  6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
46
-  128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
47
-  16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
48
-  136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
49
-  7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
50
-  0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
51
-  136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
52
-  128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
53
-  7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
54
-  0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
55
-  32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
56
-  136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
57
-  5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
58
-  6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
59
-  136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
60
-  32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
61
-  224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
62
-  1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
63
-  80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64
-  64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
65
-  0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
66
-  128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
67
-  120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
68
-  0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
69
-  136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
70
-  136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
71
-  8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
72
-  6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
73
-  192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
74
-  168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
75
-  6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
76
-  136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
77
-  5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
78
-  0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
79
-  64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
80
-  5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
81
-  136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
82
-  6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
83
-  0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
84
-  64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
85
-  3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
86
-  6,0,2,104,144,0,0,0,6,0,0,5,9,9,6,0,
87
-  254,112,136,136,248,136,136,136,16,32,5,7,7,6,0,254,
88
-  112,8,120,136,120,16,32,5,8,8,6,0,0,16,32,112,
89
-  136,128,128,136,112,5,7,7,6,0,0,16,32,112,128,128,
90
-  136,112,5,9,9,6,0,254,248,128,128,240,128,128,248,8,
91
-  16,5,7,7,6,0,254,112,136,248,128,112,16,32,5,7,
92
-  7,6,0,0,128,144,160,192,128,128,248,5,7,7,6,0,
93
-  0,96,40,48,96,160,32,112,5,8,8,6,0,0,16,168,
94
-  136,200,168,152,136,136,5,8,8,6,0,0,8,16,0,176,
95
-  200,136,136,136,5,8,8,6,0,0,16,32,112,136,136,136,
96
-  136,112,5,8,8,6,0,0,16,32,0,112,136,136,136,112,
97
-  5,8,8,6,0,0,16,120,128,128,112,8,8,240,5,8,
98
-  8,6,0,0,16,32,0,112,128,112,8,240,5,8,8,6,
99
-  0,0,32,248,8,16,32,64,128,248,5,8,8,6,0,0,
100
-  16,32,0,248,16,32,64,248,5,7,7,6,0,0,248,8,
101
-  16,248,64,128,248,5,8,8,6,0,0,48,48,0,248,16,
102
-  32,64,248,0,0,0,6,0,0,0,0,0,6,0,0,0,
103
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
104
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
105
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
106
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
107
-  0,0,0,0,6,0,0,0,0,0,6,0,0,1,7,7,
108
-  6,2,0,128,0,128,128,128,128,128,5,7,7,6,0,0,
109
-  32,112,168,160,168,112,32,5,7,7,6,0,0,48,64,64,
110
-  224,64,80,168,5,5,5,6,0,0,136,112,80,112,136,5,
111
-  7,7,6,0,0,136,80,32,248,32,248,32,1,7,7,6,
112
-  2,0,128,128,128,0,128,128,128,5,8,8,6,0,0,48,
113
-  72,32,80,80,32,144,96,3,1,1,6,1,7,160,5,7,
114
-  7,6,0,0,248,136,184,184,184,136,248,5,7,7,6,0,
115
-  1,112,8,120,136,120,0,248,5,5,5,6,0,1,40,80,
116
-  160,80,40,5,3,3,6,0,1,248,8,8,2,2,2,6,
117
-  2,6,64,128,5,7,7,6,0,0,248,136,168,136,152,168,
118
-  248,5,1,1,6,0,6,248,4,4,4,6,0,3,96,144,
119
-  144,96,5,7,7,6,0,0,32,32,248,32,32,0,248,4,
120
-  5,5,6,0,3,96,144,32,64,240,3,5,5,6,0,3,
121
-  224,32,224,32,224,2,2,2,6,2,6,64,128,5,8,8,
122
-  6,0,255,136,136,136,136,152,232,128,128,5,7,7,6,0,
123
-  0,120,152,152,120,24,24,24,2,2,2,6,2,2,192,192,
124
-  2,2,2,6,2,255,64,128,3,5,5,6,0,3,64,192,
125
-  64,64,224,5,7,7,6,0,1,112,136,136,136,112,0,248,
126
-  5,5,5,6,0,1,160,80,40,80,160,5,7,7,6,0,
127
-  0,136,144,168,88,184,8,8,5,7,7,6,0,0,136,144,
128
-  184,72,152,32,56,5,8,8,6,0,0,192,64,192,72,216,
129
-  56,8,8,5,7,7,6,0,0,32,0,32,64,128,136,112,
130
-  5,8,8,6,0,0,64,32,0,112,136,248,136,136,5,8,
131
-  8,6,0,0,16,32,0,112,136,248,136,136,5,8,8,6,
132
-  0,0,32,80,0,112,136,248,136,136,5,8,8,6,0,0,
133
-  104,144,0,112,136,248,136,136,5,8,8,6,0,0,80,0,
134
-  112,136,136,248,136,136,5,8,8,6,0,0,32,80,32,112,
135
-  136,248,136,136,5,7,7,6,0,0,56,96,160,184,224,160,
136
-  184,5,8,8,6,0,255,112,136,128,128,136,112,32,96,5,
137
-  8,8,6,0,0,64,32,0,248,128,240,128,248,5,8,8,
138
-  6,0,0,8,16,0,248,128,240,128,248,5,8,8,6,0,
139
-  0,32,80,0,248,128,240,128,248,5,7,7,6,0,0,80,
140
-  0,248,128,240,128,248,3,8,8,6,1,0,128,64,0,224,
141
-  64,64,64,224,3,8,8,6,1,0,32,64,0,224,64,64,
142
-  64,224,3,8,8,6,1,0,64,160,0,224,64,64,64,224,
143
-  3,7,7,6,1,0,160,0,224,64,64,64,224,5,7,7,
144
-  6,0,0,112,72,72,232,72,72,112,5,8,8,6,0,0,
145
-  104,144,0,136,200,168,152,136,5,8,8,6,0,0,64,32,
146
-  112,136,136,136,136,112,5,8,8,6,0,0,16,32,112,136,
147
-  136,136,136,112,5,8,8,6,0,0,32,80,0,112,136,136,
148
-  136,112,5,8,8,6,0,0,104,144,0,112,136,136,136,112,
149
-  5,8,8,6,0,0,80,0,112,136,136,136,136,112,5,5,
150
-  5,6,0,1,136,80,32,80,136,5,8,8,6,0,255,16,
151
-  112,168,168,168,168,112,64,5,8,8,6,0,0,64,32,136,
152
-  136,136,136,136,112,5,8,8,6,0,0,16,32,136,136,136,
153
-  136,136,112,5,8,8,6,0,0,32,80,0,136,136,136,136,
154
-  112,5,8,8,6,0,0,80,0,136,136,136,136,136,112,5,
155
-  8,8,6,0,0,16,32,136,80,32,32,32,32,5,9,9,
156
-  6,0,255,192,64,112,72,72,112,64,64,224,4,8,8,6,
157
-  1,255,96,144,144,160,144,144,224,128,5,8,8,6,0,0,
158
-  64,32,0,112,8,120,136,120,5,8,8,6,0,0,16,32,
159
-  0,112,8,120,136,120,5,8,8,6,0,0,32,80,0,112,
160
-  8,120,136,120,5,8,8,6,0,0,104,144,0,112,8,120,
161
-  136,120,5,7,7,6,0,0,80,0,112,8,120,136,120,5,
162
-  8,8,6,0,0,32,80,32,112,8,120,136,120,5,6,6,
163
-  6,0,0,208,40,120,160,168,80,5,6,6,6,0,255,112,
164
-  128,136,112,32,96,5,8,8,6,0,0,64,32,0,112,136,
165
-  248,128,112,5,8,8,6,0,0,16,32,0,112,136,248,128,
166
-  112,5,8,8,6,0,0,32,80,0,112,136,248,128,112,5,
167
-  7,7,6,0,0,80,0,112,136,248,128,112,3,8,8,6,
168
-  1,0,128,64,0,64,192,64,64,224,3,8,8,6,1,0,
169
-  32,64,0,64,192,64,64,224,3,8,8,6,1,0,64,160,
170
-  0,64,192,64,64,224,3,7,7,6,1,0,160,0,64,192,
171
-  64,64,224,5,7,7,6,0,0,160,64,160,16,120,136,112,
172
-  5,8,8,6,0,0,104,144,0,176,200,136,136,136,5,8,
173
-  8,6,0,0,64,32,0,112,136,136,136,112,5,8,8,6,
174
-  0,0,16,32,0,112,136,136,136,112,5,8,8,6,0,0,
175
-  32,80,0,112,136,136,136,112,5,8,8,6,0,0,104,144,
176
-  0,112,136,136,136,112,5,7,7,6,0,0,80,0,112,136,
177
-  136,136,112,5,5,5,6,0,1,32,0,248,0,32,5,7,
178
-  7,6,0,255,16,112,168,168,168,112,64,5,8,8,6,0,
179
-  0,64,32,0,136,136,136,152,104,5,8,8,6,0,0,16,
180
-  32,0,136,136,136,152,104,5,8,8,6,0,0,32,80,0,
181
-  136,136,136,152,104,5,7,7,6,0,0,80,0,136,136,136,
182
-  152,104,5,9,9,6,0,255,16,32,0,136,136,136,248,8,
183
-  112,4,7,7,6,1,255,192,64,96,80,96,64,224,5,8,
184
-  8,6,0,255,80,0,136,136,136,120,8,112};

+ 0
- 197
Marlin/dogm_font_data_ISO10646_1_tr.h View File

@@ -1,197 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/*
24
-  Fontname: ISO10646-1-tr
25
-  Copyright: public domain
26
-  Capital A Height: 7, '1' Height: 7
27
-  Calculated Max Values w= 5 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
30
-  Pure Font   ascent = 7 descent=-1
31
-  X Font      ascent = 7 descent=-1
32
-  Max Font    ascent = 8 descent=-1
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t ISO10646_TR[2591] U8G_SECTION(".progmem.ISO10646_TR") = {
36
-  0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
37
-  255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
38
-  128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
39
-  0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
40
-  120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
41
-  64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
42
-  2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
43
-  64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
44
-  32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
45
-  5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
46
-  64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
47
-  192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
48
-  0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
49
-  192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
50
-  128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
51
-  5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
52
-  6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
53
-  112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
54
-  32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
55
-  112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
56
-  5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
57
-  192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
58
-  32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
59
-  0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
60
-  8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
61
-  168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
62
-  7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
63
-  0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
64
-  136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
65
-  128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
66
-  5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
67
-  6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
68
-  128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
69
-  16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
70
-  136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
71
-  7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
72
-  0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
73
-  136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
74
-  128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
75
-  7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
76
-  0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
77
-  32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
78
-  136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
79
-  5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
80
-  6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
81
-  136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
82
-  32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
83
-  224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
84
-  1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
85
-  80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
86
-  64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
87
-  0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
88
-  128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
89
-  120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
90
-  0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
91
-  136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
92
-  136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
93
-  8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
94
-  6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
95
-  192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
96
-  168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
97
-  6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
98
-  136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
99
-  5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
100
-  0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
101
-  64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
102
-  5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
103
-  136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
104
-  6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
105
-  0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
106
-  64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
107
-  3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
108
-  6,0,2,104,144,0,0,0,6,0,0,0,0,0,6,0,
109
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
110
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
111
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
112
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
113
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
114
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
115
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
116
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
117
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
118
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
119
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
120
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
121
-  0,1,7,7,6,2,0,128,0,128,128,128,128,128,5,7,
122
-  7,6,0,0,32,112,168,160,168,112,32,5,7,7,6,0,
123
-  0,48,64,64,224,64,80,168,5,5,5,6,0,0,136,112,
124
-  80,112,136,5,7,7,6,0,0,136,80,32,248,32,248,32,
125
-  1,7,7,6,2,0,128,128,128,0,128,128,128,5,8,8,
126
-  6,0,0,48,72,32,80,80,32,144,96,3,1,1,6,1,
127
-  7,160,5,7,7,6,0,0,248,136,184,184,184,136,248,5,
128
-  7,7,6,0,1,112,8,120,136,120,0,248,5,5,5,6,
129
-  0,1,40,80,160,80,40,5,3,3,6,0,1,248,8,8,
130
-  2,2,2,6,2,6,64,128,5,7,7,6,0,0,248,136,
131
-  168,136,152,168,248,5,1,1,6,0,6,248,4,4,4,6,
132
-  0,3,96,144,144,96,5,7,7,6,0,0,32,32,248,32,
133
-  32,0,248,4,5,5,6,0,3,96,144,32,64,240,3,5,
134
-  5,6,0,3,224,32,224,32,224,2,2,2,6,2,6,64,
135
-  128,5,8,8,6,0,255,136,136,136,136,152,232,128,128,5,
136
-  7,7,6,0,0,120,152,152,120,24,24,24,2,2,2,6,
137
-  2,2,192,192,2,2,2,6,2,255,64,128,3,5,5,6,
138
-  0,3,64,192,64,64,224,5,7,7,6,0,1,112,136,136,
139
-  136,112,0,248,5,5,5,6,0,1,160,80,40,80,160,5,
140
-  7,7,6,0,0,136,144,168,88,184,8,8,5,7,7,6,
141
-  0,0,136,144,184,72,152,32,56,5,8,8,6,0,0,192,
142
-  64,192,72,216,56,8,8,5,7,7,6,0,0,32,0,32,
143
-  64,128,136,112,5,8,8,6,0,0,64,32,0,112,136,248,
144
-  136,136,5,8,8,6,0,0,16,32,0,112,136,248,136,136,
145
-  5,8,8,6,0,0,32,80,0,112,136,248,136,136,5,8,
146
-  8,6,0,0,104,144,0,112,136,248,136,136,5,8,8,6,
147
-  0,0,80,0,112,136,136,248,136,136,5,8,8,6,0,0,
148
-  32,80,32,112,136,248,136,136,5,7,7,6,0,0,56,96,
149
-  160,184,224,160,184,5,8,8,6,0,255,112,136,128,128,136,
150
-  112,32,96,5,8,8,6,0,0,64,32,0,248,128,240,128,
151
-  248,5,8,8,6,0,0,8,16,0,248,128,240,128,248,5,
152
-  8,8,6,0,0,32,80,0,248,128,240,128,248,5,7,7,
153
-  6,0,0,80,0,248,128,240,128,248,3,8,8,6,1,0,
154
-  128,64,0,224,64,64,64,224,3,8,8,6,1,0,32,64,
155
-  0,224,64,64,64,224,3,8,8,6,1,0,64,160,0,224,
156
-  64,64,64,224,3,7,7,6,1,0,160,0,224,64,64,64,
157
-  224,5,9,9,6,0,255,80,32,112,136,128,184,136,136,112,
158
-  5,8,8,6,0,0,104,144,0,136,200,168,152,136,5,8,
159
-  8,6,0,0,64,32,112,136,136,136,136,112,5,8,8,6,
160
-  0,0,16,32,112,136,136,136,136,112,5,8,8,6,0,0,
161
-  32,80,0,112,136,136,136,112,5,8,8,6,0,0,104,144,
162
-  0,112,136,136,136,112,5,8,8,6,0,0,80,0,112,136,
163
-  136,136,136,112,5,5,5,6,0,1,136,80,32,80,136,5,
164
-  8,8,6,0,255,16,112,168,168,168,168,112,64,5,8,8,
165
-  6,0,0,64,32,136,136,136,136,136,112,5,8,8,6,0,
166
-  0,16,32,136,136,136,136,136,112,5,8,8,6,0,0,32,
167
-  80,0,136,136,136,136,112,5,8,8,6,0,0,80,0,136,
168
-  136,136,136,136,112,1,7,7,6,2,0,128,0,128,128,128,
169
-  128,128,5,9,9,6,0,255,120,128,128,112,8,8,240,32,
170
-  96,4,8,8,6,1,255,96,144,144,160,144,144,224,128,5,
171
-  8,8,6,0,0,64,32,0,112,8,120,136,120,5,8,8,
172
-  6,0,0,16,32,0,112,8,120,136,120,5,8,8,6,0,
173
-  0,32,80,0,112,8,120,136,120,5,8,8,6,0,0,104,
174
-  144,0,112,8,120,136,120,5,7,7,6,0,0,80,0,112,
175
-  8,120,136,120,5,8,8,6,0,0,32,80,32,112,8,120,
176
-  136,120,5,6,6,6,0,0,208,40,120,160,168,80,5,7,
177
-  7,6,0,255,112,128,128,136,112,32,96,5,8,8,6,0,
178
-  0,64,32,0,112,136,248,128,112,5,8,8,6,0,0,16,
179
-  32,0,112,136,248,128,112,5,8,8,6,0,0,32,80,0,
180
-  112,136,248,128,112,5,7,7,6,0,0,80,0,112,136,248,
181
-  128,112,3,8,8,6,1,0,128,64,0,64,192,64,64,224,
182
-  3,8,8,6,1,0,32,64,0,64,192,64,64,224,3,8,
183
-  8,6,1,0,64,160,0,64,192,64,64,224,3,7,7,6,
184
-  1,0,160,0,64,192,64,64,224,5,8,8,6,0,255,80,
185
-  32,112,136,136,120,8,112,5,8,8,6,0,0,104,144,0,
186
-  176,200,136,136,136,5,8,8,6,0,0,64,32,0,112,136,
187
-  136,136,112,5,8,8,6,0,0,16,32,0,112,136,136,136,
188
-  112,5,8,8,6,0,0,32,80,0,112,136,136,136,112,5,
189
-  8,8,6,0,0,104,144,0,112,136,136,136,112,5,7,7,
190
-  6,0,0,80,0,112,136,136,136,112,5,5,5,6,0,1,
191
-  32,0,248,0,32,5,7,7,6,0,255,16,112,168,168,168,
192
-  112,64,5,8,8,6,0,0,64,32,0,136,136,136,152,104,
193
-  5,8,8,6,0,0,16,32,0,136,136,136,152,104,5,8,
194
-  8,6,0,0,32,80,0,136,136,136,152,104,5,7,7,6,
195
-  0,0,80,0,136,136,136,152,104,1,5,5,6,2,0,128,
196
-  128,128,128,128,5,7,7,6,0,255,112,128,112,8,240,32,
197
-  96,5,8,8,6,0,255,80,0,136,136,136,120,8,112};

+ 0
- 196
Marlin/dogm_font_data_ISO10646_5_Cyrillic.h View File

@@ -1,196 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  Fontname: ISO10646_5_Cyrillic
25
-  Copyright: A. Hardtung, public domain
26
-  Capital A Height: 7, '1' Height: 7
27
-  Calculated Max Values w= 5 h= 9 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 9
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
30
-  Pure Font   ascent = 7 descent=-1
31
-  X Font      ascent = 7 descent=-1
32
-  Max Font    ascent = 8 descent=-1
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t ISO10646_5_Cyrillic_5x7[2560] U8G_SECTION(".progmem.ISO10646_5_Cyrillic_5x7") = {
36
-  0, 6, 9, 0, 254, 7, 1, 145, 3, 32, 32, 255, 255, 8, 255, 7,
37
-  255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
38
-  128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
39
-  0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
40
-  120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
41
-  64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
42
-  2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
43
-  64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
44
-  32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
45
-  5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
46
-  64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
47
-  192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
48
-  0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
49
-  192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
50
-  128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
51
-  5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
52
-  6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
53
-  48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
54
-  32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
55
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5,
56
-  5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
57
-  192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
58
-  32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
59
-  0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
60
-  8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168,
61
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7,
62
-  7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0,
63
-  0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144,
64
-  136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
65
-  128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5,
66
-  7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6,
67
-  0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128,
68
-  128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
69
-  16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136,
70
-  5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7,
71
-  6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0,
72
-  136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136,
73
-  136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128,
74
-  128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7,
75
-  7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0,
76
-  0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32,
77
-  32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136,
78
-  136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5,
79
-  7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6,
80
-  0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136,
81
-  136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32,
82
-  64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224,
83
-  5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, 1,
84
-  0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, 80,
85
-  136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, 64,
86
-  5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0,
87
-  0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, 128,
88
-  128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, 120,
89
-  5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, 0,
90
-  0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, 136,
91
-  136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, 136,
92
-  136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 8,
93
-  8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, 6,
94
-  0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, 192,
95
-  64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, 168,
96
-  168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, 6,
97
-  0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, 136,
98
-  240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, 5,
99
-  5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, 0,
100
-  112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, 64, 64,
101
-  72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, 5,
102
-  6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, 136,
103
-  168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, 6,
104
-  6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, 0,
105
-  248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, 64,
106
-  64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, 3,
107
-  7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2, 6,
108
-  0, 3, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
109
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
110
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
111
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
112
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
113
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
114
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
115
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
116
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
117
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
118
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
119
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
120
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5, 8, 8, 6, 0, 0,
121
-  64, 248, 128, 128, 240, 128, 128, 248, 5, 8, 8, 6, 0, 0, 80, 248,
122
-  128, 128, 240, 128, 128, 248, 5, 7, 7, 6, 0, 0, 224, 64, 64, 112,
123
-  72, 72, 112, 5, 8, 8, 6, 0, 0, 16, 32, 248, 136, 128, 128, 128,
124
-  128, 5, 7, 7, 6, 0, 0, 48, 72, 128, 224, 128, 72, 48, 5, 7,
125
-  7, 6, 0, 0, 112, 136, 128, 112, 8, 136, 112, 3, 7, 7, 6, 1,
126
-  0, 224, 64, 64, 64, 64, 64, 224, 3, 8, 8, 6, 1, 0, 160, 0,
127
-  224, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
128
-  16, 144, 96, 5, 7, 7, 6, 0, 0, 160, 160, 160, 184, 168, 168, 184,
129
-  5, 7, 7, 6, 0, 0, 160, 160, 160, 248, 168, 168, 184, 4, 7, 7,
130
-  6, 0, 0, 224, 64, 112, 80, 80, 80, 80, 5, 8, 8, 6, 0, 0,
131
-  16, 32, 136, 144, 160, 224, 144, 136, 5, 8, 8, 6, 0, 0, 64, 32,
132
-  136, 152, 168, 200, 136, 136, 5, 9, 9, 6, 0, 255, 80, 32, 136, 136,
133
-  136, 80, 32, 32, 32, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 136,
134
-  136, 248, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136,
135
-  5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 136, 136, 240, 5, 7, 7,
136
-  6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0, 0,
137
-  248, 136, 128, 128, 128, 128, 128, 5, 8, 8, 6, 0, 255, 120, 40, 40,
138
-  40, 72, 136, 248, 136, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
139
-  128, 248, 5, 7, 7, 6, 0, 0, 168, 168, 168, 112, 168, 168, 168, 5,
140
-  7, 7, 6, 0, 0, 240, 8, 8, 112, 8, 8, 240, 5, 7, 7, 6,
141
-  0, 0, 136, 136, 152, 168, 200, 136, 136, 5, 8, 8, 6, 0, 0, 80,
142
-  32, 136, 152, 168, 168, 200, 136, 5, 7, 7, 6, 0, 0, 136, 144, 160,
143
-  192, 160, 144, 136, 5, 7, 7, 6, 0, 0, 120, 40, 40, 40, 40, 168,
144
-  72, 5, 7, 7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7,
145
-  7, 6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 5, 7, 7, 6, 0,
146
-  0, 112, 136, 136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 136,
147
-  136, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
148
-  128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 128, 128, 128, 136, 112, 5,
149
-  7, 7, 6, 0, 0, 248, 32, 32, 32, 32, 32, 32, 5, 7, 7, 6,
150
-  0, 0, 136, 136, 136, 80, 32, 64, 128, 5, 7, 7, 6, 0, 0, 32,
151
-  112, 168, 168, 168, 112, 32, 5, 7, 7, 6, 0, 0, 136, 136, 80, 32,
152
-  80, 136, 136, 5, 8, 8, 6, 0, 255, 136, 136, 136, 136, 136, 136, 248,
153
-  8, 5, 7, 7, 6, 0, 0, 136, 136, 136, 152, 104, 8, 8, 5, 7,
154
-  7, 6, 0, 0, 168, 168, 168, 168, 168, 168, 248, 5, 8, 8, 6, 0,
155
-  255, 168, 168, 168, 168, 168, 168, 248, 8, 5, 7, 7, 6, 0, 0, 192,
156
-  64, 64, 112, 72, 72, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 200,
157
-  168, 168, 200, 5, 7, 7, 6, 0, 0, 128, 128, 128, 240, 136, 136, 240,
158
-  5, 7, 7, 6, 0, 0, 112, 136, 8, 56, 8, 136, 112, 5, 7, 7,
159
-  6, 0, 0, 144, 168, 168, 232, 168, 168, 144, 5, 7, 7, 6, 0, 0,
160
-  120, 136, 136, 120, 40, 72, 136, 5, 5, 5, 6, 0, 0, 112, 8, 120,
161
-  136, 120, 5, 7, 7, 6, 0, 0, 24, 96, 128, 240, 136, 136, 112, 4,
162
-  5, 5, 6, 0, 0, 224, 144, 224, 144, 224, 5, 5, 5, 6, 0, 0,
163
-  248, 136, 128, 128, 128, 5, 6, 6, 6, 0, 255, 120, 40, 72, 136, 248,
164
-  136, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 5, 5, 6,
165
-  0, 0, 168, 168, 112, 168, 168, 5, 5, 5, 6, 0, 0, 240, 8, 48,
166
-  8, 240, 5, 5, 5, 6, 0, 0, 136, 152, 168, 200, 136, 5, 7, 7,
167
-  6, 0, 0, 80, 32, 136, 152, 168, 200, 136, 4, 5, 5, 6, 0, 0,
168
-  144, 160, 192, 160, 144, 5, 5, 5, 6, 0, 0, 248, 40, 40, 168, 72,
169
-  5, 5, 5, 6, 0, 0, 136, 216, 168, 136, 136, 5, 5, 5, 6, 0,
170
-  0, 136, 136, 248, 136, 136, 5, 5, 5, 6, 0, 0, 112, 136, 136, 136,
171
-  112, 5, 5, 5, 6, 0, 0, 248, 136, 136, 136, 136, 5, 6, 6, 6,
172
-  0, 255, 240, 136, 136, 240, 128, 128, 5, 5, 5, 6, 0, 0, 112, 128,
173
-  128, 136, 112, 5, 5, 5, 6, 0, 0, 248, 32, 32, 32, 32, 5, 6,
174
-  6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 6, 6, 6, 0, 0,
175
-  32, 112, 168, 168, 112, 32, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80,
176
-  136, 5, 6, 6, 6, 0, 255, 136, 136, 136, 136, 248, 8, 5, 5, 5,
177
-  6, 0, 0, 136, 136, 248, 8, 8, 5, 5, 5, 6, 0, 0, 168, 168,
178
-  168, 168, 248, 5, 6, 6, 6, 0, 255, 168, 168, 168, 168, 248, 8, 5,
179
-  5, 5, 6, 0, 0, 192, 64, 112, 72, 112, 5, 5, 5, 6, 0, 0,
180
-  136, 136, 200, 168, 200, 3, 5, 5, 6, 1, 0, 128, 128, 192, 160, 192,
181
-  5, 5, 5, 6, 0, 0, 112, 136, 56, 136, 112, 5, 5, 5, 6, 0,
182
-  0, 144, 168, 232, 168, 144, 5, 5, 5, 6, 0, 0, 120, 136, 120, 40,
183
-  72, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 248, 128, 112, 5,
184
-  7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112, 5, 9, 9, 6,
185
-  0, 255, 64, 224, 64, 64, 120, 72, 72, 72, 16, 5, 8, 8, 6, 0,
186
-  0, 16, 32, 0, 248, 136, 128, 128, 128, 5, 5, 5, 6, 0, 0, 112,
187
-  136, 96, 136, 112, 5, 5, 5, 6, 0, 0, 112, 128, 112, 8, 240, 1,
188
-  7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 7, 7, 6,
189
-  1, 0, 160, 0, 64, 64, 64, 64, 64, 3, 8, 8, 6, 1, 255, 32,
190
-  0, 32, 32, 32, 32, 160, 64, 5, 5, 5, 6, 0, 0, 160, 160, 184,
191
-  168, 184, 5, 5, 5, 6, 0, 0, 160, 160, 248, 168, 184, 5, 6, 6,
192
-  6, 0, 0, 64, 224, 64, 120, 72, 72, 4, 8, 8, 6, 0, 0, 16,
193
-  32, 0, 144, 160, 192, 160, 144, 5, 8, 8, 6, 0, 0, 64, 32, 0,
194
-  136, 152, 168, 200, 136, 5, 9, 9, 6, 0, 255, 80, 32, 0, 136, 136,
195
-  136, 120, 8, 112, 5, 6, 6, 6, 0, 255, 136, 136, 136, 136, 248, 32
196
-};

+ 0
- 293
Marlin/dogm_font_data_ISO10646_CN.h View File

@@ -1,293 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  Fontname: ISO10646_CN
25
-  Copyright: A. Hardtung, public domain
26
-  Capital A Height: 7, '1' Height: 7
27
-  Calculated Max Values w=11 h=11 x= 2 y=10 dx=12 dy= 0 ascent=10 len=22
28
-  Font Bounding box     w=12 h=11 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
30
-  Pure Font   ascent = 7 descent=-1
31
-  X Font      ascent = 7 descent=-1
32
-  Max Font    ascent =10 descent=-1
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t ISO10646_CN[4105] U8G_SECTION(".progmem.ISO10646_CN") = {
36
-  0, 12, 11, 0, 254, 7, 1, 146, 3, 33, 32, 255, 255, 10, 255, 7,
37
-  255, 0, 0, 0, 6, 0, 10, 1, 7, 7, 6, 2, 0, 128, 128, 128,
38
-  128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
39
-  0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
40
-  120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
41
-  64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
42
-  2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
43
-  64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
44
-  32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
45
-  5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
46
-  64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
47
-  192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
48
-  0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
49
-  192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
50
-  128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
51
-  5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
52
-  6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
53
-  112, 128, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
54
-  32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
55
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 8, 112, 2, 5,
56
-  5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
57
-  192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
58
-  32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 0,
59
-  0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
60
-  8, 16, 32, 0, 32, 5, 7, 7, 6, 0, 0, 112, 136, 8, 104, 168,
61
-  168, 112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5,
62
-  7, 7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6,
63
-  0, 0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 240,
64
-  136, 136, 136, 136, 136, 240, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240,
65
-  128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128,
66
-  5, 7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7,
67
-  6, 0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0,
68
-  128, 128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16,
69
-  16, 16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144,
70
-  136, 5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7,
71
-  7, 6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0,
72
-  0, 136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136,
73
-  136, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128,
74
-  128, 128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5,
75
-  7, 7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6,
76
-  0, 0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248,
77
-  32, 32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136,
78
-  136, 136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32,
79
-  5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7,
80
-  6, 0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0,
81
-  136, 136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16,
82
-  32, 64, 128, 248, 3, 7, 7, 6, 0, 0, 224, 128, 128, 128, 128, 128,
83
-  224, 5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6,
84
-  0, 0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32,
85
-  80, 136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128,
86
-  64, 5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6,
87
-  0, 0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112,
88
-  128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136,
89
-  120, 5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6,
90
-  0, 0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112,
91
-  136, 136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136,
92
-  136, 136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3,
93
-  8, 8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7,
94
-  6, 1, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0,
95
-  192, 64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168,
96
-  168, 168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5,
97
-  6, 0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136,
98
-  136, 240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8,
99
-  5, 5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0,
100
-  0, 112, 128, 112, 8, 240, 4, 7, 7, 6, 0, 0, 64, 64, 224, 64,
101
-  64, 64, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5,
102
-  5, 6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136,
103
-  136, 168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5,
104
-  6, 6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0,
105
-  0, 248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128,
106
-  64, 64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128,
107
-  3, 7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2,
108
-  6, 0, 3, 104, 144, 0, 0, 0, 6, 0, 10, 0, 0, 0, 12, 0,
109
-  10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0,
110
-  12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0,
111
-  0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0,
112
-  10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0,
113
-  12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0,
114
-  0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0,
115
-  10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0,
116
-  12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0,
117
-  0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0,
118
-  10, 0, 0, 0, 12, 0, 10, 0, 0, 0, 12, 0, 10, 0, 0, 0,
119
-  12, 0, 10, 0, 0, 0, 12, 0, 10, 11, 11, 22, 12, 0, 255, 255,
120
-  224, 2, 0, 2, 0, 4, 0, 13, 0, 20, 128, 36, 64, 196, 32, 4,
121
-  0, 4, 0, 4, 0, 11, 11, 22, 12, 0, 255, 249, 0, 138, 0, 171,
122
-  224, 172, 64, 170, 64, 170, 64, 170, 64, 170, 128, 33, 0, 82, 128, 140,
123
-  96, 11, 11, 22, 12, 0, 255, 36, 0, 36, 0, 63, 128, 68, 0, 132,
124
-  0, 4, 0, 255, 224, 10, 0, 17, 0, 32, 128, 192, 96, 11, 11, 22,
125
-  12, 0, 255, 36, 0, 36, 0, 63, 192, 68, 0, 4, 0, 255, 224, 9,
126
-  0, 9, 0, 17, 32, 33, 32, 64, 224, 11, 11, 22, 12, 0, 255, 32,
127
-  0, 61, 224, 81, 32, 145, 32, 17, 32, 255, 32, 17, 32, 41, 32, 37,
128
-  224, 69, 32, 128, 0, 11, 11, 22, 12, 0, 255, 32, 128, 127, 192, 8,
129
-  64, 255, 224, 17, 0, 32, 128, 95, 64, 128, 32, 63, 128, 0, 0, 127,
130
-  192, 11, 11, 22, 12, 0, 255, 34, 64, 71, 224, 148, 128, 228, 128, 47,
131
-  224, 68, 128, 244, 128, 7, 224, 52, 128, 196, 128, 7, 224, 11, 11, 22,
132
-  12, 0, 255, 4, 128, 143, 224, 73, 0, 25, 0, 47, 192, 9, 0, 9,
133
-  0, 47, 192, 73, 0, 137, 0, 15, 224, 11, 11, 22, 12, 0, 255, 16,
134
-  0, 63, 128, 81, 0, 14, 0, 49, 128, 192, 96, 63, 128, 36, 128, 63,
135
-  128, 36, 128, 63, 128, 11, 11, 22, 12, 0, 255, 34, 128, 250, 64, 7,
136
-  224, 250, 128, 138, 128, 138, 128, 250, 128, 34, 128, 178, 128, 170, 160, 100,
137
-  224, 11, 11, 22, 12, 0, 255, 34, 32, 71, 64, 146, 128, 239, 224, 34,
138
-  0, 71, 192, 236, 64, 7, 192, 52, 64, 199, 192, 4, 64, 11, 11, 22,
139
-  12, 0, 255, 8, 0, 15, 192, 8, 0, 8, 0, 255, 224, 8, 0, 14,
140
-  0, 9, 128, 8, 64, 8, 0, 8, 0, 10, 11, 22, 12, 0, 255, 255,
141
-  128, 0, 128, 0, 128, 128, 128, 128, 128, 255, 128, 128, 0, 128, 0, 128,
142
-  64, 128, 64, 127, 192, 11, 11, 22, 12, 0, 255, 71, 192, 65, 0, 239,
143
-  224, 65, 0, 69, 0, 105, 96, 201, 32, 77, 96, 73, 32, 79, 224, 200,
144
-  32, 11, 11, 22, 12, 0, 255, 8, 0, 4, 0, 4, 0, 10, 0, 10,
145
-  0, 10, 0, 17, 0, 17, 0, 32, 128, 64, 64, 128, 32, 11, 11, 22,
146
-  12, 0, 255, 34, 64, 34, 0, 247, 224, 34, 0, 35, 224, 53, 32, 229,
147
-  32, 37, 64, 40, 128, 41, 64, 114, 32, 11, 10, 20, 12, 0, 0, 68,
148
-  64, 68, 64, 68, 64, 127, 192, 4, 0, 4, 0, 132, 32, 132, 32, 132,
149
-  32, 255, 224, 11, 11, 22, 12, 0, 255, 4, 0, 0, 0, 127, 192, 4,
150
-  0, 4, 0, 4, 0, 127, 192, 4, 0, 4, 0, 4, 0, 255, 224, 11,
151
-  11, 22, 12, 0, 255, 255, 224, 17, 0, 1, 192, 254, 0, 72, 128, 37,
152
-  0, 4, 0, 255, 224, 21, 0, 36, 128, 196, 96, 11, 11, 22, 12, 0,
153
-  255, 17, 0, 127, 192, 68, 64, 127, 192, 68, 64, 127, 192, 4, 0, 255,
154
-  224, 4, 0, 4, 0, 4, 0, 9, 11, 22, 12, 0, 255, 16, 0, 255,
155
-  128, 128, 128, 128, 128, 255, 128, 128, 128, 128, 128, 255, 128, 128, 128, 128,
156
-  128, 255, 128, 11, 11, 22, 12, 0, 255, 113, 0, 1, 0, 3, 224, 249,
157
-  32, 33, 32, 65, 32, 81, 32, 137, 32, 250, 32, 2, 32, 4, 192, 11,
158
-  11, 22, 12, 0, 255, 127, 192, 17, 0, 17, 0, 17, 0, 17, 0, 255,
159
-  224, 17, 0, 17, 0, 33, 0, 33, 0, 65, 0, 11, 11, 22, 12, 0,
160
-  255, 33, 0, 34, 0, 244, 64, 87, 224, 80, 32, 87, 192, 148, 64, 84,
161
-  64, 36, 64, 87, 192, 148, 64, 11, 11, 22, 12, 0, 255, 17, 0, 10,
162
-  0, 127, 192, 4, 0, 4, 0, 255, 224, 4, 0, 10, 0, 17, 0, 32,
163
-  128, 192, 96, 10, 11, 22, 12, 0, 255, 95, 192, 0, 64, 132, 64, 132,
164
-  64, 191, 64, 132, 64, 140, 64, 148, 64, 164, 64, 140, 64, 129, 192, 11,
165
-  11, 22, 12, 0, 255, 36, 0, 39, 192, 36, 0, 36, 0, 255, 224, 0,
166
-  0, 20, 64, 36, 128, 71, 0, 12, 0, 112, 0, 11, 11, 22, 12, 0,
167
-  255, 36, 128, 4, 128, 15, 192, 228, 128, 36, 128, 63, 224, 36, 128, 36,
168
-  128, 40, 128, 80, 0, 143, 224, 11, 11, 22, 12, 0, 255, 8, 0, 8,
169
-  0, 255, 128, 136, 128, 136, 128, 255, 128, 136, 128, 136, 128, 255, 160, 136,
170
-  32, 7, 224, 11, 11, 22, 12, 0, 255, 39, 128, 36, 128, 244, 128, 36,
171
-  128, 116, 128, 108, 128, 164, 128, 36, 128, 36, 160, 40, 160, 48, 96, 10,
172
-  11, 22, 12, 0, 255, 255, 192, 128, 64, 128, 64, 158, 64, 146, 64, 146,
173
-  64, 158, 64, 128, 64, 128, 64, 255, 192, 128, 64, 11, 11, 22, 12, 0,
174
-  255, 127, 192, 68, 0, 95, 192, 80, 64, 95, 192, 80, 64, 95, 192, 66,
175
-  0, 74, 128, 82, 64, 166, 32, 11, 11, 22, 12, 0, 255, 4, 0, 7,
176
-  224, 4, 0, 127, 192, 64, 64, 64, 64, 64, 64, 127, 192, 0, 0, 82,
177
-  64, 137, 32, 11, 11, 22, 12, 0, 255, 71, 128, 36, 128, 4, 128, 4,
178
-  128, 232, 96, 32, 0, 47, 192, 36, 64, 34, 128, 49, 0, 38, 192, 11,
179
-  11, 22, 12, 0, 255, 127, 192, 74, 64, 127, 192, 4, 0, 255, 224, 4,
180
-  0, 63, 128, 32, 128, 36, 128, 36, 128, 255, 224, 11, 11, 22, 12, 0,
181
-  255, 34, 0, 79, 224, 72, 32, 79, 224, 200, 0, 79, 224, 74, 160, 90,
182
-  160, 111, 224, 74, 160, 72, 96, 11, 11, 22, 12, 0, 255, 243, 192, 36,
183
-  64, 42, 128, 241, 0, 34, 128, 101, 224, 114, 32, 165, 64, 32, 128, 35,
184
-  0, 44, 0, 11, 11, 22, 12, 0, 255, 4, 0, 255, 224, 128, 32, 0,
185
-  0, 255, 224, 4, 0, 36, 0, 39, 192, 36, 0, 84, 0, 143, 224, 11,
186
-  11, 22, 12, 0, 255, 115, 224, 16, 128, 81, 0, 35, 224, 250, 32, 42,
187
-  160, 34, 160, 34, 160, 32, 128, 33, 64, 98, 32, 11, 11, 22, 12, 0,
188
-  255, 34, 0, 247, 128, 34, 128, 54, 128, 226, 160, 37, 160, 36, 96, 104,
189
-  32, 0, 0, 82, 64, 137, 32, 11, 11, 22, 12, 0, 255, 115, 192, 66,
190
-  0, 66, 0, 123, 224, 74, 64, 74, 64, 122, 64, 74, 64, 66, 64, 68,
191
-  64, 136, 64, 11, 11, 22, 12, 0, 255, 8, 0, 255, 224, 8, 0, 31,
192
-  192, 48, 64, 95, 192, 144, 64, 31, 192, 16, 64, 16, 64, 16, 192, 11,
193
-  11, 22, 12, 0, 255, 2, 0, 127, 224, 66, 0, 66, 0, 95, 192, 66,
194
-  0, 71, 0, 74, 128, 82, 64, 98, 32, 130, 0, 11, 11, 22, 12, 0,
195
-  255, 243, 192, 150, 64, 145, 128, 166, 96, 161, 0, 151, 192, 145, 0, 149,
196
-  0, 231, 224, 129, 0, 129, 0, 11, 11, 22, 12, 0, 255, 15, 128, 136,
197
-  128, 79, 128, 8, 128, 143, 128, 64, 0, 31, 192, 53, 64, 85, 64, 149,
198
-  64, 63, 224, 11, 11, 22, 12, 0, 255, 39, 224, 32, 128, 248, 128, 32,
199
-  128, 32, 128, 56, 128, 224, 128, 32, 128, 32, 128, 32, 128, 97, 128, 11,
200
-  11, 22, 12, 0, 255, 31, 224, 145, 0, 87, 192, 20, 64, 23, 192, 148,
201
-  64, 87, 192, 17, 0, 85, 64, 153, 32, 35, 0, 11, 11, 22, 12, 0,
202
-  255, 32, 128, 39, 224, 242, 64, 33, 128, 34, 64, 52, 32, 226, 64, 34,
203
-  64, 34, 64, 34, 64, 100, 64, 11, 11, 22, 12, 0, 255, 65, 0, 65,
204
-  0, 79, 224, 233, 32, 73, 32, 73, 32, 111, 224, 201, 32, 73, 32, 73,
205
-  32, 207, 224, 11, 11, 22, 12, 0, 255, 33, 0, 241, 0, 79, 224, 169,
206
-  32, 249, 32, 47, 224, 57, 32, 233, 32, 41, 32, 47, 224, 40, 32, 11,
207
-  11, 22, 12, 0, 255, 143, 224, 73, 32, 9, 32, 203, 160, 73, 32, 79,
208
-  224, 72, 32, 75, 160, 74, 160, 107, 160, 80, 224, 11, 11, 22, 12, 0,
209
-  255, 127, 192, 4, 0, 68, 64, 36, 64, 36, 128, 4, 0, 255, 224, 4,
210
-  0, 4, 0, 4, 0, 4, 0, 11, 11, 22, 12, 0, 255, 130, 0, 66,
211
-  0, 31, 224, 194, 0, 95, 192, 82, 64, 95, 192, 71, 0, 74, 128, 82,
212
-  64, 191, 224, 11, 11, 22, 12, 0, 255, 4, 0, 127, 224, 72, 128, 127,
213
-  224, 72, 128, 79, 128, 64, 0, 95, 192, 72, 64, 71, 128, 152, 96, 11,
214
-  11, 22, 12, 0, 255, 1, 0, 239, 224, 161, 0, 164, 64, 175, 224, 164,
215
-  64, 175, 224, 169, 32, 233, 32, 2, 128, 12, 96, 11, 11, 22, 12, 0,
216
-  255, 20, 192, 246, 160, 188, 96, 167, 128, 168, 128, 191, 224, 169, 32, 239,
217
-  224, 9, 32, 15, 224, 9, 32, 11, 11, 22, 12, 0, 255, 127, 128, 64,
218
-  128, 66, 128, 98, 128, 84, 128, 72, 128, 72, 128, 84, 160, 98, 160, 64,
219
-  96, 128, 32, 11, 11, 22, 12, 0, 255, 4, 0, 127, 224, 64, 32, 127,
220
-  224, 64, 0, 125, 224, 84, 32, 76, 160, 84, 96, 100, 160, 141, 96, 11,
221
-  11, 22, 12, 0, 255, 130, 0, 95, 224, 4, 0, 8, 64, 159, 224, 64,
222
-  32, 10, 128, 10, 128, 74, 160, 146, 160, 34, 96, 11, 11, 22, 12, 0,
223
-  255, 65, 0, 79, 224, 232, 32, 66, 128, 68, 64, 104, 32, 199, 192, 65,
224
-  0, 65, 0, 65, 0, 207, 224, 11, 11, 22, 12, 0, 255, 80, 32, 125,
225
-  32, 145, 32, 255, 32, 17, 32, 125, 32, 85, 32, 85, 32, 84, 32, 92,
226
-  32, 16, 224, 11, 11, 22, 12, 0, 255, 63, 128, 32, 128, 63, 128, 32,
227
-  128, 255, 224, 72, 0, 123, 192, 73, 64, 121, 64, 72, 128, 251, 96, 11,
228
-  11, 22, 12, 0, 255, 4, 0, 4, 0, 4, 0, 36, 128, 36, 64, 68,
229
-  64, 68, 32, 132, 32, 4, 0, 4, 0, 28, 0, 11, 11, 22, 12, 0,
230
-  255, 4, 0, 4, 0, 4, 0, 255, 224, 4, 0, 10, 0, 10, 0, 17,
231
-  0, 17, 0, 32, 128, 192, 96, 9, 10, 20, 10, 0, 0, 136, 128, 73,
232
-  0, 8, 0, 255, 128, 0, 128, 0, 128, 127, 128, 0, 128, 0, 128, 255,
233
-  128, 11, 11, 22, 12, 0, 255, 33, 0, 18, 0, 255, 224, 0, 0, 120,
234
-  128, 74, 128, 122, 128, 74, 128, 122, 128, 72, 128, 89, 128, 11, 11, 22,
235
-  12, 0, 255, 39, 192, 0, 0, 0, 0, 239, 224, 33, 0, 34, 0, 36,
236
-  64, 47, 224, 32, 32, 80, 0, 143, 224, 11, 11, 22, 12, 0, 255, 32,
237
-  128, 39, 0, 249, 0, 33, 192, 119, 0, 33, 0, 249, 224, 39, 0, 113,
238
-  32, 169, 32, 32, 224, 11, 11, 22, 12, 0, 255, 16, 64, 16, 64, 253,
239
-  224, 16, 64, 56, 192, 53, 64, 82, 64, 148, 64, 16, 64, 16, 64, 16,
240
-  192, 11, 11, 22, 12, 0, 255, 0, 64, 248, 64, 11, 224, 8, 64, 136,
241
-  64, 82, 64, 81, 64, 33, 64, 80, 64, 72, 64, 137, 192, 10, 11, 22,
242
-  12, 0, 255, 132, 0, 132, 64, 132, 128, 245, 0, 134, 0, 132, 0, 132,
243
-  0, 148, 0, 164, 64, 196, 64, 131, 192, 11, 11, 22, 12, 0, 255, 17,
244
-  32, 125, 0, 17, 0, 255, 224, 41, 0, 253, 64, 73, 64, 124, 128, 8,
245
-  160, 253, 96, 10, 32, 11, 11, 22, 12, 0, 255, 23, 192, 36, 64, 36,
246
-  64, 103, 192, 161, 0, 47, 224, 33, 0, 35, 128, 37, 64, 41, 32, 33,
247
-  0, 11, 11, 22, 12, 0, 255, 8, 0, 255, 224, 16, 0, 39, 192, 32,
248
-  128, 97, 0, 175, 224, 33, 0, 33, 0, 33, 0, 35, 0, 11, 11, 22,
249
-  12, 0, 255, 36, 0, 47, 224, 180, 0, 164, 128, 164, 160, 170, 192, 42,
250
-  128, 40, 128, 41, 64, 50, 64, 36, 32, 11, 11, 22, 12, 0, 255, 127,
251
-  224, 128, 0, 63, 192, 32, 64, 63, 192, 16, 0, 31, 192, 16, 64, 40,
252
-  128, 71, 0, 56, 224, 11, 11, 22, 12, 0, 255, 127, 224, 64, 0, 64,
253
-  0, 64, 0, 64, 0, 64, 0, 64, 0, 64, 0, 64, 0, 64, 0, 128,
254
-  0, 11, 11, 22, 12, 0, 255, 255, 224, 4, 0, 127, 192, 68, 64, 127,
255
-  192, 68, 64, 127, 192, 68, 0, 36, 0, 24, 0, 231, 224, 11, 11, 22,
256
-  12, 0, 255, 17, 224, 253, 0, 69, 0, 41, 224, 253, 64, 17, 64, 125,
257
-  64, 17, 64, 85, 64, 146, 64, 52, 64, 11, 11, 22, 12, 0, 255, 33,
258
-  0, 95, 224, 64, 0, 207, 192, 64, 0, 79, 192, 64, 0, 79, 192, 72,
259
-  64, 79, 192, 72, 64, 11, 11, 22, 12, 0, 255, 4, 0, 127, 192, 64,
260
-  64, 127, 192, 64, 64, 127, 192, 64, 64, 127, 192, 4, 64, 82, 32, 191,
261
-  160, 11, 11, 22, 12, 0, 255, 127, 192, 68, 64, 127, 192, 68, 64, 127,
262
-  192, 4, 0, 27, 0, 224, 224, 17, 0, 17, 0, 97, 0, 11, 11, 22,
263
-  12, 0, 255, 255, 224, 4, 0, 8, 0, 127, 224, 73, 32, 79, 32, 73,
264
-  32, 79, 32, 73, 32, 73, 32, 127, 224, 11, 11, 22, 12, 0, 255, 253,
265
-  224, 86, 64, 121, 64, 56, 128, 85, 64, 146, 32, 255, 224, 4, 0, 39,
266
-  192, 36, 0, 255, 224, 11, 11, 22, 12, 0, 255, 251, 128, 82, 0, 123,
267
-  224, 18, 64, 250, 64, 20, 64, 63, 128, 32, 128, 63, 128, 32, 128, 63,
268
-  128, 11, 11, 22, 12, 0, 255, 31, 224, 32, 0, 39, 192, 100, 64, 167,
269
-  192, 32, 0, 47, 224, 40, 32, 39, 192, 33, 0, 35, 0, 11, 11, 22,
270
-  12, 0, 255, 243, 224, 130, 32, 130, 32, 250, 32, 130, 32, 130, 32, 138,
271
-  32, 178, 32, 194, 224, 2, 0, 2, 0, 11, 11, 22, 12, 0, 255, 36,
272
-  128, 70, 160, 149, 192, 228, 128, 39, 224, 68, 128, 245, 192, 6, 160, 52,
273
-  128, 196, 128, 7, 224, 11, 11, 22, 12, 0, 255, 39, 192, 65, 0, 135,
274
-  224, 224, 32, 34, 128, 69, 128, 242, 128, 15, 224, 48, 128, 193, 64, 2,
275
-  32, 11, 11, 22, 12, 0, 255, 2, 0, 2, 0, 34, 0, 35, 192, 34,
276
-  0, 34, 0, 34, 0, 34, 0, 34, 0, 34, 0, 255, 224, 9, 11, 22,
277
-  12, 0, 255, 8, 0, 8, 0, 255, 128, 136, 128, 136, 128, 136, 128, 255,
278
-  128, 136, 128, 136, 128, 136, 128, 255, 128, 11, 11, 22, 12, 0, 255, 33,
279
-  0, 83, 160, 65, 0, 247, 224, 81, 0, 83, 192, 86, 64, 83, 192, 90,
280
-  64, 83, 192, 66, 64, 11, 11, 22, 12, 0, 255, 127, 192, 4, 0, 4,
281
-  0, 4, 0, 255, 224, 10, 0, 10, 0, 18, 0, 34, 32, 66, 32, 129,
282
-  224, 11, 11, 22, 12, 0, 255, 17, 0, 33, 0, 47, 224, 97, 0, 163,
283
-  128, 35, 128, 37, 64, 37, 64, 41, 32, 33, 0, 33, 0, 11, 11, 22,
284
-  12, 0, 255, 247, 224, 148, 32, 244, 32, 151, 224, 148, 128, 244, 128, 151,
285
-  224, 148, 128, 244, 160, 150, 96, 4, 32, 11, 11, 22, 12, 0, 255, 123,
286
-  224, 148, 128, 4, 0, 127, 192, 4, 0, 255, 224, 1, 0, 255, 224, 33,
287
-  0, 17, 0, 7, 0, 11, 11, 22, 12, 0, 255, 33, 0, 71, 192, 145,
288
-  0, 47, 224, 96, 128, 175, 224, 32, 128, 36, 128, 34, 128, 32, 128, 35,
289
-  128, 11, 11, 22, 12, 0, 255, 39, 192, 36, 64, 247, 192, 46, 224, 42,
290
-  160, 62, 224, 225, 0, 47, 224, 35, 128, 37, 64, 105, 32, 11, 11, 22,
291
-  12, 0, 255, 20, 0, 39, 224, 42, 0, 98, 0, 163, 192, 34, 0, 34,
292
-  0, 35, 224, 34, 0, 34, 0, 34, 0
293
-};

+ 0
- 192
Marlin/dogm_font_data_ISO10646_CZ.h View File

@@ -1,192 +0,0 @@
1
-/*
2
-  Fontname: ISO10646_CZ
3
-  Copyright: A. Hardtung, public domain
4
-  Modified for Czech accents by Petr Zahradnik, http://www.zahradniksebavi.cz
5
-  Capital A Height: 7, '1' Height: 7
6
-  Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
7
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
8
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
9
-  Pure Font   ascent = 7 descent=-1
10
-  X Font      ascent = 7 descent=-1
11
-  Max Font    ascent = 8 descent=-1
12
-*/
13
-#include <U8glib.h>
14
-const u8g_fntpgm_uint8_t ISO10646_CZ[2832] U8G_SECTION(".progmem.ISO10646_CZ") = {
15
-  0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
16
-  255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
17
-  128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
18
-  0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
19
-  120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
20
-  64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
21
-  2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
22
-  64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
23
-  32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
24
-  5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
25
-  64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
26
-  192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
27
-  0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
28
-  192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
29
-  128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
30
-  5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
31
-  6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
32
-  112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
33
-  32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
34
-  112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
35
-  5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
36
-  192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
37
-  32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
38
-  0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
39
-  8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
40
-  168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
41
-  7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
42
-  0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
43
-  136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
44
-  128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
45
-  5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
46
-  6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
47
-  128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
48
-  16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
49
-  136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
50
-  7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
51
-  0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
52
-  136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
53
-  128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
54
-  7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
55
-  0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
56
-  32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
57
-  136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
58
-  5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
59
-  6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
60
-  136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
61
-  32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
62
-  224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
63
-  1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
64
-  80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
65
-  64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
66
-  0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
67
-  128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
68
-  120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
69
-  0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
70
-  136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
71
-  136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
72
-  8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
73
-  6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
74
-  192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
75
-  168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
76
-  6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
77
-  136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
78
-  5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
79
-  0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
80
-  64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
81
-  5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
82
-  136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
83
-  6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
84
-  0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
85
-  64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
86
-  3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
87
-  6,0,2,104,144,0,0,0,6,0,0,5,8,8,6,0,
88
-  0,16,32,112,136,136,248,136,136,5,8,8,6,0,0,8,
89
-  16,248,128,128,240,128,248,3,8,8,6,1,0,32,64,224,
90
-  64,64,64,64,224,5,8,8,6,0,0,16,32,112,136,136,
91
-  136,136,112,5,8,8,6,0,0,16,32,136,136,136,136,136,
92
-  112,5,8,8,6,0,0,16,32,136,136,80,32,32,32,5,
93
-  8,8,6,0,0,16,32,0,112,8,120,136,120,5,8,8,
94
-  6,0,0,16,32,0,112,136,248,128,112,2,8,8,6,2,
95
-  0,64,128,0,128,128,128,128,128,5,8,8,6,0,0,16,
96
-  32,0,112,136,136,136,112,5,8,8,6,0,0,16,32,0,
97
-  136,136,136,152,104,5,9,9,6,0,255,16,32,0,136,136,
98
-  136,120,8,112,5,8,8,6,0,0,80,32,112,136,128,128,
99
-  136,112,5,8,8,6,0,0,80,32,0,112,128,128,136,112,
100
-  5,8,8,6,0,0,80,32,240,136,136,136,136,240,6,8,
101
-  8,6,0,0,4,20,24,112,144,144,144,112,5,8,8,6,
102
-  0,0,80,32,248,128,128,240,128,248,5,8,8,6,0,0,
103
-  80,32,0,112,136,248,128,112,5,8,8,6,0,0,80,32,
104
-  136,200,168,152,136,136,5,8,8,6,0,0,80,32,0,176,
105
-  200,136,136,136,5,8,8,6,0,0,80,32,240,136,240,160,
106
-  144,136,5,8,8,6,0,0,80,32,0,176,200,128,128,128,
107
-  5,8,8,6,0,0,80,32,120,128,128,112,8,240,5,8,
108
-  8,6,0,0,80,32,0,112,128,112,8,240,5,8,8,6,
109
-  0,0,80,32,248,32,32,32,32,32,6,8,8,6,0,0,
110
-  4,68,72,224,64,64,64,48,5,8,8,6,0,0,32,80,
111
-  168,136,136,136,136,112,5,8,8,6,0,0,32,80,32,136,
112
-  136,136,152,104,5,8,8,6,0,0,80,32,248,8,48,64,
113
-  128,248,5,8,8,6,0,0,80,32,0,248,16,32,64,248,
114
-  0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
115
-  0,0,1,7,7,6,2,0,128,0,128,128,128,128,128,5,
116
-  7,7,6,0,0,32,112,168,160,168,112,32,5,7,7,6,
117
-  0,0,48,64,64,224,64,80,168,5,5,5,6,0,0,136,
118
-  112,80,112,136,5,7,7,6,0,0,136,80,32,248,32,248,
119
-  32,1,7,7,6,2,0,128,128,128,0,128,128,128,5,8,
120
-  8,6,0,0,48,72,32,80,80,32,144,96,3,1,1,6,
121
-  1,7,160,5,7,7,6,0,0,248,136,184,184,184,136,248,
122
-  5,7,7,6,0,1,112,8,120,136,120,0,248,5,5,5,
123
-  6,0,1,40,80,160,80,40,5,3,3,6,0,1,248,8,
124
-  8,2,2,2,6,2,6,64,128,5,7,7,6,0,0,248,
125
-  136,168,136,152,168,248,5,1,1,6,0,6,248,4,4,4,
126
-  6,0,3,96,144,144,96,5,7,7,6,0,0,32,32,248,
127
-  32,32,0,248,4,5,5,6,0,3,96,144,32,64,240,3,
128
-  5,5,6,0,3,224,32,224,32,224,2,2,2,6,2,6,
129
-  64,128,5,8,8,6,0,255,136,136,136,136,152,232,128,128,
130
-  5,7,7,6,0,0,120,152,152,120,24,24,24,2,2,2,
131
-  6,2,2,192,192,2,2,2,6,2,255,64,128,3,5,5,
132
-  6,0,3,64,192,64,64,224,5,7,7,6,0,1,112,136,
133
-  136,136,112,0,248,5,5,5,6,0,1,160,80,40,80,160,
134
-  5,7,7,6,0,0,136,144,168,88,184,8,8,5,7,7,
135
-  6,0,0,136,144,184,72,152,32,56,5,8,8,6,0,0,
136
-  192,64,192,72,216,56,8,8,5,7,7,6,0,0,32,0,
137
-  32,64,128,136,112,5,8,8,6,0,0,64,32,0,112,136,
138
-  248,136,136,5,8,8,6,0,0,16,32,0,112,136,248,136,
139
-  136,5,8,8,6,0,0,32,80,0,112,136,248,136,136,5,
140
-  8,8,6,0,0,104,144,0,112,136,248,136,136,5,8,8,
141
-  6,0,0,80,0,112,136,136,248,136,136,5,8,8,6,0,
142
-  0,32,80,32,112,136,248,136,136,5,7,7,6,0,0,56,
143
-  96,160,184,224,160,184,5,8,8,6,0,255,112,136,128,128,
144
-  136,112,32,96,5,8,8,6,0,0,64,32,0,248,128,240,
145
-  128,248,5,8,8,6,0,0,8,16,0,248,128,240,128,248,
146
-  5,8,8,6,0,0,32,80,0,248,128,240,128,248,5,7,
147
-  7,6,0,0,80,0,248,128,240,128,248,3,8,8,6,1,
148
-  0,128,64,0,224,64,64,64,224,3,8,8,6,1,0,32,
149
-  64,0,224,64,64,64,224,3,8,8,6,1,0,64,160,0,
150
-  224,64,64,64,224,3,7,7,6,1,0,160,0,224,64,64,
151
-  64,224,5,9,9,6,0,255,80,32,112,136,128,184,136,136,
152
-  112,5,8,8,6,0,0,104,144,0,136,200,168,152,136,5,
153
-  8,8,6,0,0,64,32,112,136,136,136,136,112,5,8,8,
154
-  6,0,0,16,32,112,136,136,136,136,112,5,8,8,6,0,
155
-  0,32,80,0,112,136,136,136,112,5,8,8,6,0,0,104,
156
-  144,0,112,136,136,136,112,5,8,8,6,0,0,80,0,112,
157
-  136,136,136,136,112,5,5,5,6,0,1,136,80,32,80,136,
158
-  5,8,8,6,0,255,16,112,168,168,168,168,112,64,5,8,
159
-  8,6,0,0,64,32,136,136,136,136,136,112,5,8,8,6,
160
-  0,0,16,32,136,136,136,136,136,112,5,8,8,6,0,0,
161
-  32,80,0,136,136,136,136,112,5,8,8,6,0,0,80,0,
162
-  136,136,136,136,136,112,1,7,7,6,2,0,128,0,128,128,
163
-  128,128,128,5,9,9,6,0,255,120,128,128,112,8,8,240,
164
-  32,96,4,8,8,6,1,255,96,144,144,160,144,144,224,128,
165
-  5,8,8,6,0,0,64,32,0,112,8,120,136,120,5,8,
166
-  8,6,0,0,16,32,0,112,8,120,136,120,5,8,8,6,
167
-  0,0,32,80,0,112,8,120,136,120,5,8,8,6,0,0,
168
-  104,144,0,112,8,120,136,120,5,7,7,6,0,0,80,0,
169
-  112,8,120,136,120,5,8,8,6,0,0,32,80,32,112,8,
170
-  120,136,120,5,6,6,6,0,0,208,40,120,160,168,80,5,
171
-  7,7,6,0,255,112,128,128,136,112,32,96,5,8,8,6,
172
-  0,0,64,32,0,112,136,248,128,112,5,8,8,6,0,0,
173
-  16,32,0,112,136,248,128,112,5,8,8,6,0,0,32,80,
174
-  0,112,136,248,128,112,5,7,7,6,0,0,80,0,112,136,
175
-  248,128,112,3,8,8,6,1,0,128,64,0,64,192,64,64,
176
-  224,3,8,8,6,1,0,32,64,0,64,192,64,64,224,3,
177
-  8,8,6,1,0,64,160,0,64,192,64,64,224,3,7,7,
178
-  6,1,0,160,0,64,192,64,64,224,5,8,8,6,0,255,
179
-  80,32,112,136,136,120,8,112,5,8,8,6,0,0,104,144,
180
-  0,176,200,136,136,136,5,8,8,6,0,0,64,32,0,112,
181
-  136,136,136,112,5,8,8,6,0,0,16,32,0,112,136,136,
182
-  136,112,5,8,8,6,0,0,32,80,0,112,136,136,136,112,
183
-  5,8,8,6,0,0,104,144,0,112,136,136,136,112,5,7,
184
-  7,6,0,0,80,0,112,136,136,136,112,5,5,5,6,0,
185
-  1,32,0,248,0,32,5,7,7,6,0,255,16,112,168,168,
186
-  168,112,64,5,8,8,6,0,0,64,32,0,136,136,136,152,
187
-  104,5,8,8,6,0,0,16,32,0,136,136,136,152,104,5,
188
-  8,8,6,0,0,32,80,0,136,136,136,152,104,5,7,7,
189
-  6,0,0,80,0,136,136,136,152,104,1,5,5,6,2,0,
190
-  128,128,128,128,128,5,7,7,6,0,255,112,128,112,8,240,
191
-  32,96,5,8,8,6,0,255,80,0,136,136,136,120,8,112
192
-  };

+ 0
- 205
Marlin/dogm_font_data_ISO10646_Greek.h View File

@@ -1,205 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/*
24
-  Fontname: ISO10646_4_Greek
25
-  Copyright: A. Hardtung, public domain
26
-  Capital A Height: 7, '1' Height: 7
27
-  Calculated Max Values w= 5 h= 9 x= 2 y= 6 dx= 6 dy= 0 ascent= 8 len= 9
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
30
-  Pure Font   ascent = 7 descent=-1
31
-  X Font      ascent = 7 descent=-1
32
-  Max Font    ascent = 8 descent=-1
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t ISO10646_Greek_5x7[2715] U8G_SECTION(".progmem.ISO10646_Greek_5x7") = {
36
-  0,6,9,0,254,7,1,145,3,32,32,255,255,8,255,7,
37
-  255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
38
-  128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
39
-  0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
40
-  120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
41
-  64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
42
-  2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
43
-  64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
44
-  32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
45
-  5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
46
-  64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
47
-  192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
48
-  0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64,
49
-  192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
50
-  128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
51
-  5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
52
-  6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
53
-  48,64,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
54
-  32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
55
-  112,5,7,7,6,0,0,112,136,136,120,8,16,96,2,5,
56
-  5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
57
-  192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
58
-  32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
59
-  0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
60
-  8,16,32,0,32,5,6,6,6,0,0,112,136,8,104,168,
61
-  112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,7,
62
-  7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,0,
63
-  0,112,136,128,128,128,136,112,5,7,7,6,0,0,224,144,
64
-  136,136,136,144,224,5,7,7,6,0,0,248,128,128,240,128,
65
-  128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,5,
66
-  7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,6,
67
-  0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,128,
68
-  128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,16,
69
-  16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,136,
70
-  5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,7,
71
-  6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,0,
72
-  136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,136,
73
-  136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,128,
74
-  128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,7,
75
-  7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,0,
76
-  0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,32,
77
-  32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,136,
78
-  136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,5,
79
-  7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,6,
80
-  0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,136,
81
-  136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,32,
82
-  64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,224,
83
-  5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,1,
84
-  0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,80,
85
-  136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,64,
86
-  5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,0,
87
-  0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,128,
88
-  128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,120,
89
-  5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,0,
90
-  0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,136,
91
-  136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,136,
92
-  136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,8,
93
-  8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,6,
94
-  0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,192,
95
-  64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,168,
96
-  168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,6,
97
-  0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,136,
98
-  240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,5,
99
-  5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,0,
100
-  112,128,112,8,240,5,7,7,6,0,0,64,64,224,64,64,
101
-  72,48,5,5,5,6,0,0,136,136,136,152,104,5,5,5,
102
-  6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,136,
103
-  168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,6,
104
-  6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,0,
105
-  248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,64,
106
-  64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,3,
107
-  7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,6,
108
-  0,3,104,144,0,0,0,6,0,0,0,0,0,6,0,0,
109
-  0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,
110
-  0,0,2,2,2,6,1,6,64,128,3,3,3,6,1,5,
111
-  32,64,160,5,8,8,6,0,0,64,160,80,80,136,248,136,
112
-  136,2,2,2,6,1,2,192,192,5,8,8,6,0,0,64,
113
-  128,248,128,240,128,128,248,5,8,8,6,0,0,64,128,136,
114
-  136,248,136,136,136,4,8,8,6,0,0,64,128,112,32,32,
115
-  32,32,112,0,0,0,6,0,0,5,8,8,6,0,0,64,
116
-  128,112,136,136,136,136,112,0,0,0,6,0,0,5,8,8,
117
-  6,0,0,64,128,8,136,112,32,32,32,5,8,8,6,0,
118
-  0,64,128,112,136,136,136,80,216,3,8,8,6,1,0,32,
119
-  64,160,0,64,64,64,32,5,7,7,6,0,0,32,80,136,
120
-  136,248,136,136,5,7,7,6,0,0,240,72,72,112,72,72,
121
-  240,5,7,7,6,0,0,248,128,128,128,128,128,128,5,6,
122
-  6,6,0,0,32,80,80,136,136,248,5,7,7,6,0,0,
123
-  248,128,128,240,128,128,248,5,7,7,6,0,0,248,8,16,
124
-  32,64,128,248,5,7,7,6,0,0,136,136,136,248,136,136,
125
-  136,5,7,7,6,0,0,112,136,136,168,136,136,112,3,7,
126
-  7,6,1,0,224,64,64,64,64,64,224,5,7,7,6,0,
127
-  0,136,144,160,192,160,144,136,5,7,7,6,0,0,32,80,
128
-  136,136,136,136,136,5,7,7,6,0,0,136,216,168,168,136,
129
-  136,136,5,7,7,6,0,0,136,200,200,168,152,152,136,5,
130
-  7,7,6,0,0,248,0,0,112,0,0,248,5,7,7,6,
131
-  0,0,112,136,136,136,136,136,112,5,7,7,6,0,0,248,
132
-  80,80,80,80,80,80,5,7,7,6,0,0,240,136,136,240,
133
-  128,128,128,0,0,0,6,0,0,5,7,7,6,0,0,248,
134
-  128,64,32,64,128,248,5,7,7,6,0,0,248,32,32,32,
135
-  32,32,32,5,7,7,6,0,0,136,136,80,32,32,32,32,
136
-  5,7,7,6,0,0,112,32,112,168,112,32,112,5,7,7,
137
-  6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
138
-  168,168,168,168,112,32,32,5,6,6,6,0,0,112,136,136,
139
-  80,80,216,3,8,8,6,1,0,160,0,224,64,64,64,64,
140
-  224,5,8,8,6,0,0,80,0,136,136,136,80,32,32,5,
141
-  8,8,6,0,0,32,64,8,104,152,144,144,104,5,8,8,
142
-  6,0,0,32,64,0,112,136,224,136,112,5,9,9,6,0,
143
-  255,32,64,0,112,136,136,136,136,8,2,8,8,6,1,0,
144
-  64,128,0,128,128,128,128,64,5,8,8,6,0,0,16,32,
145
-  80,0,136,136,136,112,5,6,6,6,0,0,8,104,152,144,
146
-  144,104,4,6,6,6,0,255,96,144,240,144,224,128,5,6,
147
-  6,6,0,255,136,72,80,32,32,64,5,6,6,6,0,0,
148
-  48,64,112,136,136,112,5,5,5,6,0,0,112,136,224,136,
149
-  112,5,8,8,6,0,255,128,112,64,128,128,112,8,112,5,
150
-  6,6,6,0,255,184,200,136,136,136,8,5,5,5,6,0,
151
-  0,112,136,248,136,112,3,5,5,6,1,0,128,128,128,128,
152
-  96,4,5,5,6,0,0,144,160,192,160,144,5,6,6,6,
153
-  0,0,64,32,32,80,80,136,5,6,6,6,0,255,136,136,
154
-  136,216,168,128,5,5,5,6,0,0,136,136,80,96,32,5,
155
-  9,9,6,0,255,128,224,128,112,32,64,240,8,112,5,5,
156
-  5,6,0,0,112,136,136,136,112,5,5,5,6,0,0,248,
157
-  80,80,80,80,5,6,6,6,0,255,112,136,136,200,176,128,
158
-  5,7,7,6,0,255,48,64,128,64,48,8,112,5,5,5,
159
-  6,0,0,104,144,144,144,96,4,5,5,6,0,0,240,64,
160
-  64,64,48,5,5,5,6,0,0,136,136,144,144,224,5,7,
161
-  7,6,0,255,32,168,168,168,112,32,32,5,6,6,6,0,
162
-  255,136,80,32,32,80,136,5,6,6,6,0,255,168,168,168,
163
-  168,112,32,5,5,5,6,0,0,80,136,136,168,112,4,7,
164
-  7,6,0,0,160,0,64,64,64,64,48,5,7,7,6,0,
165
-  0,80,0,136,136,144,144,224,4,8,8,6,0,0,32,64,
166
-  0,96,144,144,144,96,5,8,8,6,0,0,32,64,0,136,
167
-  136,144,144,96,5,8,8,6,0,0,32,64,0,80,136,136,
168
-  168,112,5,7,7,6,0,255,144,160,192,160,144,136,16,5,
169
-  8,8,6,0,0,96,144,160,128,240,136,136,112,5,7,7,
170
-  6,0,0,112,80,56,144,144,144,96,5,6,6,6,0,0,
171
-  152,80,32,32,32,32,5,8,8,6,0,0,64,128,152,80,
172
-  32,32,32,32,5,8,8,6,0,0,80,0,152,80,32,32,
173
-  32,32,5,7,7,6,0,255,48,168,168,168,168,112,32,5,
174
-  5,5,6,0,0,248,80,80,80,88,5,6,6,6,0,255,
175
-  136,80,112,80,136,16,5,7,7,6,0,255,112,136,136,136,
176
-  112,32,112,5,6,6,6,0,255,112,136,136,112,32,112,5,
177
-  6,6,6,0,0,112,136,128,112,32,112,5,7,7,6,0,
178
-  255,8,8,112,128,112,16,96,5,6,6,6,0,0,248,128,
179
-  128,240,128,128,4,5,5,6,0,0,240,128,224,128,128,5,
180
-  6,6,6,0,0,248,0,0,112,0,248,4,5,5,6,0,
181
-  0,64,128,240,16,32,5,7,7,6,0,0,224,80,40,40,
182
-  8,8,16,5,7,7,6,0,0,192,32,80,40,8,8,8,
183
-  5,7,7,6,0,255,168,168,168,168,88,8,112,5,6,6,
184
-  6,0,255,168,168,168,88,8,112,5,6,6,6,0,0,104,
185
-  136,136,120,8,8,5,6,6,6,0,255,104,136,136,120,8,
186
-  8,4,8,8,6,0,255,128,224,144,144,144,144,32,192,5,
187
-  5,5,6,0,0,104,144,112,16,224,5,6,6,6,0,0,
188
-  96,144,16,96,136,112,4,6,6,6,0,0,96,144,16,96,
189
-  128,112,5,6,6,6,0,0,136,80,32,80,136,248,5,5,
190
-  5,6,0,0,136,80,32,80,112,5,6,6,6,0,0,120,
191
-  128,240,136,136,112,4,5,5,6,0,0,240,128,224,144,96,
192
-  3,6,6,6,1,0,64,224,64,64,64,64,3,6,6,6,
193
-  1,255,64,224,64,64,64,128,5,5,5,6,0,0,136,80,
194
-  112,80,136,5,6,6,6,0,255,112,136,136,240,128,112,4,
195
-  5,5,6,0,0,112,128,128,128,112,2,8,8,6,1,255,
196
-  64,0,192,64,64,64,64,128,5,7,7,6,0,0,112,136,
197
-  136,248,136,136,112,4,5,5,6,0,0,112,128,224,128,112,
198
-  4,5,5,6,0,0,224,16,112,16,224,5,7,7,6,0,
199
-  0,128,240,136,136,136,240,128,4,7,7,6,0,255,128,224,
200
-  144,144,144,224,128,5,6,6,6,0,0,112,136,128,128,136,
201
-  112,5,6,6,6,0,0,136,216,168,136,136,136,5,6,6,
202
-  6,0,255,136,216,168,136,136,128,5,8,8,6,0,255,112,
203
-  136,136,136,112,64,224,64,5,6,6,6,0,0,112,136,8,
204
-  8,136,112,5,6,6,6,0,0,112,136,160,128,136,112,5,
205
-  6,6,6,0,0,112,136,40,8,136,112};

+ 0
- 192
Marlin/dogm_font_data_ISO10646_Kana.h View File

@@ -1,192 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  Fontname: ISO10646_Kana
25
-  Copyright: A. Hardtung, public domain
26
-  Capital A Height: 7, '1' Height: 7
27
-  Calculated Max Values w= 5 h= 8 x= 2 y= 5 dx= 6 dy= 0 ascent= 8 len= 8
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
30
-  Pure Font   ascent = 7 descent=-1
31
-  X Font      ascent = 7 descent=-1
32
-  Max Font    ascent = 8 descent=-1
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t ISO10646_Kana_5x7[2482] U8G_SECTION(".progmem.ISO10646_Kana_5x7") = {
36
-  0, 6, 9, 0, 254, 7, 1, 145, 3, 32, 32, 255, 255, 8, 255, 7,
37
-  255, 0, 0, 0, 6, 0, 0, 1, 7, 7, 6, 2, 0, 128, 128, 128,
38
-  128, 128, 0, 128, 3, 2, 2, 6, 1, 5, 160, 160, 5, 7, 7, 6,
39
-  0, 0, 80, 80, 248, 80, 248, 80, 80, 5, 7, 7, 6, 0, 0, 32,
40
-  120, 160, 112, 40, 240, 32, 5, 7, 7, 6, 0, 0, 192, 200, 16, 32,
41
-  64, 152, 24, 5, 7, 7, 6, 0, 0, 96, 144, 160, 64, 168, 144, 104,
42
-  2, 3, 3, 6, 1, 4, 192, 64, 128, 3, 7, 7, 6, 1, 0, 32,
43
-  64, 128, 128, 128, 64, 32, 3, 7, 7, 6, 1, 0, 128, 64, 32, 32,
44
-  32, 64, 128, 5, 5, 5, 6, 0, 1, 32, 168, 112, 168, 32, 5, 5,
45
-  5, 6, 0, 1, 32, 32, 248, 32, 32, 2, 3, 3, 6, 2, 255, 192,
46
-  64, 128, 5, 1, 1, 6, 0, 3, 248, 2, 2, 2, 6, 2, 0, 192,
47
-  192, 5, 5, 5, 6, 0, 1, 8, 16, 32, 64, 128, 5, 7, 7, 6,
48
-  0, 0, 112, 136, 152, 168, 200, 136, 112, 3, 7, 7, 6, 1, 0, 64,
49
-  192, 64, 64, 64, 64, 224, 5, 7, 7, 6, 0, 0, 112, 136, 8, 112,
50
-  128, 128, 248, 5, 7, 7, 6, 0, 0, 248, 16, 32, 16, 8, 8, 240,
51
-  5, 7, 7, 6, 0, 0, 16, 48, 80, 144, 248, 16, 16, 5, 7, 7,
52
-  6, 0, 0, 248, 128, 240, 8, 8, 136, 112, 5, 7, 7, 6, 0, 0,
53
-  48, 64, 128, 240, 136, 136, 112, 5, 7, 7, 6, 0, 0, 248, 8, 16,
54
-  32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 112, 136, 136, 112, 136, 136,
55
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 120, 8, 16, 96, 2, 5,
56
-  5, 6, 2, 0, 192, 192, 0, 192, 192, 2, 6, 6, 6, 2, 255, 192,
57
-  192, 0, 192, 64, 128, 4, 7, 7, 6, 0, 0, 16, 32, 64, 128, 64,
58
-  32, 16, 5, 3, 3, 6, 0, 2, 248, 0, 248, 4, 7, 7, 6, 1,
59
-  0, 128, 64, 32, 16, 32, 64, 128, 5, 7, 7, 6, 0, 0, 112, 136,
60
-  8, 16, 32, 0, 32, 5, 6, 6, 6, 0, 0, 112, 136, 8, 104, 168,
61
-  112, 5, 7, 7, 6, 0, 0, 112, 136, 136, 248, 136, 136, 136, 5, 7,
62
-  7, 6, 0, 0, 240, 136, 136, 240, 136, 136, 240, 5, 7, 7, 6, 0,
63
-  0, 112, 136, 128, 128, 128, 136, 112, 5, 7, 7, 6, 0, 0, 224, 144,
64
-  136, 136, 136, 144, 224, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128,
65
-  128, 248, 5, 7, 7, 6, 0, 0, 248, 128, 128, 240, 128, 128, 128, 5,
66
-  7, 7, 6, 0, 0, 112, 136, 128, 184, 136, 136, 112, 5, 7, 7, 6,
67
-  0, 0, 136, 136, 136, 248, 136, 136, 136, 1, 7, 7, 6, 2, 0, 128,
68
-  128, 128, 128, 128, 128, 128, 5, 7, 7, 6, 0, 0, 56, 16, 16, 16,
69
-  16, 144, 96, 5, 7, 7, 6, 0, 0, 136, 144, 160, 192, 160, 144, 136,
70
-  5, 7, 7, 6, 0, 0, 128, 128, 128, 128, 128, 128, 248, 5, 7, 7,
71
-  6, 0, 0, 136, 216, 168, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0,
72
-  136, 136, 200, 168, 152, 136, 136, 5, 7, 7, 6, 0, 0, 112, 136, 136,
73
-  136, 136, 136, 112, 5, 7, 7, 6, 0, 0, 240, 136, 136, 240, 128, 128,
74
-  128, 5, 7, 7, 6, 0, 0, 112, 136, 136, 136, 168, 144, 104, 5, 7,
75
-  7, 6, 0, 0, 240, 136, 136, 240, 160, 144, 136, 5, 7, 7, 6, 0,
76
-  0, 120, 128, 128, 112, 8, 8, 240, 5, 7, 7, 6, 0, 0, 248, 32,
77
-  32, 32, 32, 32, 32, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136,
78
-  136, 112, 5, 7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 80, 32, 5,
79
-  7, 7, 6, 0, 0, 136, 136, 136, 136, 136, 168, 80, 5, 7, 7, 6,
80
-  0, 0, 136, 136, 80, 32, 80, 136, 136, 5, 7, 7, 6, 0, 0, 136,
81
-  136, 136, 80, 32, 32, 32, 5, 7, 7, 6, 0, 0, 248, 8, 16, 32,
82
-  64, 128, 248, 3, 7, 7, 6, 1, 0, 224, 128, 128, 128, 128, 128, 224,
83
-  5, 5, 5, 6, 0, 1, 128, 64, 32, 16, 8, 3, 7, 7, 6, 1,
84
-  0, 224, 32, 32, 32, 32, 32, 224, 5, 3, 3, 6, 0, 4, 32, 80,
85
-  136, 5, 1, 1, 6, 0, 0, 248, 2, 2, 2, 6, 2, 5, 128, 64,
86
-  5, 5, 5, 6, 0, 0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0,
87
-  0, 128, 128, 176, 200, 136, 136, 240, 5, 5, 5, 6, 0, 0, 112, 128,
88
-  128, 136, 112, 5, 7, 7, 6, 0, 0, 8, 8, 104, 152, 136, 136, 120,
89
-  5, 5, 5, 6, 0, 0, 112, 136, 248, 128, 112, 5, 7, 7, 6, 0,
90
-  0, 48, 72, 224, 64, 64, 64, 64, 5, 6, 6, 6, 0, 255, 112, 136,
91
-  136, 120, 8, 112, 5, 7, 7, 6, 0, 0, 128, 128, 176, 200, 136, 136,
92
-  136, 1, 7, 7, 6, 2, 0, 128, 0, 128, 128, 128, 128, 128, 3, 8,
93
-  8, 6, 1, 255, 32, 0, 32, 32, 32, 32, 160, 64, 4, 7, 7, 6,
94
-  0, 0, 128, 128, 144, 160, 192, 160, 144, 3, 7, 7, 6, 1, 0, 192,
95
-  64, 64, 64, 64, 64, 224, 5, 5, 5, 6, 0, 0, 208, 168, 168, 168,
96
-  168, 5, 5, 5, 6, 0, 0, 176, 200, 136, 136, 136, 5, 5, 5, 6,
97
-  0, 0, 112, 136, 136, 136, 112, 5, 6, 6, 6, 0, 255, 240, 136, 136,
98
-  240, 128, 128, 5, 6, 6, 6, 0, 255, 120, 136, 136, 120, 8, 8, 5,
99
-  5, 5, 6, 0, 0, 176, 200, 128, 128, 128, 5, 5, 5, 6, 0, 0,
100
-  112, 128, 112, 8, 240, 5, 7, 7, 6, 0, 0, 64, 64, 224, 64, 64,
101
-  72, 48, 5, 5, 5, 6, 0, 0, 136, 136, 136, 152, 104, 5, 5, 5,
102
-  6, 0, 0, 136, 136, 136, 80, 32, 5, 5, 5, 6, 0, 0, 136, 136,
103
-  168, 168, 80, 5, 5, 5, 6, 0, 0, 136, 80, 32, 80, 136, 5, 6,
104
-  6, 6, 0, 255, 136, 136, 136, 120, 8, 112, 5, 5, 5, 6, 0, 0,
105
-  248, 16, 32, 64, 248, 3, 7, 7, 6, 1, 0, 32, 64, 64, 128, 64,
106
-  64, 32, 1, 7, 7, 6, 2, 0, 128, 128, 128, 128, 128, 128, 128, 3,
107
-  7, 7, 6, 1, 0, 128, 64, 64, 32, 64, 64, 128, 5, 2, 2, 6,
108
-  0, 3, 104, 144, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
109
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
110
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
111
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
112
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
113
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
114
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
115
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
116
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
117
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0,
118
-  0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6,
119
-  0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0,
120
-  0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 5, 3, 3, 6, 0, 1,
121
-  248, 0, 248, 4, 4, 4, 6, 0, 0, 240, 16, 96, 64, 5, 6, 6,
122
-  6, 0, 0, 248, 8, 40, 48, 32, 64, 3, 4, 4, 6, 1, 0, 32,
123
-  64, 192, 64, 4, 6, 6, 6, 0, 0, 16, 32, 96, 160, 32, 32, 4,
124
-  4, 4, 6, 0, 0, 32, 240, 144, 32, 5, 6, 6, 6, 0, 0, 32,
125
-  248, 136, 8, 16, 32, 3, 4, 4, 6, 1, 0, 224, 64, 64, 224, 5,
126
-  5, 5, 6, 0, 0, 248, 32, 32, 32, 248, 4, 4, 4, 6, 0, 0,
127
-  32, 240, 96, 160, 5, 6, 6, 6, 0, 0, 16, 248, 48, 80, 144, 16,
128
-  5, 6, 6, 6, 0, 0, 64, 248, 72, 72, 72, 144, 5, 8, 8, 6,
129
-  0, 0, 40, 0, 64, 248, 72, 72, 72, 144, 5, 6, 6, 6, 0, 0,
130
-  32, 248, 32, 248, 32, 32, 5, 8, 8, 6, 0, 0, 40, 0, 32, 248,
131
-  32, 248, 32, 32, 4, 5, 5, 6, 0, 0, 112, 144, 16, 32, 192, 5,
132
-  7, 7, 6, 0, 0, 40, 0, 112, 144, 16, 32, 192, 5, 6, 6, 6,
133
-  0, 0, 64, 120, 144, 16, 16, 32, 5, 8, 8, 6, 0, 0, 40, 0,
134
-  64, 120, 144, 16, 16, 32, 5, 5, 5, 6, 0, 0, 248, 8, 8, 8,
135
-  248, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 8, 8, 248, 5, 6,
136
-  6, 6, 0, 0, 80, 248, 80, 16, 32, 64, 5, 8, 8, 6, 0, 0,
137
-  40, 0, 80, 248, 80, 16, 32, 64, 5, 5, 5, 6, 0, 0, 192, 8,
138
-  200, 16, 224, 5, 7, 7, 6, 0, 0, 40, 0, 192, 8, 200, 16, 224,
139
-  5, 5, 5, 6, 0, 0, 248, 16, 32, 80, 136, 5, 7, 7, 6, 0,
140
-  0, 40, 0, 248, 16, 32, 80, 136, 5, 6, 6, 6, 0, 0, 64, 248,
141
-  72, 80, 64, 56, 5, 8, 8, 6, 0, 0, 40, 0, 64, 248, 72, 80,
142
-  64, 56, 5, 5, 5, 6, 0, 0, 136, 136, 72, 16, 96, 5, 7, 7,
143
-  6, 0, 0, 40, 0, 136, 136, 72, 16, 96, 5, 5, 5, 6, 0, 0,
144
-  120, 72, 168, 16, 96, 5, 7, 7, 6, 0, 0, 40, 0, 120, 72, 168,
145
-  16, 96, 5, 6, 6, 6, 0, 0, 16, 224, 32, 248, 32, 64, 5, 8,
146
-  8, 6, 0, 0, 40, 0, 16, 224, 32, 248, 32, 64, 5, 4, 4, 6,
147
-  0, 0, 168, 168, 8, 48, 5, 5, 5, 6, 0, 0, 168, 168, 8, 16,
148
-  32, 5, 7, 7, 6, 0, 0, 40, 0, 168, 168, 8, 16, 32, 5, 6,
149
-  6, 6, 0, 0, 112, 0, 248, 32, 32, 64, 5, 8, 8, 6, 0, 0,
150
-  40, 0, 112, 0, 248, 32, 32, 64, 3, 6, 6, 6, 1, 0, 128, 128,
151
-  192, 160, 128, 128, 4, 8, 8, 6, 1, 0, 80, 0, 128, 128, 192, 160,
152
-  128, 128, 5, 6, 6, 6, 0, 0, 32, 248, 32, 32, 64, 128, 5, 5,
153
-  5, 6, 0, 0, 112, 0, 0, 0, 248, 5, 5, 5, 6, 0, 0, 248,
154
-  8, 80, 32, 208, 5, 6, 6, 6, 0, 0, 32, 248, 16, 32, 112, 168,
155
-  3, 6, 6, 6, 1, 0, 32, 32, 32, 32, 64, 128, 5, 5, 5, 6,
156
-  0, 0, 16, 136, 136, 136, 136, 5, 7, 7, 6, 0, 0, 40, 0, 16,
157
-  136, 136, 136, 136, 5, 8, 8, 6, 0, 0, 24, 24, 0, 16, 136, 136,
158
-  136, 136, 5, 6, 6, 6, 0, 0, 128, 128, 248, 128, 128, 120, 5, 7,
159
-  7, 6, 0, 0, 40, 128, 128, 248, 128, 128, 120, 5, 7, 7, 6, 0,
160
-  0, 24, 152, 128, 248, 128, 128, 120, 5, 5, 5, 6, 0, 0, 248, 8,
161
-  8, 16, 96, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 8, 16, 96,
162
-  5, 8, 8, 6, 0, 0, 24, 24, 0, 248, 8, 8, 16, 96, 5, 4,
163
-  4, 6, 0, 1, 64, 160, 16, 8, 5, 6, 6, 6, 0, 1, 40, 0,
164
-  64, 160, 16, 8, 5, 6, 6, 6, 0, 1, 24, 24, 64, 160, 16, 8,
165
-  5, 6, 6, 6, 0, 0, 32, 248, 32, 168, 168, 32, 5, 8, 8, 6,
166
-  0, 0, 40, 0, 32, 248, 32, 168, 168, 32, 5, 8, 8, 6, 0, 0,
167
-  24, 24, 32, 248, 32, 168, 168, 32, 5, 5, 5, 6, 0, 0, 248, 8,
168
-  80, 32, 16, 4, 5, 5, 6, 1, 0, 224, 0, 224, 0, 240, 5, 5,
169
-  5, 6, 0, 0, 32, 64, 136, 248, 8, 5, 5, 5, 6, 0, 0, 8,
170
-  40, 16, 40, 192, 5, 5, 5, 6, 0, 0, 248, 64, 248, 64, 56, 5,
171
-  4, 4, 6, 0, 0, 64, 248, 80, 64, 5, 6, 6, 6, 0, 0, 64,
172
-  248, 72, 80, 64, 64, 4, 4, 4, 6, 0, 0, 96, 32, 32, 240, 5,
173
-  5, 5, 6, 0, 0, 112, 16, 16, 16, 248, 4, 5, 5, 6, 0, 0,
174
-  240, 16, 240, 16, 240, 5, 5, 5, 6, 0, 0, 248, 8, 248, 8, 248,
175
-  5, 6, 6, 6, 0, 0, 112, 0, 248, 8, 16, 32, 4, 6, 6, 6,
176
-  0, 0, 144, 144, 144, 144, 16, 32, 5, 5, 5, 6, 0, 0, 32, 160,
177
-  168, 168, 176, 4, 5, 5, 6, 0, 0, 128, 128, 144, 160, 192, 5, 5,
178
-  5, 6, 0, 0, 248, 136, 136, 136, 248, 4, 4, 4, 6, 0, 0, 240,
179
-  144, 16, 32, 5, 5, 5, 6, 0, 0, 248, 136, 8, 16, 32, 5, 6,
180
-  6, 6, 0, 0, 16, 248, 80, 80, 248, 16, 5, 5, 5, 6, 0, 0,
181
-  248, 8, 48, 32, 248, 5, 5, 5, 6, 0, 0, 248, 8, 248, 8, 48,
182
-  5, 5, 5, 6, 0, 0, 192, 8, 8, 16, 224, 5, 8, 8, 6, 0,
183
-  0, 40, 0, 32, 248, 136, 8, 16, 32, 4, 4, 4, 6, 0, 0, 64,
184
-  240, 80, 160, 4, 4, 4, 6, 0, 0, 64, 240, 32, 64, 5, 7, 7,
185
-  6, 0, 0, 40, 0, 248, 136, 8, 16, 96, 5, 8, 8, 6, 0, 0,
186
-  40, 0, 16, 248, 80, 80, 248, 16, 5, 7, 7, 6, 0, 0, 40, 0,
187
-  248, 8, 48, 32, 248, 5, 7, 7, 6, 0, 0, 40, 0, 248, 8, 248,
188
-  8, 48, 2, 2, 2, 6, 2, 2, 192, 192, 5, 1, 1, 6, 0, 2,
189
-  248, 5, 4, 4, 6, 0, 1, 128, 96, 16, 8, 5, 5, 5, 6, 0,
190
-  1, 40, 128, 96, 16, 8, 5, 6, 6, 6, 0, 0, 248, 8, 8, 8,
191
-  8, 8
192
-};

+ 0
- 151
Marlin/dogm_font_data_ISO10646_SK.h View File

@@ -1,151 +0,0 @@
1
-/*
2
-  Fontname: ISO10646_SK
3
-  Copyright: A. Hardtung, modified by Roman Moravcik
4
-  Capital A Height: 7, '1' Height: 7
5
-  Calculated Max Values w= 6 h= 9 x= 2 y= 7 dx= 6 dy= 0 ascent= 8 len= 9
6
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
7
-  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
8
-  Pure Font   ascent = 7 descent=-1
9
-  X Font      ascent = 7 descent=-1
10
-  Max Font    ascent = 8 descent=-1
11
-*/
12
-#include <U8glib.h>
13
-const u8g_fntpgm_uint8_t ISO10646_SK[2203] U8G_SECTION(".progmem.ISO10646_SK") = {
14
-  0,6,9,0,254,7,1,146,3,33,32,255,255,8,255,7,
15
-  255,0,0,0,6,0,0,1,7,7,6,2,0,128,128,128,
16
-  128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
17
-  0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
18
-  120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
19
-  64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
20
-  2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
21
-  64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
22
-  32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
23
-  5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
24
-  64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
25
-  192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
26
-  0,0,112,136,136,136,136,136,112,3,7,7,6,1,0,64,
27
-  192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
28
-  128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
29
-  5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
30
-  6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
31
-  112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32
-  32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
33
-  112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
34
-  5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
35
-  192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
36
-  32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,1,
37
-  0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
38
-  8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
39
-  168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
40
-  7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
41
-  0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
42
-  136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
43
-  128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
44
-  5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
45
-  6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
46
-  128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
47
-  16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
48
-  136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
49
-  7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
50
-  0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
51
-  136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
52
-  128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
53
-  7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
54
-  0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
55
-  32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
56
-  136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
57
-  5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
58
-  6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
59
-  136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
60
-  32,64,128,248,3,7,7,6,1,0,224,128,128,128,128,128,
61
-  224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
62
-  1,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
63
-  80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64
-  64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
65
-  0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
66
-  128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
67
-  120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
68
-  0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
69
-  136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
70
-  136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
71
-  8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
72
-  6,0,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
73
-  192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
74
-  168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
75
-  6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
76
-  136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
77
-  5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
78
-  0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
79
-  64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
80
-  5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
81
-  136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
82
-  6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
83
-  0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
84
-  64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
85
-  3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
86
-  6,0,2,104,144,0,0,0,6,0,0,5,8,8,6,0,
87
-  0,16,32,112,136,136,248,136,136,5,8,8,6,0,0,80,
88
-  0,112,136,136,248,136,136,5,8,8,6,0,0,8,16,248,
89
-  128,128,240,128,248,3,8,8,6,1,0,32,64,224,64,64,
90
-  64,64,224,5,8,8,6,0,0,16,32,112,136,136,136,136,
91
-  112,5,8,8,6,0,0,32,80,112,136,136,136,136,112,5,
92
-  8,8,6,0,0,16,32,136,136,136,136,136,112,5,8,8,
93
-  6,0,0,16,32,136,136,80,32,32,32,5,8,8,6,0,
94
-  0,16,32,0,112,8,120,136,120,5,7,7,6,0,0,80,
95
-  0,112,8,120,136,120,5,8,8,6,0,0,16,32,0,112,
96
-  136,248,128,112,2,8,8,6,2,0,64,128,0,128,128,128,
97
-  128,128,5,8,8,6,0,0,16,32,0,112,136,136,136,112,
98
-  5,8,8,6,0,0,32,80,0,112,136,136,136,112,5,8,
99
-  8,6,0,0,16,32,0,136,136,136,152,104,5,9,9,6,
100
-  0,255,16,32,0,136,136,136,120,8,112,5,8,8,6,0,
101
-  0,80,32,112,136,128,128,136,112,5,8,8,6,0,0,80,
102
-  32,0,112,128,128,136,112,5,8,8,6,0,0,80,32,240,
103
-  136,136,136,136,240,6,8,8,6,0,0,4,20,24,112,144,
104
-  144,144,112,5,8,8,6,0,0,16,32,128,128,128,128,128,
105
-  248,3,8,8,6,1,0,32,64,0,192,64,64,64,224,5,
106
-  8,8,6,0,0,16,144,160,128,128,128,128,248,5,8,8,
107
-  6,1,0,8,200,80,64,64,64,64,224,5,8,8,6,0,
108
-  0,80,32,136,200,168,152,136,136,5,8,8,6,0,0,80,
109
-  32,0,176,200,136,136,136,5,8,8,6,0,0,16,32,240,
110
-  136,240,160,144,136,5,8,8,6,0,0,16,32,0,176,200,
111
-  128,128,128,5,8,8,6,0,0,80,32,120,128,128,112,8,
112
-  240,5,8,8,6,0,0,80,32,0,112,128,112,8,240,5,
113
-  8,8,6,0,0,80,32,248,32,32,32,32,32,6,8,8,
114
-  6,0,0,4,68,72,224,64,64,64,48,5,8,8,6,0,
115
-  0,80,32,248,8,48,64,128,248,5,8,8,6,0,0,80,
116
-  32,0,248,16,32,64,248,0,0,0,6,0,0,0,0,0,
117
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
118
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
119
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
120
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
121
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
122
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
123
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
124
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
125
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
126
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
127
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
128
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
129
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
130
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
131
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
132
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
133
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
134
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
135
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
136
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
137
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
138
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
139
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
140
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
141
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
142
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
143
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
144
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
145
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
146
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
147
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
148
-  0,0,6,0,0,0,0,0,6,0,0,0,0,0,6,0,
149
-  0,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,
150
-  6,0,0,0,0,0,6,0,0,0,0,0,6,0,0,0,
151
-  0,0,6,0,0,0,0,0,6,0,0};

+ 0
- 45
Marlin/dogm_font_data_Marlin_symbols.h View File

@@ -1,45 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
-  Fontname: Marlin_symbols
25
-  Copyright: Created with Fony 1.4.7
26
-  Capital A Height: 0, '1' Height: 0
27
-  Calculated Max Values w= 5 h=10 x= 0 y= 3 dx= 6 dy= 0 ascent= 8 len=10
28
-  Font Bounding box     w= 6 h= 9 x= 0 y=-2
29
-  Calculated Min Values           x= 0 y=-2 dx= 0 dy= 0
30
-  Pure Font   ascent = 0 descent= 0
31
-  X Font      ascent = 0 descent= 0
32
-  Max Font    ascent = 8 descent=-2
33
-*/
34
-#include <U8glib.h>
35
-const u8g_fntpgm_uint8_t Marlin_symbols[140] U8G_SECTION(".progmem.Marlin_symbols") = {
36
-  0, 6, 9, 0, 254, 0, 0, 0, 0, 0, 1, 9, 0, 8, 254, 0,
37
-  0, 5, 8, 8, 6, 0, 0, 64, 240, 200, 136, 136, 152, 120, 16, 5,
38
-  8, 8, 6, 0, 0, 192, 248, 136, 136, 136, 136, 136, 248, 5, 5, 5,
39
-  6, 0, 1, 32, 48, 248, 48, 32, 5, 8, 8, 6, 0, 0, 32, 112,
40
-  248, 32, 32, 32, 32, 224, 5, 9, 9, 6, 0, 255, 32, 112, 168, 168,
41
-  184, 136, 136, 112, 32, 5, 9, 9, 6, 0, 255, 224, 128, 192, 176, 168,
42
-  40, 48, 40, 40, 5, 9, 9, 6, 0, 255, 248, 168, 136, 136, 136, 136,
43
-  136, 168, 248, 5, 10, 10, 6, 0, 254, 32, 80, 80, 80, 80, 136, 168,
44
-  168, 136, 112, 3, 3, 3, 6, 0, 3, 64, 160, 64
45
-};

+ 0
- 167
Marlin/duration_t.h View File

@@ -1,167 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef __DURATION_T__
24
-#define __DURATION_T__
25
-
26
-struct duration_t {
27
-  /**
28
-   * @brief Duration is stored in seconds
29
-   */
30
-  uint32_t value;
31
-
32
-  /**
33
-   * @brief Constructor
34
-   */
35
-  duration_t()
36
-    : duration_t(0) {};
37
-
38
-  /**
39
-   * @brief Constructor
40
-   *
41
-   * @param seconds The number of seconds
42
-   */
43
-  duration_t(uint32_t const &seconds) {
44
-    this->value = seconds;
45
-  }
46
-
47
-  /**
48
-   * @brief Equality comparison
49
-   * @details Overloads the equality comparison operator
50
-   *
51
-   * @param value The number of seconds to compare to
52
-   * @return True if both durations are equal
53
-   */
54
-  bool operator==(const uint32_t &value) const {
55
-    return (this->value == value);
56
-  }
57
-
58
-  /**
59
-   * @brief Inequality comparison
60
-   * @details Overloads the inequality comparison operator
61
-   *
62
-   * @param value The number of seconds to compare to
63
-   * @return False if both durations are equal
64
-   */
65
-  bool operator!=(const uint32_t &value) const {
66
-    return ! this->operator==(value);
67
-  }
68
-
69
-  /**
70
-   * @brief Formats the duration as years
71
-   * @return The number of years
72
-   */
73
-  inline uint8_t year() const {
74
-    return this->day() / 365;
75
-  }
76
-
77
-  /**
78
-   * @brief Formats the duration as days
79
-   * @return The number of days
80
-   */
81
-  inline uint16_t day() const {
82
-    return this->hour() / 24;
83
-  }
84
-
85
-  /**
86
-   * @brief Formats the duration as hours
87
-   * @return The number of hours
88
-   */
89
-  inline uint32_t hour() const {
90
-    return this->minute() / 60;
91
-  }
92
-
93
-  /**
94
-   * @brief Formats the duration as minutes
95
-   * @return The number of minutes
96
-   */
97
-  inline uint32_t minute() const {
98
-    return this->second() / 60;
99
-  }
100
-
101
-  /**
102
-   * @brief Formats the duration as seconds
103
-   * @return The number of seconds
104
-   */
105
-  inline uint32_t second() const {
106
-    return this->value;
107
-  }
108
-
109
-  /**
110
-   * @brief Formats the duration as a string
111
-   * @details String will be formated using a "full" representation of duration
112
-   *
113
-   * @param buffer The array pointed to must be able to accommodate 21 bytes
114
-   *
115
-   * Output examples:
116
-   *  123456789012345678901 (strlen)
117
-   *  135y 364d 23h 59m 59s
118
-   *  364d 23h 59m 59s
119
-   *  23h 59m 59s
120
-   *  59m 59s
121
-   *  59s
122
-   */
123
-  void toString(char *buffer) const {
124
-    int y = this->year(),
125
-        d = this->day() % 365,
126
-        h = this->hour() % 24,
127
-        m = this->minute() % 60,
128
-        s = this->second() % 60;
129
-
130
-    if (y) sprintf_P(buffer, PSTR("%iy %id %ih %im %is"), y, d, h, m, s);
131
-    else if (d) sprintf_P(buffer, PSTR("%id %ih %im %is"), d, h, m, s);
132
-    else if (h) sprintf_P(buffer, PSTR("%ih %im %is"), h, m, s);
133
-    else if (m) sprintf_P(buffer, PSTR("%im %is"), m, s);
134
-    else sprintf_P(buffer, PSTR("%is"), s);
135
-  }
136
-
137
-  /**
138
-   * @brief Formats the duration as a string
139
-   * @details String will be formated using a "digital" representation of duration
140
-   *
141
-   * @param buffer The array pointed to must be able to accommodate 10 bytes
142
-   *
143
-   * Output examples:
144
-   *  123456789 (strlen)
145
-   *  99:59
146
-   *  11d 12:33
147
-   */
148
-  uint8_t toDigital(char *buffer, bool with_days=false) const {
149
-    uint16_t h = uint16_t(this->hour()),
150
-             m = uint16_t(this->minute() % 60UL);
151
-    if (with_days) {
152
-      uint16_t d = this->day();
153
-      sprintf_P(buffer, PSTR("%ud %02u:%02u"), d, h % 24, m);
154
-      return d >= 10 ? 8 : 7;
155
-    }
156
-    else if (h < 100) {
157
-      sprintf_P(buffer, PSTR("%02u:%02u"), h % 24, m);
158
-      return 5;
159
-    }
160
-    else {
161
-      sprintf_P(buffer, PSTR("%u:%02u"), h, m);
162
-      return 6;
163
-    }
164
-  }
165
-};
166
-
167
-#endif // __DURATION_T__

+ 0
- 246
Marlin/endstop_interrupts.h View File

@@ -1,246 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Endstop Interrupts
25
- *
26
- * Without endstop interrupts the endstop pins must be polled continually in
27
- * the stepper-ISR via endstops.update(), most of the time finding no change.
28
- * With this feature endstops.update() is called only when we know that at
29
- * least one endstop has changed state, saving valuable CPU cycles.
30
- *
31
- * This feature only works when all used endstop pins can generate either an
32
- * 'external interrupt' or a 'pin change interrupt'.
33
- *
34
- * Test whether pins issue interrupts on your board by flashing 'pin_interrupt_test.ino'.
35
- * (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
36
- */
37
-
38
-#ifndef _ENDSTOP_INTERRUPTS_H_
39
-#define _ENDSTOP_INTERRUPTS_H_
40
-
41
-#include "macros.h"
42
-
43
-/**
44
- * Patch for pins_arduino.h (...\Arduino\hardware\arduino\avr\variants\mega\pins_arduino.h)
45
- *
46
- * These macros for the Arduino MEGA do not include the two connected pins on Port J (D13, D14).
47
- * So we extend them here because these are the normal pins for Y_MIN and Y_MAX on RAMPS.
48
- * There are more PCI-enabled processor pins on Port J, but they are not connected to Arduino MEGA.
49
- */
50
-#if defined(ARDUINO_AVR_MEGA2560) || defined(ARDUINO_AVR_MEGA)
51
-  #undef  digitalPinToPCICR
52
-  #define digitalPinToPCICR(p)    ( WITHIN(p, 10, 15) || \
53
-                                    WITHIN(p, 50, 53) || \
54
-                                    WITHIN(p, 62, 69) ? &PCICR : (uint8_t*)0 )
55
-  #undef  digitalPinToPCICRbit
56
-  #define digitalPinToPCICRbit(p) ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? 0 : \
57
-                                    WITHIN(p, 14, 15) ? 1 : \
58
-                                    WITHIN(p, 62, 69) ? 2 : \
59
-                                    0 )
60
-  #undef  digitalPinToPCMSK
61
-  #define digitalPinToPCMSK(p)    ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? &PCMSK0 : \
62
-                                    WITHIN(p, 14, 15) ? &PCMSK1 : \
63
-                                    WITHIN(p, 62, 69) ? &PCMSK2 : \
64
-                                    (uint8_t *)0 )
65
-  #undef  digitalPinToPCMSKbit
66
-  #define digitalPinToPCMSKbit(p) ( WITHIN(p, 10, 13) ? ((p) - 6) : \
67
-                                    (p) == 14 || (p) == 51 ? 2 : \
68
-                                    (p) == 15 || (p) == 52 ? 1 : \
69
-                                    (p) == 50 ? 3 : \
70
-                                    (p) == 53 ? 0 : \
71
-                                    WITHIN(p, 62, 69) ? ((p) - 62) : \
72
-                                    0 )
73
-#endif
74
-
75
-volatile uint8_t e_hit = 0; // Different from 0 when the endstops should be tested in detail.
76
-                            // Must be reset to 0 by the test function when finished.
77
-
78
-// Install Pin change interrupt for a pin. Can be called multiple times.
79
-void pciSetup(byte pin) {
80
-  SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin));  // enable pin
81
-  SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt
82
-  SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group
83
-}
84
-
85
-// This is what is really done inside the interrupts.
86
-FORCE_INLINE void endstop_ISR_worker( void ) {
87
-  e_hit = 2; // Because the detection of a e-stop hit has a 1 step debouncer it has to be called at least twice.
88
-}
89
-
90
-// Use one Routine to handle each group
91
-// One ISR for all EXT-Interrupts
92
-void endstop_ISR(void) { endstop_ISR_worker(); }
93
-
94
-// Handlers for pin change interrupts
95
-#ifdef PCINT0_vect
96
-  ISR(PCINT0_vect) { endstop_ISR_worker(); }
97
-#endif
98
-
99
-#ifdef PCINT1_vect
100
-  ISR(PCINT1_vect) { endstop_ISR_worker(); }
101
-#endif
102
-
103
-#ifdef PCINT2_vect
104
-  ISR(PCINT2_vect) { endstop_ISR_worker(); }
105
-#endif
106
-
107
-#ifdef PCINT3_vect
108
-  ISR(PCINT3_vect) { endstop_ISR_worker(); }
109
-#endif
110
-
111
-void setup_endstop_interrupts( void ) {
112
-
113
-  #if HAS_X_MAX
114
-    #if digitalPinToInterrupt(X_MAX_PIN) != NOT_AN_INTERRUPT // if pin has an external interrupt
115
-      attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it
116
-    #else
117
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
118
-      static_assert(digitalPinToPCICR(X_MAX_PIN) != NULL, "X_MAX_PIN is not interrupt-capable"); // if pin has no pin change interrupt - error
119
-      pciSetup(X_MAX_PIN);                                                            // assign it
120
-    #endif
121
-  #endif
122
-
123
-  #if HAS_X_MIN
124
-    #if digitalPinToInterrupt(X_MIN_PIN) != NOT_AN_INTERRUPT
125
-      attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE);
126
-    #else
127
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
128
-      static_assert(digitalPinToPCICR(X_MIN_PIN) != NULL, "X_MIN_PIN is not interrupt-capable");
129
-      pciSetup(X_MIN_PIN);
130
-    #endif
131
-  #endif
132
-
133
-  #if HAS_Y_MAX
134
-    #if digitalPinToInterrupt(Y_MAX_PIN) != NOT_AN_INTERRUPT
135
-      attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE);
136
-    #else
137
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
138
-      static_assert(digitalPinToPCICR(Y_MAX_PIN) != NULL, "Y_MAX_PIN is not interrupt-capable");
139
-      pciSetup(Y_MAX_PIN);
140
-    #endif
141
-  #endif
142
-
143
-  #if HAS_Y_MIN
144
-    #if digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT
145
-      attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
146
-    #else
147
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
148
-      static_assert(digitalPinToPCICR(Y_MIN_PIN) != NULL, "Y_MIN_PIN is not interrupt-capable");
149
-      pciSetup(Y_MIN_PIN);
150
-    #endif
151
-  #endif
152
-
153
-  #if HAS_Z_MAX
154
-    #if digitalPinToInterrupt(Z_MAX_PIN) != NOT_AN_INTERRUPT
155
-      attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE);
156
-    #else
157
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
158
-      static_assert(digitalPinToPCICR(Z_MAX_PIN) != NULL, "Z_MAX_PIN is not interrupt-capable");
159
-      pciSetup(Z_MAX_PIN);
160
-    #endif
161
-  #endif
162
-
163
-  #if HAS_Z_MIN
164
-    #if digitalPinToInterrupt(Z_MIN_PIN) != NOT_AN_INTERRUPT
165
-      attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE);
166
-    #else
167
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
168
-      static_assert(digitalPinToPCICR(Z_MIN_PIN) != NULL, "Z_MIN_PIN is not interrupt-capable");
169
-      pciSetup(Z_MIN_PIN);
170
-    #endif
171
-  #endif
172
-
173
-  #if HAS_X2_MAX
174
-    #if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT)
175
-      attachInterrupt(digitalPinToInterrupt(X2_MAX_PIN), endstop_ISR, CHANGE);
176
-    #else
177
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
178
-      static_assert(digitalPinToPCICR(X2_MAX_PIN) != NULL, "X2_MAX_PIN is not interrupt-capable");
179
-      pciSetup(X2_MAX_PIN);
180
-    #endif
181
-  #endif
182
-
183
-  #if HAS_X2_MIN
184
-    #if (digitalPinToInterrupt(X2_MIN_PIN) != NOT_AN_INTERRUPT)
185
-      attachInterrupt(digitalPinToInterrupt(X2_MIN_PIN), endstop_ISR, CHANGE);
186
-    #else
187
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
188
-      static_assert(digitalPinToPCICR(X2_MIN_PIN) != NULL, "X2_MIN_PIN is not interrupt-capable");
189
-      pciSetup(X2_MIN_PIN);
190
-    #endif
191
-  #endif
192
-
193
-  #if HAS_Y2_MAX
194
-    #if (digitalPinToInterrupt(Y2_MAX_PIN) != NOT_AN_INTERRUPT)
195
-      attachInterrupt(digitalPinToInterrupt(Y2_MAX_PIN), endstop_ISR, CHANGE);
196
-    #else
197
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
198
-      static_assert(digitalPinToPCICR(Y2_MAX_PIN) != NULL, "Y2_MAX_PIN is not interrupt-capable");
199
-      pciSetup(Y2_MAX_PIN);
200
-    #endif
201
-  #endif
202
-
203
-  #if HAS_Y2_MIN
204
-    #if (digitalPinToInterrupt(Y2_MIN_PIN) != NOT_AN_INTERRUPT)
205
-      attachInterrupt(digitalPinToInterrupt(Y2_MIN_PIN), endstop_ISR, CHANGE);
206
-    #else
207
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
208
-      static_assert(digitalPinToPCICR(Y2_MIN_PIN) != NULL, "Y2_MIN_PIN is not interrupt-capable");
209
-      pciSetup(Y2_MIN_PIN);
210
-    #endif
211
-  #endif
212
-
213
-  #if HAS_Z2_MAX
214
-    #if digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT
215
-      attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE);
216
-    #else
217
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
218
-      static_assert(digitalPinToPCICR(Z2_MAX_PIN) != NULL, "Z2_MAX_PIN is not interrupt-capable");
219
-      pciSetup(Z2_MAX_PIN);
220
-    #endif
221
-  #endif
222
-
223
-  #if HAS_Z2_MIN
224
-    #if digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT
225
-      attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE);
226
-    #else
227
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
228
-      static_assert(digitalPinToPCICR(Z2_MIN_PIN) != NULL, "Z2_MIN_PIN is not interrupt-capable");
229
-      pciSetup(Z2_MIN_PIN);
230
-    #endif
231
-  #endif
232
-
233
-  #if HAS_Z_MIN_PROBE_PIN
234
-    #if digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT
235
-      attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
236
-    #else
237
-      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
238
-      static_assert(digitalPinToPCICR(Z_MIN_PROBE_PIN) != NULL, "Z_MIN_PROBE_PIN is not interrupt-capable");
239
-      pciSetup(Z_MIN_PROBE_PIN);
240
-    #endif
241
-  #endif
242
-
243
-  // If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
244
-}
245
-
246
-#endif // _ENDSTOP_INTERRUPTS_H_

+ 0
- 534
Marlin/endstops.cpp View File

@@ -1,534 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * endstops.cpp - A singleton object to manage endstops
25
- */
26
-
27
-#include "Marlin.h"
28
-#include "cardreader.h"
29
-#include "endstops.h"
30
-#include "temperature.h"
31
-#include "stepper.h"
32
-#include "ultralcd.h"
33
-
34
-// TEST_ENDSTOP: test the old and the current status of an endstop
35
-#define TEST_ENDSTOP(ENDSTOP) (TEST(current_endstop_bits & old_endstop_bits, ENDSTOP))
36
-
37
-Endstops endstops;
38
-
39
-// public:
40
-
41
-bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load()
42
-volatile char Endstops::endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
43
-
44
-#if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
45
-  uint16_t
46
-#else
47
-  byte
48
-#endif
49
-    Endstops::current_endstop_bits = 0,
50
-    Endstops::old_endstop_bits = 0;
51
-
52
-#if HAS_BED_PROBE
53
-  volatile bool Endstops::z_probe_enabled = false;
54
-#endif
55
-
56
-/**
57
- * Class and Instance Methods
58
- */
59
-
60
-void Endstops::init() {
61
-
62
-  #if HAS_X_MIN
63
-    #if ENABLED(ENDSTOPPULLUP_XMIN)
64
-      SET_INPUT_PULLUP(X_MIN_PIN);
65
-    #else
66
-      SET_INPUT(X_MIN_PIN);
67
-    #endif
68
-  #endif
69
-
70
-  #if HAS_X2_MIN
71
-    #if ENABLED(ENDSTOPPULLUP_XMIN)
72
-      SET_INPUT_PULLUP(X2_MIN_PIN);
73
-    #else
74
-      SET_INPUT(X2_MIN_PIN);
75
-    #endif
76
-  #endif
77
-
78
-  #if HAS_Y_MIN
79
-    #if ENABLED(ENDSTOPPULLUP_YMIN)
80
-      SET_INPUT_PULLUP(Y_MIN_PIN);
81
-    #else
82
-      SET_INPUT(Y_MIN_PIN);
83
-    #endif
84
-  #endif
85
-
86
-  #if HAS_Y2_MIN
87
-    #if ENABLED(ENDSTOPPULLUP_YMIN)
88
-      SET_INPUT_PULLUP(Y2_MIN_PIN);
89
-    #else
90
-      SET_INPUT(Y2_MIN_PIN);
91
-    #endif
92
-  #endif
93
-
94
-  #if HAS_Z_MIN
95
-    #if ENABLED(ENDSTOPPULLUP_ZMIN)
96
-      SET_INPUT_PULLUP(Z_MIN_PIN);
97
-    #else
98
-      SET_INPUT(Z_MIN_PIN);
99
-    #endif
100
-  #endif
101
-
102
-  #if HAS_Z2_MIN
103
-    #if ENABLED(ENDSTOPPULLUP_ZMIN)
104
-      SET_INPUT_PULLUP(Z2_MIN_PIN);
105
-    #else
106
-      SET_INPUT(Z2_MIN_PIN);
107
-    #endif
108
-  #endif
109
-
110
-  #if HAS_X_MAX
111
-    #if ENABLED(ENDSTOPPULLUP_XMAX)
112
-      SET_INPUT_PULLUP(X_MAX_PIN);
113
-    #else
114
-      SET_INPUT(X_MAX_PIN);
115
-    #endif
116
-  #endif
117
-
118
-  #if HAS_X2_MAX
119
-    #if ENABLED(ENDSTOPPULLUP_XMAX)
120
-      SET_INPUT_PULLUP(X2_MAX_PIN);
121
-    #else
122
-      SET_INPUT(X2_MAX_PIN);
123
-    #endif
124
-  #endif
125
-
126
-  #if HAS_Y_MAX
127
-    #if ENABLED(ENDSTOPPULLUP_YMAX)
128
-      SET_INPUT_PULLUP(Y_MAX_PIN);
129
-    #else
130
-      SET_INPUT(Y_MAX_PIN);
131
-    #endif
132
-  #endif
133
-
134
-  #if HAS_Y2_MAX
135
-    #if ENABLED(ENDSTOPPULLUP_YMAX)
136
-      SET_INPUT_PULLUP(Y2_MAX_PIN);
137
-    #else
138
-      SET_INPUT(Y2_MAX_PIN);
139
-    #endif
140
-  #endif
141
-
142
-  #if HAS_Z_MAX
143
-    #if ENABLED(ENDSTOPPULLUP_ZMAX)
144
-      SET_INPUT_PULLUP(Z_MAX_PIN);
145
-    #else
146
-      SET_INPUT(Z_MAX_PIN);
147
-    #endif
148
-  #endif
149
-
150
-  #if HAS_Z2_MAX
151
-    #if ENABLED(ENDSTOPPULLUP_ZMAX)
152
-      SET_INPUT_PULLUP(Z2_MAX_PIN);
153
-    #else
154
-      SET_INPUT(Z2_MAX_PIN);
155
-    #endif
156
-  #endif
157
-
158
-  #if ENABLED(Z_MIN_PROBE_ENDSTOP)
159
-    #if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
160
-      SET_INPUT_PULLUP(Z_MIN_PROBE_PIN);
161
-    #else
162
-      SET_INPUT(Z_MIN_PROBE_PIN);
163
-    #endif
164
-  #endif
165
-
166
-} // Endstops::init
167
-
168
-void Endstops::report_state() {
169
-  if (endstop_hit_bits) {
170
-    #if ENABLED(ULTRA_LCD)
171
-      char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
172
-      #define _SET_STOP_CHAR(A,C) (chr## A = C)
173
-    #else
174
-      #define _SET_STOP_CHAR(A,C) ;
175
-    #endif
176
-
177
-    #define _ENDSTOP_HIT_ECHO(A,C) do{ \
178
-      SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", stepper.triggered_position_mm(A ##_AXIS)); \
179
-      _SET_STOP_CHAR(A,C); }while(0)
180
-
181
-    #define _ENDSTOP_HIT_TEST(A,C) \
182
-      if (TEST(endstop_hit_bits, A ##_MIN) || TEST(endstop_hit_bits, A ##_MAX)) \
183
-        _ENDSTOP_HIT_ECHO(A,C)
184
-
185
-    #define ENDSTOP_HIT_TEST_X() _ENDSTOP_HIT_TEST(X,'X')
186
-    #define ENDSTOP_HIT_TEST_Y() _ENDSTOP_HIT_TEST(Y,'Y')
187
-    #define ENDSTOP_HIT_TEST_Z() _ENDSTOP_HIT_TEST(Z,'Z')
188
-
189
-    SERIAL_ECHO_START();
190
-    SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
191
-    ENDSTOP_HIT_TEST_X();
192
-    ENDSTOP_HIT_TEST_Y();
193
-    ENDSTOP_HIT_TEST_Z();
194
-
195
-    #if ENABLED(Z_MIN_PROBE_ENDSTOP)
196
-      #define P_AXIS Z_AXIS
197
-      if (TEST(endstop_hit_bits, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
198
-    #endif
199
-    SERIAL_EOL();
200
-
201
-    #if ENABLED(ULTRA_LCD)
202
-      lcd_status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
203
-    #endif
204
-
205
-    hit_on_purpose();
206
-
207
-    #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT)
208
-      if (stepper.abort_on_endstop_hit) {
209
-        card.sdprinting = false;
210
-        card.closefile();
211
-        quickstop_stepper();
212
-        thermalManager.disable_all_heaters(); // switch off all heaters.
213
-      }
214
-    #endif
215
-  }
216
-} // Endstops::report_state
217
-
218
-void Endstops::M119() {
219
-  SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT);
220
-  #define ES_REPORT(AXIS) do{ \
221
-    SERIAL_PROTOCOLPGM(MSG_##AXIS); \
222
-    SERIAL_PROTOCOLLN(((READ(AXIS##_PIN)^AXIS##_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN)); \
223
-  }while(0)
224
-  #if HAS_X_MIN
225
-    ES_REPORT(X_MIN);
226
-  #endif
227
-  #if HAS_X2_MIN
228
-    ES_REPORT(X2_MIN);
229
-  #endif
230
-  #if HAS_X_MAX
231
-    ES_REPORT(X_MAX);
232
-  #endif
233
-  #if HAS_X2_MAX
234
-    ES_REPORT(X2_MAX);
235
-  #endif
236
-  #if HAS_Y_MIN
237
-    ES_REPORT(Y_MIN);
238
-  #endif
239
-  #if HAS_Y2_MIN
240
-    ES_REPORT(Y2_MIN);
241
-  #endif
242
-  #if HAS_Y_MAX
243
-    ES_REPORT(Y_MAX);
244
-  #endif
245
-  #if HAS_Y2_MAX
246
-    ES_REPORT(Y2_MAX);
247
-  #endif
248
-  #if HAS_Z_MIN
249
-    ES_REPORT(Z_MIN);
250
-  #endif
251
-  #if HAS_Z2_MIN
252
-    ES_REPORT(Z2_MIN);
253
-  #endif
254
-  #if HAS_Z_MAX
255
-    ES_REPORT(Z_MAX);
256
-  #endif
257
-  #if HAS_Z2_MAX
258
-    ES_REPORT(Z2_MAX);
259
-  #endif
260
-  #if ENABLED(Z_MIN_PROBE_ENDSTOP)
261
-    SERIAL_PROTOCOLPGM(MSG_Z_PROBE);
262
-    SERIAL_PROTOCOLLN(((READ(Z_MIN_PROBE_PIN)^Z_MIN_PROBE_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
263
-  #endif
264
-  #if ENABLED(FILAMENT_RUNOUT_SENSOR)
265
-    SERIAL_PROTOCOLPGM(MSG_FILAMENT_RUNOUT_SENSOR);
266
-    SERIAL_PROTOCOLLN(((READ(FIL_RUNOUT_PIN)^FIL_RUNOUT_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
267
-  #endif
268
-} // Endstops::M119
269
-
270
-#if ENABLED(X_DUAL_ENDSTOPS)
271
-  void Endstops::test_dual_x_endstops(const EndstopEnum es1, const EndstopEnum es2) {
272
-    byte x_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for X, bit 1 for X2
273
-    if (x_test && stepper.current_block->steps[X_AXIS] > 0) {
274
-      SBI(endstop_hit_bits, X_MIN);
275
-      if (!stepper.performing_homing || (x_test == 0x3))  //if not performing home or if both endstops were trigged during homing...
276
-        stepper.kill_current_block();
277
-    }
278
-  }
279
-#endif
280
-#if ENABLED(Y_DUAL_ENDSTOPS)
281
-  void Endstops::test_dual_y_endstops(const EndstopEnum es1, const EndstopEnum es2) {
282
-    byte y_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Y, bit 1 for Y2
283
-    if (y_test && stepper.current_block->steps[Y_AXIS] > 0) {
284
-      SBI(endstop_hit_bits, Y_MIN);
285
-      if (!stepper.performing_homing || (y_test == 0x3))  //if not performing home or if both endstops were trigged during homing...
286
-        stepper.kill_current_block();
287
-    }
288
-  }
289
-#endif
290
-#if ENABLED(Z_DUAL_ENDSTOPS)
291
-  void Endstops::test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2) {
292
-    byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2
293
-    if (z_test && stepper.current_block->steps[Z_AXIS] > 0) {
294
-      SBI(endstop_hit_bits, Z_MIN);
295
-      if (!stepper.performing_homing || (z_test == 0x3))  //if not performing home or if both endstops were trigged during homing...
296
-        stepper.kill_current_block();
297
-    }
298
-  }
299
-#endif
300
-
301
-// Check endstops - Called from ISR!
302
-void Endstops::update() {
303
-
304
-  #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
305
-  #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
306
-  #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
307
-  #define _ENDSTOP_HIT(AXIS, MINMAX) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MINMAX))
308
-
309
-  // UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status
310
-  #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT(current_endstop_bits, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
311
-  // COPY_BIT: copy the value of SRC_BIT to DST_BIT in DST
312
-  #define COPY_BIT(DST, SRC_BIT, DST_BIT) SET_BIT(DST, DST_BIT, TEST(DST, SRC_BIT))
313
-
314
-  #define UPDATE_ENDSTOP(AXIS,MINMAX) do { \
315
-      UPDATE_ENDSTOP_BIT(AXIS, MINMAX); \
316
-      if (TEST_ENDSTOP(_ENDSTOP(AXIS, MINMAX)) && stepper.current_block->steps[_AXIS(AXIS)] > 0) { \
317
-        _ENDSTOP_HIT(AXIS, MINMAX); \
318
-        stepper.endstop_triggered(_AXIS(AXIS)); \
319
-      } \
320
-    }while(0)
321
-
322
-  #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
323
-    // If G38 command is active check Z_MIN_PROBE for ALL movement
324
-    if (G38_move) {
325
-      UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
326
-      if (TEST_ENDSTOP(_ENDSTOP(Z, MIN_PROBE))) {
327
-        if      (stepper.current_block->steps[_AXIS(X)] > 0) { _ENDSTOP_HIT(X, MIN); stepper.endstop_triggered(_AXIS(X)); }
328
-        else if (stepper.current_block->steps[_AXIS(Y)] > 0) { _ENDSTOP_HIT(Y, MIN); stepper.endstop_triggered(_AXIS(Y)); }
329
-        else if (stepper.current_block->steps[_AXIS(Z)] > 0) { _ENDSTOP_HIT(Z, MIN); stepper.endstop_triggered(_AXIS(Z)); }
330
-        G38_endstop_hit = true;
331
-      }
332
-    }
333
-  #endif
334
-
335
-  /**
336
-   * Define conditions for checking endstops
337
-   */
338
-
339
-  #if IS_CORE
340
-    #define S_(N) stepper.current_block->steps[CORE_AXIS_##N]
341
-    #define D_(N) stepper.motor_direction(CORE_AXIS_##N)
342
-  #endif
343
-
344
-  #if CORE_IS_XY || CORE_IS_XZ
345
-    /**
346
-     * Head direction in -X axis for CoreXY and CoreXZ bots.
347
-     *
348
-     * If steps differ, both axes are moving.
349
-     * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z, handled below)
350
-     * If DeltaA ==  DeltaB, the movement is only in the 1st axis (X)
351
-     */
352
-    #if ENABLED(COREXY) || ENABLED(COREXZ)
353
-      #define X_CMP ==
354
-    #else
355
-      #define X_CMP !=
356
-    #endif
357
-    #define X_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && D_(1) X_CMP D_(2)) )
358
-    #define X_AXIS_HEAD X_HEAD
359
-  #else
360
-    #define X_MOVE_TEST stepper.current_block->steps[X_AXIS] > 0
361
-    #define X_AXIS_HEAD X_AXIS
362
-  #endif
363
-
364
-  #if CORE_IS_XY || CORE_IS_YZ
365
-    /**
366
-     * Head direction in -Y axis for CoreXY / CoreYZ bots.
367
-     *
368
-     * If steps differ, both axes are moving
369
-     * If DeltaA ==  DeltaB, the movement is only in the 1st axis (X or Y)
370
-     * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z)
371
-     */
372
-    #if ENABLED(COREYX) || ENABLED(COREYZ)
373
-      #define Y_CMP ==
374
-    #else
375
-      #define Y_CMP !=
376
-    #endif
377
-    #define Y_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && D_(1) Y_CMP D_(2)) )
378
-    #define Y_AXIS_HEAD Y_HEAD
379
-  #else
380
-    #define Y_MOVE_TEST stepper.current_block->steps[Y_AXIS] > 0
381
-    #define Y_AXIS_HEAD Y_AXIS
382
-  #endif
383
-
384
-  #if CORE_IS_XZ || CORE_IS_YZ
385
-    /**
386
-     * Head direction in -Z axis for CoreXZ or CoreYZ bots.
387
-     *
388
-     * If steps differ, both axes are moving
389
-     * If DeltaA ==  DeltaB, the movement is only in the 1st axis (X or Y, already handled above)
390
-     * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Z)
391
-     */
392
-    #if ENABLED(COREZX) || ENABLED(COREZY)
393
-      #define Z_CMP ==
394
-    #else
395
-      #define Z_CMP !=
396
-    #endif
397
-    #define Z_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && D_(1) Z_CMP D_(2)) )
398
-    #define Z_AXIS_HEAD Z_HEAD
399
-  #else
400
-    #define Z_MOVE_TEST stepper.current_block->steps[Z_AXIS] > 0
401
-    #define Z_AXIS_HEAD Z_AXIS
402
-  #endif
403
-
404
-  // With Dual X, endstops are only checked in the homing direction for the active extruder
405
-  #if ENABLED(DUAL_X_CARRIAGE)
406
-    #define E0_ACTIVE stepper.current_block->active_extruder == 0
407
-    #define X_MIN_TEST ((X_HOME_DIR < 0 && E0_ACTIVE) || (X2_HOME_DIR < 0 && !E0_ACTIVE))
408
-    #define X_MAX_TEST ((X_HOME_DIR > 0 && E0_ACTIVE) || (X2_HOME_DIR > 0 && !E0_ACTIVE))
409
-  #else
410
-    #define X_MIN_TEST true
411
-    #define X_MAX_TEST true
412
-  #endif
413
-
414
-  /**
415
-   * Check and update endstops according to conditions
416
-   */
417
-  if (X_MOVE_TEST) {
418
-    if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction
419
-      #if HAS_X_MIN
420
-        #if ENABLED(X_DUAL_ENDSTOPS)
421
-          UPDATE_ENDSTOP_BIT(X, MIN);
422
-          #if HAS_X2_MIN
423
-            UPDATE_ENDSTOP_BIT(X2, MIN);
424
-          #else
425
-            COPY_BIT(current_endstop_bits, X_MIN, X2_MIN);
426
-          #endif
427
-          test_dual_x_endstops(X_MIN, X2_MIN);
428
-        #else
429
-          if (X_MIN_TEST) UPDATE_ENDSTOP(X, MIN);
430
-        #endif
431
-      #endif
432
-    }
433
-    else { // +direction
434
-      #if HAS_X_MAX
435
-        #if ENABLED(X_DUAL_ENDSTOPS)
436
-          UPDATE_ENDSTOP_BIT(X, MAX);
437
-          #if HAS_X2_MAX
438
-            UPDATE_ENDSTOP_BIT(X2, MAX);
439
-          #else
440
-            COPY_BIT(current_endstop_bits, X_MAX, X2_MAX);
441
-          #endif
442
-          test_dual_x_endstops(X_MAX, X2_MAX);
443
-        #else
444
-          if (X_MIN_TEST) UPDATE_ENDSTOP(X, MAX);
445
-        #endif
446
-
447
-      #endif
448
-    }
449
-  }
450
-
451
-  if (Y_MOVE_TEST) {
452
-    if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction
453
-      #if HAS_Y_MIN
454
-        #if ENABLED(Y_DUAL_ENDSTOPS)
455
-          UPDATE_ENDSTOP_BIT(Y, MIN);
456
-          #if HAS_Y2_MIN
457
-            UPDATE_ENDSTOP_BIT(Y2, MIN);
458
-          #else
459
-            COPY_BIT(current_endstop_bits, Y_MIN, Y2_MIN);
460
-          #endif
461
-          test_dual_y_endstops(Y_MIN, Y2_MIN);
462
-        #else
463
-          UPDATE_ENDSTOP(Y, MIN);
464
-        #endif
465
-      #endif
466
-    }
467
-    else { // +direction
468
-      #if HAS_Y_MAX
469
-        #if ENABLED(Y_DUAL_ENDSTOPS)
470
-          UPDATE_ENDSTOP_BIT(Y, MAX);
471
-          #if HAS_Y2_MAX
472
-            UPDATE_ENDSTOP_BIT(Y2, MAX);
473
-          #else
474
-            COPY_BIT(current_endstop_bits, Y_MAX, Y2_MAX);
475
-          #endif
476
-          test_dual_y_endstops(Y_MAX, Y2_MAX);
477
-        #else
478
-          UPDATE_ENDSTOP(Y, MAX);
479
-        #endif
480
-      #endif
481
-    }
482
-  }
483
-
484
-  if (Z_MOVE_TEST) {
485
-    if (stepper.motor_direction(Z_AXIS_HEAD)) { // Z -direction. Gantry down, bed up.
486
-      #if HAS_Z_MIN
487
-        #if ENABLED(Z_DUAL_ENDSTOPS)
488
-          UPDATE_ENDSTOP_BIT(Z, MIN);
489
-          #if HAS_Z2_MIN
490
-            UPDATE_ENDSTOP_BIT(Z2, MIN);
491
-          #else
492
-            COPY_BIT(current_endstop_bits, Z_MIN, Z2_MIN);
493
-          #endif
494
-          test_dual_z_endstops(Z_MIN, Z2_MIN);
495
-        #else
496
-          #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
497
-            if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN);
498
-          #else
499
-            UPDATE_ENDSTOP(Z, MIN);
500
-          #endif
501
-        #endif
502
-      #endif
503
-
504
-      // When closing the gap check the enabled probe
505
-      #if ENABLED(Z_MIN_PROBE_ENDSTOP)
506
-        if (z_probe_enabled) {
507
-          UPDATE_ENDSTOP(Z, MIN_PROBE);
508
-          if (TEST_ENDSTOP(Z_MIN_PROBE)) SBI(endstop_hit_bits, Z_MIN_PROBE);
509
-        }
510
-      #endif
511
-    }
512
-    else { // Z +direction. Gantry up, bed down.
513
-      #if HAS_Z_MAX
514
-        // Check both Z dual endstops
515
-        #if ENABLED(Z_DUAL_ENDSTOPS)
516
-          UPDATE_ENDSTOP_BIT(Z, MAX);
517
-          #if HAS_Z2_MAX
518
-            UPDATE_ENDSTOP_BIT(Z2, MAX);
519
-          #else
520
-            COPY_BIT(current_endstop_bits, Z_MAX, Z2_MAX);
521
-          #endif
522
-          test_dual_z_endstops(Z_MAX, Z2_MAX);
523
-        // If this pin is not hijacked for the bed probe
524
-        // then it belongs to the Z endstop
525
-        #elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
526
-          UPDATE_ENDSTOP(Z, MAX);
527
-        #endif
528
-      #endif
529
-    }
530
-  }
531
-
532
-  old_endstop_bits = current_endstop_bits;
533
-
534
-} // Endstops::update()

+ 0
- 117
Marlin/endstops.h View File

@@ -1,117 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- *  endstops.h - manages endstops
25
- */
26
-
27
-#ifndef ENDSTOPS_H
28
-#define ENDSTOPS_H
29
-
30
-#include "enum.h"
31
-#include "MarlinConfig.h"
32
-
33
-class Endstops {
34
-
35
-  public:
36
-
37
-    static bool enabled, enabled_globally;
38
-    static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
39
-
40
-    #if ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || ENABLED(Z_DUAL_ENDSTOPS)
41
-      static uint16_t
42
-    #else
43
-      static byte
44
-    #endif
45
-        current_endstop_bits, old_endstop_bits;
46
-
47
-    Endstops() {
48
-      enable_globally(
49
-        #if ENABLED(ENDSTOPS_ALWAYS_ON_DEFAULT)
50
-          true
51
-        #else
52
-          false
53
-        #endif
54
-      );
55
-    };
56
-
57
-    /**
58
-     * Initialize the endstop pins
59
-     */
60
-    void init();
61
-
62
-    /**
63
-     * Update the endstops bits from the pins
64
-     */
65
-    static void update();
66
-
67
-    /**
68
-     * Print an error message reporting the position when the endstops were last hit.
69
-     */
70
-    static void report_state(); //call from somewhere to create an serial error message with the locations the endstops where hit, in case they were triggered
71
-
72
-    /**
73
-     * Report endstop positions in response to M119
74
-     */
75
-    static void M119();
76
-
77
-    // Enable / disable endstop checking globally
78
-    static void enable_globally(bool onoff=true) { enabled_globally = enabled = onoff; }
79
-
80
-    // Enable / disable endstop checking
81
-    static void enable(bool onoff=true) { enabled = onoff; }
82
-
83
-    // Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
84
-    static void not_homing() { enabled = enabled_globally; }
85
-
86
-    // Clear endstops (i.e., they were hit intentionally) to suppress the report
87
-    static void hit_on_purpose() { endstop_hit_bits = 0; }
88
-
89
-    // Enable / disable endstop z-probe checking
90
-    #if HAS_BED_PROBE
91
-      static volatile bool z_probe_enabled;
92
-      static void enable_z_probe(bool onoff=true) { z_probe_enabled = onoff; }
93
-    #endif
94
-
95
-  private:
96
-
97
-    #if ENABLED(X_DUAL_ENDSTOPS)
98
-      static void test_dual_x_endstops(const EndstopEnum es1, const EndstopEnum es2);
99
-    #endif
100
-    #if ENABLED(Y_DUAL_ENDSTOPS)
101
-      static void test_dual_y_endstops(const EndstopEnum es1, const EndstopEnum es2);
102
-    #endif
103
-    #if ENABLED(Z_DUAL_ENDSTOPS)
104
-      static void test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2);
105
-    #endif
106
-};
107
-
108
-extern Endstops endstops;
109
-
110
-#if HAS_BED_PROBE
111
-  #define ENDSTOPS_ENABLED  (endstops.enabled || endstops.z_probe_enabled)
112
-#else
113
-  #define ENDSTOPS_ENABLED  endstops.enabled
114
-#endif
115
-
116
-
117
-#endif // ENDSTOPS_H

+ 0
- 193
Marlin/enum.h View File

@@ -1,193 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#ifndef __ENUM_H__
24
-#define __ENUM_H__
25
-
26
-#include "MarlinConfig.h"
27
-
28
-/**
29
- * Axis indices as enumerated constants
30
- *
31
- * Special axis:
32
- *  - A_AXIS and B_AXIS are used by COREXY printers
33
- *  - X_HEAD and Y_HEAD is used for systems that don't have a 1:1 relationship
34
- *    between X_AXIS and X Head movement, like CoreXY bots
35
- */
36
-enum AxisEnum {
37
-  NO_AXIS   = -1,
38
-  X_AXIS    = 0,
39
-  A_AXIS    = 0,
40
-  Y_AXIS    = 1,
41
-  B_AXIS    = 1,
42
-  Z_AXIS    = 2,
43
-  C_AXIS    = 2,
44
-  E_AXIS    = 3,
45
-  X_HEAD    = 4,
46
-  Y_HEAD    = 5,
47
-  Z_HEAD    = 6,
48
-  ALL_AXES  = 100
49
-};
50
-
51
-#define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=S; VAR<=N; VAR++)
52
-#define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=S; VAR<N; VAR++)
53
-#define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)
54
-#define LOOP_L_N(VAR, N) LOOP_S_L_N(VAR, 0, N)
55
-
56
-#define LOOP_NA(VAR) LOOP_L_N(VAR, NUM_AXIS)
57
-#define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS)
58
-#define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_AXIS)
59
-#define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N)
60
-
61
-typedef enum {
62
-  LINEARUNIT_MM,
63
-  LINEARUNIT_INCH
64
-} LinearUnit;
65
-
66
-typedef enum {
67
-  TEMPUNIT_C,
68
-  TEMPUNIT_K,
69
-  TEMPUNIT_F
70
-} TempUnit;
71
-
72
-/**
73
- * Debug flags
74
- * Not yet widely applied
75
- */
76
-enum DebugFlags {
77
-  DEBUG_NONE          = 0,
78
-  DEBUG_ECHO          = _BV(0), ///< Echo commands in order as they are processed
79
-  DEBUG_INFO          = _BV(1), ///< Print messages for code that has debug output
80
-  DEBUG_ERRORS        = _BV(2), ///< Not implemented
81
-  DEBUG_DRYRUN        = _BV(3), ///< Ignore temperature setting and E movement commands
82
-  DEBUG_COMMUNICATION = _BV(4), ///< Not implemented
83
-  DEBUG_LEVELING      = _BV(5), ///< Print detailed output for homing and leveling
84
-  DEBUG_MESH_ADJUST   = _BV(6), ///< UBL bed leveling
85
-  DEBUG_ALL           = 0xFF
86
-};
87
-
88
-enum EndstopEnum {
89
-  X_MIN,
90
-  Y_MIN,
91
-  Z_MIN,
92
-  Z_MIN_PROBE,
93
-  X_MAX,
94
-  Y_MAX,
95
-  Z_MAX,
96
-  X2_MIN,
97
-  X2_MAX,
98
-  Y2_MIN,
99
-  Y2_MAX,
100
-  Z2_MIN,
101
-  Z2_MAX
102
-};
103
-
104
-#if ENABLED(EMERGENCY_PARSER)
105
-  enum e_parser_state {
106
-    state_RESET,
107
-    state_N,
108
-    state_M,
109
-    state_M1,
110
-    state_M10,
111
-    state_M108,
112
-    state_M11,
113
-    state_M112,
114
-    state_M4,
115
-    state_M41,
116
-    state_M410,
117
-    state_IGNORE // to '\n'
118
-  };
119
-#endif
120
-
121
-#if ENABLED(ADVANCED_PAUSE_FEATURE)
122
-  enum AdvancedPauseMenuResponse {
123
-    ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
124
-    ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
125
-    ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
126
-  };
127
-
128
-  #if ENABLED(ULTIPANEL)
129
-    enum AdvancedPauseMessage {
130
-      ADVANCED_PAUSE_MESSAGE_INIT,
131
-      ADVANCED_PAUSE_MESSAGE_UNLOAD,
132
-      ADVANCED_PAUSE_MESSAGE_INSERT,
133
-      ADVANCED_PAUSE_MESSAGE_LOAD,
134
-      ADVANCED_PAUSE_MESSAGE_EXTRUDE,
135
-      ADVANCED_PAUSE_MESSAGE_OPTION,
136
-      ADVANCED_PAUSE_MESSAGE_RESUME,
137
-      ADVANCED_PAUSE_MESSAGE_STATUS,
138
-      ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE,
139
-      ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT
140
-    };
141
-  #endif
142
-#endif
143
-
144
-/**
145
- * States for managing Marlin and host communication
146
- * Marlin sends messages if blocked or busy
147
- */
148
-#if ENABLED(HOST_KEEPALIVE_FEATURE)
149
-  enum MarlinBusyState {
150
-    NOT_BUSY,           // Not in a handler
151
-    IN_HANDLER,         // Processing a GCode
152
-    IN_PROCESS,         // Known to be blocking command input (as in G29)
153
-    PAUSED_FOR_USER,    // Blocking pending any input
154
-    PAUSED_FOR_INPUT    // Blocking pending text input (concept)
155
-  };
156
-#endif
157
-
158
-/**
159
- * SD Card
160
- */
161
-enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename };
162
-
163
-/**
164
- * Ultra LCD
165
- */
166
-enum LCDViewAction {
167
-  LCDVIEW_NONE,
168
-  LCDVIEW_REDRAW_NOW,
169
-  LCDVIEW_CALL_REDRAW_NEXT,
170
-  LCDVIEW_CLEAR_CALL_REDRAW,
171
-  LCDVIEW_CALL_NO_REDRAW
172
-};
173
-
174
-/**
175
- * Dual X Carriage modes. A Dual Nozzle can also do duplication.
176
- */
177
-#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
178
-  enum DualXMode {
179
-    DXC_FULL_CONTROL_MODE,  // DUAL_X_CARRIAGE only
180
-    DXC_AUTO_PARK_MODE,     // DUAL_X_CARRIAGE only
181
-    DXC_DUPLICATION_MODE
182
-  };
183
-#endif
184
-
185
-/**
186
- * Workspace planes only apply to G2/G3 moves
187
- * (and "canned cycles" - not a current feature)
188
- */
189
-#if ENABLED(CNC_WORKSPACE_PLANES)
190
-  enum WorkspacePlane { PLANE_XY, PLANE_ZX, PLANE_YZ };
191
-#endif
192
-
193
-#endif // __ENUM_H__

+ 0
- 1789
Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
File diff suppressed because it is too large
View File


+ 0
- 1567
Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h
File diff suppressed because it is too large
View File


+ 0
- 1769
Marlin/example_configurations/AliExpress/CL-260/Configuration.h
File diff suppressed because it is too large
View File


+ 0
- 15
Marlin/example_configurations/AliExpress/CL-260/README.txt View File

@@ -1,15 +0,0 @@
1
-This is an example configuration for the CL-260 Ultimaker 2 clone.
2
-Change Z_MAX_POS to 300 for the CL-260MAX.
3
-
4
-(The printer is available on AliExpress; be aware that this is not a beginner's
5
-printer -- it needs tweaking and some parts replaced before being decent.)
6
-
7
-The printer comes with a quite old Marlin, the sources are available here:
8
-http://www.thingiverse.com/thing:1635830/ and I recommend replacing them.
9
-
10
-The setting "works" for my printer and the extruder using my calibration value.
11
-You might want to tweak some settings, e.g enable EEPROM, increase default Z speed, adjust homing speeds,...
12
-
13
-Have fun!
14
---
15
-tobi

+ 0
- 1928
Marlin/example_configurations/Anet/A6/Configuration.h
File diff suppressed because it is too large
View File


+ 0
- 1567
Marlin/example_configurations/Anet/A6/Configuration_adv.h
File diff suppressed because it is too large
View File


+ 0
- 1778
Marlin/example_configurations/Anet/A8/Configuration.h
File diff suppressed because it is too large
View File


+ 0
- 1567
Marlin/example_configurations/Anet/A8/Configuration_adv.h
File diff suppressed because it is too large
View File


+ 0
- 1760
Marlin/example_configurations/BQ/Hephestos/Configuration.h
File diff suppressed because it is too large
View File


+ 0
- 1567
Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h
File diff suppressed because it is too large
View File


+ 0
- 1770
Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
File diff suppressed because it is too large
View File


+ 0
- 1567
Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h
File diff suppressed because it is too large
View File


+ 0
- 22
Marlin/example_configurations/BQ/Hephestos_2/README.md View File

@@ -1,22 +0,0 @@
1
-# Example Configuration for BQ [Hephestos 2](http://www.bq.com/uk/hephestos-2)
2
-This configuration file is based on the original configuration file shipped with the heavily modified Marlin fork by BQ. The original firmware and configuration file can be found at [BQ Github repository](https://github.com/bq/Marlin).
3
-
4
-NOTE: The look and feel of the Hephestos 2 while navigating the LCD menu will change by using the original Marlin firmware.
5
-
6
-## Changelog
7
- * 2016/03/01 - Initial release
8
-
9
- * 2016/03/21 - Activated 4-point auto leveling by default
10
-                Updated miscellaneous z-probe values
11
-
12
- * 2016/06/21 - Disabled hot bed related options
13
-                Activated software endstops
14
-                SD printing now disables the heater when finished
15
-
16
- * 2016/07/13 - Update the `DEFAULT_AXIS_STEPS_PER_UNIT` for the Z axis
17
-                Increased the `DEFAULT_XYJERK`
18
-
19
- * 2016/12/13 - Configuration updated.
20
-
21
- * 2017/07/06 - Configuration updated to the latest Marlin version.
22
-                Added support for the official BQ heated bed kit.

+ 0
- 103
Marlin/example_configurations/BQ/Hephestos_2/_Bootscreen.h View File

@@ -1,103 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Custom Bitmap for splashscreen
25
- *
26
- * You may use one of the following tools to generate the C++ bitmap array from
27
- * a black and white image:
28
- *
29
- *  - http://www.marlinfw.org/tools/u8glib/converter.html
30
- *  - http://www.digole.com/tools/PicturetoC_Hex_converter.php
31
- */
32
-#include <avr/pgmspace.h>
33
-
34
-#define CUSTOM_BOOTSCREEN_TIMEOUT   2500
35
-#define CUSTOM_BOOTSCREEN_BMPWIDTH  62
36
-#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
37
-
38
-const unsigned char custom_start_bmp[512] PROGMEM = {
39
-  0x00, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00,
40
-  0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
41
-  0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
42
-  0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
43
-  0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
44
-  0x00, 0x00, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x00,
45
-  0x00, 0x03, 0xC0, 0x0F, 0xF0, 0x07, 0x80, 0x00,
46
-  0x00, 0x07, 0xE0, 0x07, 0xE0, 0x0F, 0xC0, 0x00,
47
-  0x00, 0x0F, 0xF0, 0x03, 0xC0, 0x1F, 0xE0, 0x00,
48
-  0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
49
-  0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
50
-  0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
51
-  0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
52
-  0x00, 0x1F, 0xF8, 0x00, 0x00, 0x3F, 0xF0, 0x00,
53
-  0x00, 0x0F, 0xF0, 0x00, 0x00, 0x1F, 0xE0, 0x00,
54
-  0x00, 0x07, 0xE0, 0x00, 0x00, 0x0F, 0xC0, 0x00,
55
-  0x00, 0x03, 0xC0, 0x00, 0x00, 0x07, 0x80, 0x00,
56
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
57
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
58
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF8,
59
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC,
60
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
61
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
62
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
63
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
64
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFC,
65
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFC,
66
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF8,
67
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
68
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
69
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
70
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
71
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
72
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
73
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
74
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
75
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
76
-  0x1E, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
77
-  0x3F, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
78
-  0x7F, 0x80, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
79
-  0xFF, 0xC0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
80
-  0xFF, 0xC0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
81
-  0xFF, 0xC0, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00,
82
-  0xFF, 0xC0, 0x00, 0x00, 0xF7, 0xC0, 0x1F, 0x80,
83
-  0xFF, 0xC0, 0x00, 0x00, 0xFF, 0xF0, 0x7F, 0xC0,
84
-  0x7F, 0x80, 0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xE0,
85
-  0x3F, 0x00, 0x00, 0x00, 0xFC, 0xF8, 0xF0, 0xF8,
86
-  0x1E, 0x00, 0x00, 0x00, 0xF8, 0x7D, 0xE0, 0x78,
87
-  0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
88
-  0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
89
-  0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
90
-  0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
91
-  0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
92
-  0x00, 0x00, 0x00, 0x00, 0xF0, 0x3D, 0xE0, 0x78,
93
-  0x00, 0x00, 0x00, 0x00, 0xF8, 0x79, 0xF0, 0xF8,
94
-  0x00, 0x00, 0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xF8,
95
-  0x00, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x7F, 0xF8,
96
-  0x00, 0x00, 0x00, 0x00, 0x0F, 0xE0, 0x3F, 0xF8,
97
-  0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x0E, 0x78,
98
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
99
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
100
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
101
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
102
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
103
-};

+ 0
- 0
Marlin/example_configurations/BQ/WITBOX/Configuration.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save