Browse Source

Merge remote-tracking branch 'upstream/2.0.x' into ctc-i3-pro-b

Thomas Buck 4 years ago
parent
commit
69b5ea1301
100 changed files with 4575 additions and 58524 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. 55
    10
      .gitignore
  16. 0
    359
      .travis.yml
  17. 3
    3
      LICENSE
  18. 0
    27
      Marlin/Conditionals.h
  19. 0
    480
      Marlin/Conditionals_LCD.h
  20. 0
    926
      Marlin/Conditionals_post.h
  21. 1049
    464
      Marlin/Configuration.h
  22. 2266
    560
      Marlin/Configuration_adv.h
  23. 0
    887
      Marlin/G26_Mesh_Validation_Tool.cpp
  24. 0
    1132
      Marlin/I2CPositionEncoder.cpp
  25. 0
    359
      Marlin/I2CPositionEncoder.h
  26. 0
    333
      Marlin/M100_Free_Mem_Chk.cpp
  27. 593
    248
      Marlin/Makefile
  28. 0
    497
      Marlin/Marlin.h
  29. 53
    72
      Marlin/Marlin.ino
  30. 0
    41
      Marlin/MarlinConfig.h
  31. 0
    654
      Marlin/MarlinSerial.cpp
  32. 0
    180
      Marlin/MarlinSerial.h
  33. 0
    13689
      Marlin/Marlin_main.cpp
  34. 0
    236
      Marlin/Max7219_Debug_LEDs.cpp
  35. 0
    88
      Marlin/Max7219_Debug_LEDs.h
  36. 0
    1386
      Marlin/SanityCheck.h
  37. 0
    729
      Marlin/Sd2Card.cpp
  38. 0
    251
      Marlin/Sd2Card.h
  39. 0
    1826
      Marlin/SdBaseFile.cpp
  40. 0
    492
      Marlin/SdBaseFile.h
  41. 0
    134
      Marlin/SdFatConfig.h
  42. 0
    655
      Marlin/SdFatStructs.h
  43. 0
    91
      Marlin/SdFatUtil.cpp
  44. 0
    56
      Marlin/SdFatUtil.h
  45. 0
    102
      Marlin/SdFile.cpp
  46. 0
    63
      Marlin/SdFile.h
  47. 0
    289
      Marlin/SdInfo.h
  48. 0
    420
      Marlin/SdVolume.cpp
  49. 0
    227
      Marlin/SdVolume.h
  50. 47
    65
      Marlin/Version.h
  51. 0
    46
      Marlin/blinkm.cpp
  52. 0
    31
      Marlin/blinkm.h
  53. 0
    106
      Marlin/boards.h
  54. 0
    146
      Marlin/buzzer.h
  55. 0
    885
      Marlin/cardreader.cpp
  56. 0
    190
      Marlin/cardreader.h
  57. 0
    145
      Marlin/circularqueue.h
  58. 0
    1852
      Marlin/configuration_store.cpp
  59. 0
    82
      Marlin/configuration_store.h
  60. 0
    151
      Marlin/dac_mcp4728.cpp
  61. 0
    66
      Marlin/dac_mcp4728.h
  62. 0
    106
      Marlin/digipot_mcp4018.cpp
  63. 0
    79
      Marlin/digipot_mcp4451.cpp
  64. 0
    514
      Marlin/dogm_bitmaps.h
  65. 0
    180
      Marlin/dogm_font_data_6x9_marlin.h
  66. 0
    194
      Marlin/dogm_font_data_HD44780_C.h
  67. 0
    192
      Marlin/dogm_font_data_HD44780_J.h
  68. 0
    226
      Marlin/dogm_font_data_HD44780_W.h
  69. 0
    198
      Marlin/dogm_font_data_ISO10646_1.h
  70. 0
    184
      Marlin/dogm_font_data_ISO10646_1_PL.h
  71. 0
    197
      Marlin/dogm_font_data_ISO10646_1_tr.h
  72. 0
    196
      Marlin/dogm_font_data_ISO10646_5_Cyrillic.h
  73. 0
    293
      Marlin/dogm_font_data_ISO10646_CN.h
  74. 0
    192
      Marlin/dogm_font_data_ISO10646_CZ.h
  75. 0
    205
      Marlin/dogm_font_data_ISO10646_Greek.h
  76. 0
    192
      Marlin/dogm_font_data_ISO10646_Kana.h
  77. 0
    45
      Marlin/dogm_font_data_Marlin_symbols.h
  78. 0
    167
      Marlin/duration_t.h
  79. 0
    206
      Marlin/endstop_interrupts.h
  80. 0
    451
      Marlin/endstops.cpp
  81. 0
    102
      Marlin/endstops.h
  82. 0
    189
      Marlin/enum.h
  83. 0
    1720
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h
  84. 0
    1424
      Marlin/example_configurations/AlephObjects/TAZ4/Configuration_adv.h
  85. 0
    1700
      Marlin/example_configurations/AliExpress/CL-260/Configuration.h
  86. 0
    15
      Marlin/example_configurations/AliExpress/CL-260/README.txt
  87. 0
    1859
      Marlin/example_configurations/Anet/A6/Configuration.h
  88. 0
    1424
      Marlin/example_configurations/Anet/A6/Configuration_adv.h
  89. 0
    1708
      Marlin/example_configurations/Anet/A8/Configuration.h
  90. 0
    1424
      Marlin/example_configurations/Anet/A8/Configuration_adv.h
  91. 0
    1691
      Marlin/example_configurations/BQ/Hephestos/Configuration.h
  92. 0
    1424
      Marlin/example_configurations/BQ/Hephestos/Configuration_adv.h
  93. 0
    1701
      Marlin/example_configurations/BQ/Hephestos_2/Configuration.h
  94. 0
    1424
      Marlin/example_configurations/BQ/Hephestos_2/Configuration_adv.h
  95. 0
    22
      Marlin/example_configurations/BQ/Hephestos_2/README.md
  96. 0
    103
      Marlin/example_configurations/BQ/Hephestos_2/_Bootscreen.h
  97. 0
    1691
      Marlin/example_configurations/BQ/WITBOX/Configuration.h
  98. 0
    1424
      Marlin/example_configurations/BQ/WITBOX/Configuration_adv.h
  99. 0
    1699
      Marlin/example_configurations/Cartesio/Configuration.h
  100. 0
    0
      Marlin/example_configurations/Cartesio/Configuration_adv.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 }}

+ 55
- 10
.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
 #
@@ -118,24 +117,70 @@ tags
118 117
 
119 118
 # PlatformIO files/dirs
120 119
 .pio*
121
-lib/readme.txt
120
+.pioenvs
121
+.piolibdeps
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
122 151
 
123 152
 #Visual Studio
124 153
 *.sln
125 154
 *.vcxproj
155
+*.vcxproj.user
126 156
 *.vcxproj.filters
127
-Marlin/Release/
128
-Marlin/Debug/
129
-Marlin/__vm/
130
-Marlin/.vs/
157
+Release/
158
+Debug/
159
+__vm/
160
+.vs/
161
+vc-fileutils.settings
131 162
 
132
-#VScode
163
+#Visual Studio Code
133 164
 .vscode
165
+.vscode/.browse.c_cpp.db*
166
+.vscode/c_cpp_properties.json
167
+.vscode/launch.json
168
+.vscode/*.db
134 169
 
135 170
 #cmake
136 171
 CMakeLists.txt
137
-Marlin/CMakeLists.txt
172
+src/CMakeLists.txt
138 173
 CMakeListsPrivate.txt
139 174
 
140 175
 #CLion
141 176
 cmake-build-*
177
+
178
+#Eclipse
179
+.project
180
+.cproject
181
+.pydevproject
182
+.settings
183
+.classpath
184
+
185
+#Python
186
+__pycache__

+ 0
- 359
.travis.yml View File

@@ -1,359 +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: Adafruit Neopixel library
56
-  - git clone https://github.com/adafruit/Adafruit_NeoPixel.git
57
-  - sudo mv Adafruit_NeoPixel /usr/local/share/arduino/libraries/Adafruit_NeoPixel
58
-  #
59
-before_script:
60
-  #
61
-  # Change current working directory to the build dir
62
-  - cd ${TRAVIS_BUILD_DIR}
63
-  #
64
-  # Generate custom version include
65
-  - generate_version_header_for_marlin ${TRAVIS_BUILD_DIR}/Marlin
66
-  - cat ${TRAVIS_BUILD_DIR}/Marlin/_Version.h
67
-  #
68
-script:
69
-  #
70
-  # Backup Configuration.h, Configuration_adv.h, and pins_RAMPS.h
71
-  #
72
-  - cp Marlin/Configuration.h Marlin/Configuration.h.backup
73
-  - cp Marlin/Configuration_adv.h Marlin/Configuration_adv.h.backup
74
-  - cp Marlin/pins_RAMPS.h Marlin/pins_RAMPS.h.backup
75
-  #
76
-  # Build with the default configurations
77
-  #
78
-  - build_marlin
79
-  #
80
-  # Test 2 extruders (one MAX6675) and heated bed on basic RAMPS 1.4
81
-  # Test a "Fix Mounted" Probe with Safe Homing, some arc options,
82
-  # linear bed leveling, M48, leveling debug, and firmware retraction.
83
-  #
84
-  - opt_set MOTHERBOARD BOARD_RAMPS_14_EEB
85
-  - opt_set EXTRUDERS 2
86
-  - opt_set TEMP_SENSOR_0 -2
87
-  - opt_set TEMP_SENSOR_1 1
88
-  - opt_set TEMP_SENSOR_BED 1
89
-  - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES
90
-  - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS
91
-  - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_RGBW_LED
92
-  - opt_enable AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE
93
-  - opt_enable_adv FWRETRACT MAX7219_DEBUG
94
-  - opt_set ABL_GRID_POINTS_X 16
95
-  - opt_set ABL_GRID_POINTS_Y 16
96
-  - opt_set_adv FANMUX0_PIN 53
97
-  - build_marlin
98
-  #
99
-  # Test a probeless build of AUTO_BED_LEVELING_UBL
100
-  #
101
-  - restore_configs
102
-  - opt_enable AUTO_BED_LEVELING_UBL UBL_G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS G3D_PANEL
103
-  - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING
104
-  - build_marlin
105
-  #
106
-  # And with a probe...
107
-  #
108
-  - opt_enable FIX_MOUNTED_PROBE
109
-  - build_marlin
110
-  #
111
-  # Test a Sled Z Probe
112
-  # ...with AUTO_BED_LEVELING_LINEAR, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, and EEPROM_CHITCHAT
113
-  #
114
-  - restore_configs
115
-  - opt_enable Z_PROBE_SLED AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
116
-  - build_marlin
117
-  #
118
-  # Test a Servo Probe
119
-  # ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES
120
-  #
121
-  - restore_configs
122
-  - opt_enable NUM_SERVOS Z_ENDSTOP_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE
123
-  - opt_set NUM_SERVOS 1
124
-  - opt_enable AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
125
-  - opt_enable_adv EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
126
-  - build_marlin
127
-  #
128
-  # Test MESH_BED_LEVELING feature, with LCD
129
-  #
130
-  - restore_configs
131
-  - opt_enable MESH_BED_LEVELING MESH_G28_REST_ORIGIN LCD_BED_LEVELING ULTIMAKERCONTROLLER
132
-  - build_marlin
133
-  #
134
-  # Test PROBE_MANUALLY feature, with LCD support,
135
-  #      EEPROM_SETTINGS, EEPROM_CHITCHAT, M100_FREE_MEMORY_WATCHER,
136
-  #      INCH_MODE_SUPPORT, TEMPERATURE_UNITS_SUPPORT
137
-  #
138
-  - restore_configs
139
-  - opt_set MOTHERBOARD BOARD_MINIRAMBO
140
-  - opt_enable PROBE_MANUALLY AUTO_BED_LEVELING_BILINEAR LCD_BED_LEVELING ULTIMAKERCONTROLLER
141
-  - opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT M100_FREE_MEMORY_WATCHER M100_FREE_MEMORY_DUMPER M100_FREE_MEMORY_CORRUPTOR INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT
142
-  - build_marlin
143
-  #
144
-  # Test 5 extruders on AZTEEG_X3_PRO (can use any board with >=5 extruders defined)
145
-  # Include a test for LIN_ADVANCE here also
146
-  #
147
-  - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
148
-  - opt_set EXTRUDERS 5
149
-  - opt_set TEMP_SENSOR_1 1
150
-  - opt_set TEMP_SENSOR_2 5
151
-  - opt_set TEMP_SENSOR_3 20
152
-  - opt_set TEMP_SENSOR_4 999
153
-  - opt_set TEMP_SENSOR_BED 1
154
-  - opt_enable_adv LIN_ADVANCE
155
-  - build_marlin
156
-  #
157
-  # Mixing Extruder with 5 steppers
158
-  #
159
-  - restore_configs
160
-  - opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO
161
-  - opt_enable MIXING_EXTRUDER
162
-  - opt_set MIXING_STEPPERS 5
163
-  - build_marlin
164
-  #
165
-  # Test DUAL_X_CARRIAGE
166
-  #
167
-  - restore_configs
168
-  - opt_set MOTHERBOARD BOARD_RUMBA
169
-  - opt_set EXTRUDERS 2
170
-  - opt_set TEMP_SENSOR_1 1
171
-  - opt_enable USE_XMAX_PLUG
172
-  - opt_enable_adv DUAL_X_CARRIAGE
173
-  - build_marlin
174
-  #
175
-  # Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER
176
-  #
177
-  - restore_configs
178
-  - opt_set MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D
179
-  - opt_set LCD_FEEDBACK_FREQUENCY_DURATION_MS 10
180
-  - opt_set LCD_FEEDBACK_FREQUENCY_HZ 100
181
-  - opt_enable BQ_LCD_SMART_CONTROLLER SPEAKER
182
-  #
183
-  # Test SWITCHING_EXTRUDER
184
-  #
185
-  - restore_configs
186
-  - opt_set MOTHERBOARD BOARD_RUMBA
187
-  - opt_set EXTRUDERS 2
188
-  - opt_enable NUM_SERVOS
189
-  - opt_set NUM_SERVOS 1
190
-  - opt_set TEMP_SENSOR_1 1
191
-  - opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER
192
-  - build_marlin
193
-  #
194
-  # Test MINIRAMBO for PWM_MOTOR_CURRENT
195
-  #      ULTIMAKERCONTROLLER, FILAMENT_LCD_DISPLAY, FILAMENT_WIDTH_SENSOR,
196
-  #      PRINTCOUNTER, NOZZLE_PARK_FEATURE, NOZZLE_CLEAN_FEATURE, PCA9632,
197
-  #      Z_DUAL_STEPPER_DRIVERS, Z_DUAL_ENDSTOPS, BEZIER_CURVE_SUPPORT, EXPERIMENTAL_I2CBUS,
198
-  #      ADVANCED_PAUSE_FEATURE, PARK_HEAD_ON_PAUSE, LCD_INFO_MENU,
199
-  #
200
-  - restore_configs
201
-  - opt_enable ULTIMAKERCONTROLLER FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR SDSUPPORT
202
-  - opt_enable PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE PCA9632
203
-  - opt_enable_adv Z_DUAL_STEPPER_DRIVERS Z_DUAL_ENDSTOPS BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS
204
-  - opt_set_adv I2C_SLAVE_ADDRESS 63
205
-  - opt_enable_adv ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE LCD_INFO_MENU
206
-  - pins_set RAMPS X_MAX_PIN -1
207
-  - opt_set_adv Z2_MAX_PIN 2
208
-  - build_marlin
209
-  #
210
-  # Enable COREXY
211
-  #
212
-  - restore_configs
213
-  - opt_enable COREXY
214
-  - build_marlin
215
-  #
216
-  # Enable COREYX (swapped)
217
-  #
218
-  #- restore_configs
219
-  #- opt_enable COREYX
220
-  #- build_marlin
221
-  #
222
-  #
223
-  ######## Other Standard LCD/Panels ##############
224
-  #
225
-  # ULTRA_LCD
226
-  #
227
-  - restore_configs
228
-  - opt_enable ULTRA_LCD
229
-  - build_marlin
230
-  #
231
-  # DOGLCD
232
-  #
233
-  - restore_configs
234
-  - opt_enable DOGLCD
235
-  - build_marlin
236
-  #
237
-  # MAKRPANEL
238
-  # Needs to use Melzi and Sanguino hardware
239
-  #
240
-  #- restore_configs
241
-  #- opt_enable MAKRPANEL
242
-  #- build_marlin
243
-  #
244
-  # REPRAP_DISCOUNT_SMART_CONTROLLER, SDSUPPORT, BABYSTEPPING, RIGIDBOARD_V2, and DAC_MOTOR_CURRENT_DEFAULT
245
-  #
246
-  - restore_configs
247
-  - opt_set MOTHERBOARD BOARD_RIGIDBOARD_V2
248
-  - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING DAC_MOTOR_CURRENT_DEFAULT
249
-  - build_marlin
250
-  #
251
-  # G3D_PANEL with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
252
-  #
253
-  - restore_configs
254
-  - opt_enable G3D_PANEL SDSUPPORT
255
-  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING
256
-  - opt_set_adv SDSORT_GCODE true
257
-  - opt_set_adv SDSORT_USES_RAM true
258
-  - opt_set_adv SDSORT_USES_STACK true
259
-  - opt_set_adv SDSORT_CACHE_NAMES true
260
-  - build_marlin
261
-  #
262
-  # REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with SDCARD_SORT_ALPHA and STATUS_MESSAGE_SCROLLING
263
-  #
264
-  - restore_configs
265
-  - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
266
-  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING
267
-  - build_marlin
268
-  #
269
-  # REPRAPWORLD_KEYPAD
270
-  #
271
-  # Cant find configuration details to get it to compile
272
-  #- restore_configs
273
-  #- opt_enable ULTRA_LCD REPRAPWORLD_KEYPAD REPRAPWORLD_KEYPAD_MOVE_STEP
274
-  #- build_marlin
275
-  #
276
-  # RA_CONTROL_PANEL
277
-  #
278
-  - restore_configs
279
-  - opt_enable RA_CONTROL_PANEL PINS_DEBUGGING
280
-  - build_marlin
281
-  #
282
-  ######## I2C LCD/PANELS ##############
283
-  #
284
-  # !!!ATTENTION!!!
285
-  # Most I2C configurations are failing at the moment because they require
286
-  # a different Liquid Crystal library "LiquidTWI2".
287
-  #
288
-  # LCD_I2C_SAINSMART_YWROBOT
289
-  #
290
-  #- restore_configs
291
-  #- opt_enable LCD_I2C_SAINSMART_YWROBOT
292
-  #- build_marlin
293
-  #
294
-  # LCD_I2C_PANELOLU2
295
-  #
296
-  #- restore_configs
297
-  #- opt_enable LCD_I2C_PANELOLU2
298
-  #- build_marlin
299
-  #
300
-  # LCD_I2C_VIKI
301
-  #
302
-  #- restore_configs
303
-  #- opt_enable LCD_I2C_VIKI
304
-  #- build_marlin
305
-  #
306
-  # LCM1602
307
-  #
308
-  - restore_configs
309
-  - opt_enable LCM1602
310
-  - build_marlin
311
-  #
312
-  #
313
-  ######## Example Configurations ##############
314
-  #
315
-  # BQ Hephestos 2
316
-  #- restore_configs
317
-  #- use_example_configs Hephestos_2
318
-  #- build_marlin
319
-  #
320
-  # Delta Config (generic) + ABL bilinear + PROBE_MANUALLY
321
-  - use_example_configs delta/generic
322
-  - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY
323
-  - build_marlin
324
-  #
325
-  # Delta Config (generic) + UBL + ALLEN_KEY + OLED_PANEL_TINYBOY2 + EEPROM_SETTINGS
326
-  #
327
-  - use_example_configs delta/generic
328
-  - opt_disable DISABLE_MIN_ENDSTOPS
329
-  - opt_enable AUTO_BED_LEVELING_UBL Z_PROBE_ALLEN_KEY EEPROM_SETTINGS EEPROM_CHITCHAT OLED_PANEL_TINYBOY2
330
-  - build_marlin
331
-  #
332
-  # Delta Config (FLSUN AC because it's complex)
333
-  #
334
-  - use_example_configs delta/FLSUN/auto_calibrate
335
-  - build_marlin
336
-  #
337
-  # Makibox Config  need to check board type for Teensy++ 2.0
338
-  #
339
-  #- use_example_configs makibox
340
-  #- build_marlin
341
-  #
342
-  # SCARA with TMC2130
343
-  #
344
-  - use_example_configs SCARA
345
-  - opt_enable AUTO_BED_LEVELING_BILINEAR FIX_MOUNTED_PROBE USE_ZMIN_PLUG EEPROM_SETTINGS EEPROM_CHITCHAT ULTIMAKERCONTROLLER
346
-  - opt_enable_adv HAVE_TMC2130 X_IS_TMC2130 Y_IS_TMC2130 Z_IS_TMC2130
347
-  - opt_enable_adv AUTOMATIC_CURRENT_CONTROL STEALTHCHOP HYBRID_THRESHOLD SENSORLESS_HOMING
348
-  - build_marlin
349
-  #
350
-  # tvrrug Config need to check board type for sanguino atmega644p
351
-  #
352
-  #- use_example_configs tvrrug/Round2
353
-  #- build_marlin
354
-  #
355
-  #
356
-  ######## Board Types #############
357
-  #
358
-  # To be added in nightly test branch
359
-  #

+ 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
- 480
Marlin/Conditionals_LCD.h View File

@@ -1,480 +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(ANET_KEYPAD_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 REVERSE_MENU_DIRECTION
57
-
58
-  #elif ENABLED(ANET_FULL_GRAPHICS_LCD)
59
-
60
-    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
61
-
62
-  #elif ENABLED(BQ_LCD_SMART_CONTROLLER)
63
-
64
-    #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
65
-    #define LONG_FILENAME_HOST_SUPPORT
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)
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
-   * UBL has its own manual probing, so this just causes trouble.
458
-   */
459
-  #if ENABLED(AUTO_BED_LEVELING_UBL)
460
-    #undef PROBE_MANUALLY
461
-  #endif
462
-
463
-  /**
464
-   * Set a flag for any enabled probe
465
-   */
466
-  #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))
467
-
468
-  /**
469
-   * Clear probe pin settings when no probe is selected
470
-   */
471
-  #if !PROBE_SELECTED || ENABLED(PROBE_MANUALLY)
472
-    #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
473
-    #undef Z_MIN_PROBE_ENDSTOP
474
-  #endif
475
-
476
-  #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
477
-  #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
478
-  #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED))
479
-
480
-#endif // CONDITIONALS_LCD_H

+ 0
- 926
Marlin/Conditionals_post.h View File

@@ -1,926 +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_post.h
25
- * Defines that depend on configuration but are not editable.
26
- */
27
-
28
-#ifndef CONDITIONALS_POST_H
29
-#define CONDITIONALS_POST_H
30
-
31
-  #define IS_SCARA (ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA))
32
-  #define IS_KINEMATIC (ENABLED(DELTA) || IS_SCARA)
33
-  #define IS_CARTESIAN !IS_KINEMATIC
34
-
35
-  /**
36
-   * Axis lengths and center
37
-   */
38
-  #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
39
-  #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
40
-  #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
41
-
42
-  // Defined only if the sanity-check is bypassed
43
-  #ifndef X_BED_SIZE
44
-    #define X_BED_SIZE X_MAX_LENGTH
45
-  #endif
46
-  #ifndef Y_BED_SIZE
47
-    #define Y_BED_SIZE Y_MAX_LENGTH
48
-  #endif
49
-
50
-  // Require 0,0 bed center for Delta and SCARA
51
-  #if IS_KINEMATIC
52
-    #define BED_CENTER_AT_0_0
53
-  #endif
54
-
55
-  // Define center values for future use
56
-  #if ENABLED(BED_CENTER_AT_0_0)
57
-    #define X_CENTER 0
58
-    #define Y_CENTER 0
59
-  #else
60
-    #define X_CENTER ((X_BED_SIZE) / 2)
61
-    #define Y_CENTER ((Y_BED_SIZE) / 2)
62
-  #endif
63
-  #define Z_CENTER ((Z_MIN_POS + Z_MAX_POS) / 2)
64
-
65
-  // Get the linear boundaries of the bed
66
-  #define X_MIN_BED (X_CENTER - (X_BED_SIZE) / 2)
67
-  #define X_MAX_BED (X_CENTER + (X_BED_SIZE) / 2)
68
-  #define Y_MIN_BED (Y_CENTER - (Y_BED_SIZE) / 2)
69
-  #define Y_MAX_BED (Y_CENTER + (Y_BED_SIZE) / 2)
70
-
71
-  /**
72
-   * CoreXY, CoreXZ, and CoreYZ - and their reverse
73
-   */
74
-  #define CORE_IS_XY (ENABLED(COREXY) || ENABLED(COREYX))
75
-  #define CORE_IS_XZ (ENABLED(COREXZ) || ENABLED(COREZX))
76
-  #define CORE_IS_YZ (ENABLED(COREYZ) || ENABLED(COREZY))
77
-  #define IS_CORE (CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ)
78
-  #if IS_CORE
79
-    #if CORE_IS_XY
80
-      #define CORE_AXIS_1 A_AXIS
81
-      #define CORE_AXIS_2 B_AXIS
82
-      #define NORMAL_AXIS Z_AXIS
83
-    #elif CORE_IS_XZ
84
-      #define CORE_AXIS_1 A_AXIS
85
-      #define NORMAL_AXIS Y_AXIS
86
-      #define CORE_AXIS_2 C_AXIS
87
-    #elif CORE_IS_YZ
88
-      #define NORMAL_AXIS X_AXIS
89
-      #define CORE_AXIS_1 B_AXIS
90
-      #define CORE_AXIS_2 C_AXIS
91
-    #endif
92
-    #if (ENABLED(COREYX) || ENABLED(COREZX) || ENABLED(COREZY))
93
-      #define CORESIGN(n) (-(n))
94
-    #else
95
-      #define CORESIGN(n) (n)
96
-    #endif
97
-  #endif
98
-
99
-  /**
100
-   * No adjustable bed on non-cartesians
101
-   */
102
-  #if IS_KINEMATIC
103
-    #undef LEVEL_BED_CORNERS
104
-  #endif
105
-
106
-  /**
107
-   * SCARA cannot use SLOWDOWN and requires QUICKHOME
108
-   */
109
-  #if IS_SCARA
110
-    #undef SLOWDOWN
111
-    #define QUICK_HOME
112
-  #endif
113
-
114
-  /**
115
-   * Set the home position based on settings or manual overrides
116
-   */
117
-  #ifdef MANUAL_X_HOME_POS
118
-    #define X_HOME_POS MANUAL_X_HOME_POS
119
-  #elif ENABLED(BED_CENTER_AT_0_0)
120
-    #if ENABLED(DELTA)
121
-      #define X_HOME_POS 0
122
-    #else
123
-      #define X_HOME_POS ((X_BED_SIZE) * (X_HOME_DIR) * 0.5)
124
-    #endif
125
-  #else
126
-    #if ENABLED(DELTA)
127
-      #define X_HOME_POS (X_MIN_POS + (X_BED_SIZE) * 0.5)
128
-    #else
129
-      #define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
130
-    #endif
131
-  #endif
132
-
133
-  #ifdef MANUAL_Y_HOME_POS
134
-    #define Y_HOME_POS MANUAL_Y_HOME_POS
135
-  #elif ENABLED(BED_CENTER_AT_0_0)
136
-    #if ENABLED(DELTA)
137
-      #define Y_HOME_POS 0
138
-    #else
139
-      #define Y_HOME_POS ((Y_BED_SIZE) * (Y_HOME_DIR) * 0.5)
140
-    #endif
141
-  #else
142
-    #if ENABLED(DELTA)
143
-      #define Y_HOME_POS (Y_MIN_POS + (Y_BED_SIZE) * 0.5)
144
-    #else
145
-      #define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
146
-    #endif
147
-  #endif
148
-
149
-  #ifdef MANUAL_Z_HOME_POS
150
-    #define Z_HOME_POS MANUAL_Z_HOME_POS
151
-  #else
152
-    #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS)
153
-  #endif
154
-
155
-  /**
156
-   * If DELTA_HEIGHT isn't defined use the old setting
157
-   */
158
-  #if ENABLED(DELTA) && !defined(DELTA_HEIGHT)
159
-    #define DELTA_HEIGHT Z_HOME_POS
160
-  #endif
161
-
162
-  /**
163
-   * Auto Bed Leveling and Z Probe Repeatability Test
164
-   */
165
-  #define HOMING_Z_WITH_PROBE (HAS_BED_PROBE && Z_HOME_DIR < 0 && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN))
166
-
167
-  /**
168
-   * Z Sled Probe requires Z_SAFE_HOMING
169
-   */
170
-  #if ENABLED(Z_PROBE_SLED)
171
-    #define Z_SAFE_HOMING
172
-  #endif
173
-
174
-  /**
175
-   * DELTA should ignore Z_SAFE_HOMING and SLOWDOWN
176
-   */
177
-  #if ENABLED(DELTA)
178
-    #undef Z_SAFE_HOMING
179
-    #undef SLOWDOWN
180
-  #endif
181
-
182
-  /**
183
-   * Safe Homing Options
184
-   */
185
-  #if ENABLED(Z_SAFE_HOMING)
186
-    #ifndef Z_SAFE_HOMING_X_POINT
187
-      #define Z_SAFE_HOMING_X_POINT X_CENTER
188
-    #endif
189
-    #ifndef Z_SAFE_HOMING_Y_POINT
190
-      #define Z_SAFE_HOMING_Y_POINT Y_CENTER
191
-    #endif
192
-    #define X_TILT_FULCRUM Z_SAFE_HOMING_X_POINT
193
-    #define Y_TILT_FULCRUM Z_SAFE_HOMING_Y_POINT
194
-  #else
195
-    #define X_TILT_FULCRUM X_HOME_POS
196
-    #define Y_TILT_FULCRUM Y_HOME_POS
197
-  #endif
198
-
199
-  /**
200
-   * Host keep alive
201
-   */
202
-  #ifndef DEFAULT_KEEPALIVE_INTERVAL
203
-    #define DEFAULT_KEEPALIVE_INTERVAL 2
204
-  #endif
205
-
206
-  /**
207
-   * Provide a MAX_AUTORETRACT for older configs
208
-   */
209
-  #if ENABLED(FWRETRACT) && !defined(MAX_AUTORETRACT)
210
-    #define MAX_AUTORETRACT 99
211
-  #endif
212
-
213
-  /**
214
-   * MAX_STEP_FREQUENCY differs for TOSHIBA
215
-   */
216
-  #if ENABLED(CONFIG_STEPPERS_TOSHIBA)
217
-    #define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
218
-  #else
219
-    #define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
220
-  #endif
221
-
222
-  // MS1 MS2 Stepper Driver Microstepping mode table
223
-  #define MICROSTEP1 LOW,LOW
224
-  #define MICROSTEP2 HIGH,LOW
225
-  #define MICROSTEP4 LOW,HIGH
226
-  #define MICROSTEP8 HIGH,HIGH
227
-  #define MICROSTEP16 HIGH,HIGH
228
-
229
-  /**
230
-   * Override here because this is set in Configuration_adv.h
231
-   */
232
-  #if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
233
-    #undef SD_DETECT_INVERTED
234
-  #endif
235
-
236
-  /**
237
-   * Set defaults for missing (newer) options
238
-   */
239
-  #ifndef DISABLE_INACTIVE_X
240
-    #define DISABLE_INACTIVE_X DISABLE_X
241
-  #endif
242
-  #ifndef DISABLE_INACTIVE_Y
243
-    #define DISABLE_INACTIVE_Y DISABLE_Y
244
-  #endif
245
-  #ifndef DISABLE_INACTIVE_Z
246
-    #define DISABLE_INACTIVE_Z DISABLE_Z
247
-  #endif
248
-  #ifndef DISABLE_INACTIVE_E
249
-    #define DISABLE_INACTIVE_E DISABLE_E
250
-  #endif
251
-
252
-  // Power Signal Control Definitions
253
-  // By default use ATX definition
254
-  #ifndef POWER_SUPPLY
255
-    #define POWER_SUPPLY 1
256
-  #endif
257
-  #if (POWER_SUPPLY == 1)     // 1 = ATX
258
-    #define PS_ON_AWAKE  LOW
259
-    #define PS_ON_ASLEEP HIGH
260
-  #elif (POWER_SUPPLY == 2)   // 2 = X-Box 360 203W
261
-    #define PS_ON_AWAKE  HIGH
262
-    #define PS_ON_ASLEEP LOW
263
-  #endif
264
-  #define HAS_POWER_SWITCH (POWER_SUPPLY > 0 && PIN_EXISTS(PS_ON))
265
-
266
-  /**
267
-   * Temp Sensor defines
268
-   */
269
-  #if TEMP_SENSOR_0 == -3
270
-    #define HEATER_0_USES_MAX6675
271
-    #define MAX6675_IS_MAX31855
272
-    #define MAX6675_TMIN -270
273
-    #define MAX6675_TMAX 1800
274
-  #elif TEMP_SENSOR_0 == -2
275
-    #define HEATER_0_USES_MAX6675
276
-    #define MAX6675_TMIN 0
277
-    #define MAX6675_TMAX 1024
278
-  #elif TEMP_SENSOR_0 == -1
279
-    #define HEATER_0_USES_AD595
280
-  #elif TEMP_SENSOR_0 == 0
281
-    #undef HEATER_0_MINTEMP
282
-    #undef HEATER_0_MAXTEMP
283
-  #elif TEMP_SENSOR_0 > 0
284
-    #define THERMISTORHEATER_0 TEMP_SENSOR_0
285
-    #define HEATER_0_USES_THERMISTOR
286
-  #endif
287
-
288
-  #if TEMP_SENSOR_1 <= -2
289
-    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_1"
290
-  #elif TEMP_SENSOR_1 == -1
291
-    #define HEATER_1_USES_AD595
292
-  #elif TEMP_SENSOR_1 == 0
293
-    #undef HEATER_1_MINTEMP
294
-    #undef HEATER_1_MAXTEMP
295
-  #elif TEMP_SENSOR_1 > 0
296
-    #define THERMISTORHEATER_1 TEMP_SENSOR_1
297
-    #define HEATER_1_USES_THERMISTOR
298
-  #endif
299
-
300
-  #if TEMP_SENSOR_2 <= -2
301
-    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_2"
302
-  #elif TEMP_SENSOR_2 == -1
303
-    #define HEATER_2_USES_AD595
304
-  #elif TEMP_SENSOR_2 == 0
305
-    #undef HEATER_2_MINTEMP
306
-    #undef HEATER_2_MAXTEMP
307
-  #elif TEMP_SENSOR_2 > 0
308
-    #define THERMISTORHEATER_2 TEMP_SENSOR_2
309
-    #define HEATER_2_USES_THERMISTOR
310
-  #endif
311
-
312
-  #if TEMP_SENSOR_3 <= -2
313
-    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_3"
314
-  #elif TEMP_SENSOR_3 == -1
315
-    #define HEATER_3_USES_AD595
316
-  #elif TEMP_SENSOR_3 == 0
317
-    #undef HEATER_3_MINTEMP
318
-    #undef HEATER_3_MAXTEMP
319
-  #elif TEMP_SENSOR_3 > 0
320
-    #define THERMISTORHEATER_3 TEMP_SENSOR_3
321
-    #define HEATER_3_USES_THERMISTOR
322
-  #endif
323
-
324
-  #if TEMP_SENSOR_4 <= -2
325
-    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_4"
326
-  #elif TEMP_SENSOR_4 == -1
327
-    #define HEATER_4_USES_AD595
328
-  #elif TEMP_SENSOR_4 == 0
329
-    #undef HEATER_4_MINTEMP
330
-    #undef HEATER_4_MAXTEMP
331
-  #elif TEMP_SENSOR_4 > 0
332
-    #define THERMISTORHEATER_4 TEMP_SENSOR_4
333
-    #define HEATER_4_USES_THERMISTOR
334
-  #endif
335
-
336
-  #if TEMP_SENSOR_BED <= -2
337
-    #error "MAX6675 / MAX31855 Thermocouples not supported for TEMP_SENSOR_BED"
338
-  #elif TEMP_SENSOR_BED == -1
339
-    #define BED_USES_AD595
340
-  #elif TEMP_SENSOR_BED == 0
341
-    #undef BED_MINTEMP
342
-    #undef BED_MAXTEMP
343
-  #elif TEMP_SENSOR_BED > 0
344
-    #define THERMISTORBED TEMP_SENSOR_BED
345
-    #define BED_USES_THERMISTOR
346
-  #endif
347
-
348
-  /**
349
-   * Flags for PID handling
350
-   */
351
-  #define HAS_PID_HEATING (ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED))
352
-  #define HAS_PID_FOR_BOTH (ENABLED(PIDTEMP) && ENABLED(PIDTEMPBED))
353
-
354
-  /**
355
-   * Default hotend offsets, if not defined
356
-   */
357
-  #if HOTENDS > 1
358
-    #ifndef HOTEND_OFFSET_X
359
-      #define HOTEND_OFFSET_X { 0 } // X offsets for each extruder
360
-    #endif
361
-    #ifndef HOTEND_OFFSET_Y
362
-      #define HOTEND_OFFSET_Y { 0 } // Y offsets for each extruder
363
-    #endif
364
-    #if !defined(HOTEND_OFFSET_Z) && (ENABLED(DUAL_X_CARRIAGE) || ENABLED(SWITCHING_NOZZLE))
365
-      #define HOTEND_OFFSET_Z { 0 }
366
-    #endif
367
-  #endif
368
-
369
-  /**
370
-   * ARRAY_BY_EXTRUDERS based on EXTRUDERS
371
-   */
372
-  #define ARRAY_BY_EXTRUDERS(...) ARRAY_N(EXTRUDERS, __VA_ARGS__)
373
-  #define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1)
374
-
375
-  /**
376
-   * ARRAY_BY_HOTENDS based on HOTENDS
377
-   */
378
-  #define ARRAY_BY_HOTENDS(...) ARRAY_N(HOTENDS, __VA_ARGS__)
379
-  #define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1)
380
-
381
-  /**
382
-   * Z_DUAL_ENDSTOPS endstop reassignment
383
-   */
384
-  #if ENABLED(Z_DUAL_ENDSTOPS)
385
-    #define _XMIN_ 100
386
-    #define _YMIN_ 200
387
-    #define _ZMIN_ 300
388
-    #define _XMAX_ 101
389
-    #define _YMAX_ 201
390
-    #define _ZMAX_ 301
391
-    #if Z2_USE_ENDSTOP == _XMIN_
392
-      #define USE_XMIN_PLUG
393
-    #elif Z2_USE_ENDSTOP == _XMAX_
394
-      #define USE_XMAX_PLUG
395
-    #elif Z2_USE_ENDSTOP == _YMIN_
396
-      #define USE_YMIN_PLUG
397
-    #elif Z2_USE_ENDSTOP == _YMAX_
398
-      #define USE_YMAX_PLUG
399
-    #elif Z2_USE_ENDSTOP == _ZMIN_
400
-      #define USE_ZMIN_PLUG
401
-    #elif Z2_USE_ENDSTOP == _ZMAX_
402
-      #define USE_ZMAX_PLUG
403
-    #endif
404
-    #if Z_HOME_DIR > 0
405
-      #if Z2_USE_ENDSTOP == _XMIN_
406
-        #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
407
-        #define Z2_MAX_PIN X_MIN_PIN
408
-      #elif Z2_USE_ENDSTOP == _XMAX_
409
-        #define Z2_MAX_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
410
-        #define Z2_MAX_PIN X_MAX_PIN
411
-      #elif Z2_USE_ENDSTOP == _YMIN_
412
-        #define Z2_MAX_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
413
-        #define Z2_MAX_PIN Y_MIN_PIN
414
-      #elif Z2_USE_ENDSTOP == _YMAX_
415
-        #define Z2_MAX_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
416
-        #define Z2_MAX_PIN Y_MAX_PIN
417
-      #elif Z2_USE_ENDSTOP == _ZMIN_
418
-        #define Z2_MAX_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
419
-        #define Z2_MAX_PIN Z_MIN_PIN
420
-      #elif Z2_USE_ENDSTOP == _ZMAX_
421
-        #define Z2_MAX_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
422
-        #define Z2_MAX_PIN Z_MAX_PIN
423
-      #else
424
-        #define Z2_MAX_ENDSTOP_INVERTING false
425
-      #endif
426
-    #else
427
-      #if Z2_USE_ENDSTOP == _XMIN_
428
-        #define Z2_MIN_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING
429
-        #define Z2_MIN_PIN X_MIN_PIN
430
-      #elif Z2_USE_ENDSTOP == _XMAX_
431
-        #define Z2_MIN_ENDSTOP_INVERTING X_MAX_ENDSTOP_INVERTING
432
-        #define Z2_MIN_PIN X_MAX_PIN
433
-      #elif Z2_USE_ENDSTOP == _YMIN_
434
-        #define Z2_MIN_ENDSTOP_INVERTING Y_MIN_ENDSTOP_INVERTING
435
-        #define Z2_MIN_PIN Y_MIN_PIN
436
-      #elif Z2_USE_ENDSTOP == _YMAX_
437
-        #define Z2_MIN_ENDSTOP_INVERTING Y_MAX_ENDSTOP_INVERTING
438
-        #define Z2_MIN_PIN Y_MAX_PIN
439
-      #elif Z2_USE_ENDSTOP == _ZMIN_
440
-        #define Z2_MIN_ENDSTOP_INVERTING Z_MIN_ENDSTOP_INVERTING
441
-        #define Z2_MIN_PIN Z_MIN_PIN
442
-      #elif Z2_USE_ENDSTOP == _ZMAX_
443
-        #define Z2_MIN_ENDSTOP_INVERTING Z_MAX_ENDSTOP_INVERTING
444
-        #define Z2_MIN_PIN Z_MAX_PIN
445
-      #else
446
-        #define Z2_MIN_ENDSTOP_INVERTING false
447
-      #endif
448
-    #endif
449
-  #endif
450
-
451
-  // Is an endstop plug used for the Z2 endstop or the bed probe?
452
-  #define IS_Z2_OR_PROBE(A,M) ( \
453
-       (ENABLED(Z_DUAL_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_) \
454
-    || (ENABLED(Z_MIN_PROBE_ENDSTOP) && Z_MIN_PROBE_PIN == A##_##M##_PIN ) )
455
-
456
-  /**
457
-   * Set ENDSTOPPULLUPS for active endstop switches
458
-   */
459
-  #if ENABLED(ENDSTOPPULLUPS)
460
-    #if ENABLED(USE_XMAX_PLUG)
461
-      #define ENDSTOPPULLUP_XMAX
462
-    #endif
463
-    #if ENABLED(USE_YMAX_PLUG)
464
-      #define ENDSTOPPULLUP_YMAX
465
-    #endif
466
-    #if ENABLED(USE_ZMAX_PLUG)
467
-      #define ENDSTOPPULLUP_ZMAX
468
-    #endif
469
-    #if ENABLED(USE_XMIN_PLUG)
470
-      #define ENDSTOPPULLUP_XMIN
471
-    #endif
472
-    #if ENABLED(USE_YMIN_PLUG)
473
-      #define ENDSTOPPULLUP_YMIN
474
-    #endif
475
-    #if ENABLED(USE_ZMIN_PLUG)
476
-      #define ENDSTOPPULLUP_ZMIN
477
-    #endif
478
-  #endif
479
-
480
-  /**
481
-   * Shorthand for pin tests, used wherever needed
482
-   */
483
-
484
-  // Steppers
485
-  #define HAS_X_ENABLE      (PIN_EXISTS(X_ENABLE))
486
-  #define HAS_X_DIR         (PIN_EXISTS(X_DIR))
487
-  #define HAS_X_STEP        (PIN_EXISTS(X_STEP))
488
-  #define HAS_X_MICROSTEPS  (PIN_EXISTS(X_MS1))
489
-
490
-  #define HAS_X2_ENABLE     (PIN_EXISTS(X2_ENABLE))
491
-  #define HAS_X2_DIR        (PIN_EXISTS(X2_DIR))
492
-  #define HAS_X2_STEP       (PIN_EXISTS(X2_STEP))
493
-  #define HAS_Y_MICROSTEPS  (PIN_EXISTS(Y_MS1))
494
-
495
-  #define HAS_Y_ENABLE      (PIN_EXISTS(Y_ENABLE))
496
-  #define HAS_Y_DIR         (PIN_EXISTS(Y_DIR))
497
-  #define HAS_Y_STEP        (PIN_EXISTS(Y_STEP))
498
-  #define HAS_Z_MICROSTEPS  (PIN_EXISTS(Z_MS1))
499
-
500
-  #define HAS_Y2_ENABLE     (PIN_EXISTS(Y2_ENABLE))
501
-  #define HAS_Y2_DIR        (PIN_EXISTS(Y2_DIR))
502
-  #define HAS_Y2_STEP       (PIN_EXISTS(Y2_STEP))
503
-
504
-  #define HAS_Z_ENABLE      (PIN_EXISTS(Z_ENABLE))
505
-  #define HAS_Z_DIR         (PIN_EXISTS(Z_DIR))
506
-  #define HAS_Z_STEP        (PIN_EXISTS(Z_STEP))
507
-
508
-  #define HAS_Z2_ENABLE     (PIN_EXISTS(Z2_ENABLE))
509
-  #define HAS_Z2_DIR        (PIN_EXISTS(Z2_DIR))
510
-  #define HAS_Z2_STEP       (PIN_EXISTS(Z2_STEP))
511
-
512
-  // Extruder steppers and solenoids
513
-  #define HAS_E0_ENABLE     (PIN_EXISTS(E0_ENABLE))
514
-  #define HAS_E0_DIR        (PIN_EXISTS(E0_DIR))
515
-  #define HAS_E0_STEP       (PIN_EXISTS(E0_STEP))
516
-  #define HAS_E0_MICROSTEPS (PIN_EXISTS(E0_MS1))
517
-  #define HAS_SOLENOID_0    (PIN_EXISTS(SOL0))
518
-
519
-  #define HAS_E1_ENABLE     (PIN_EXISTS(E1_ENABLE))
520
-  #define HAS_E1_DIR        (PIN_EXISTS(E1_DIR))
521
-  #define HAS_E1_STEP       (PIN_EXISTS(E1_STEP))
522
-  #define HAS_E1_MICROSTEPS (PIN_EXISTS(E1_MS1))
523
-  #define HAS_SOLENOID_1    (PIN_EXISTS(SOL1))
524
-
525
-  #define HAS_E2_ENABLE     (PIN_EXISTS(E2_ENABLE))
526
-  #define HAS_E2_DIR        (PIN_EXISTS(E2_DIR))
527
-  #define HAS_E2_STEP       (PIN_EXISTS(E2_STEP))
528
-  #define HAS_E2_MICROSTEPS (PIN_EXISTS(E2_MS1))
529
-  #define HAS_SOLENOID_2    (PIN_EXISTS(SOL2))
530
-
531
-  #define HAS_E3_ENABLE     (PIN_EXISTS(E3_ENABLE))
532
-  #define HAS_E3_DIR        (PIN_EXISTS(E3_DIR))
533
-  #define HAS_E3_STEP       (PIN_EXISTS(E3_STEP))
534
-  #define HAS_E3_MICROSTEPS (PIN_EXISTS(E3_MS1))
535
-  #define HAS_SOLENOID_3    (PIN_EXISTS(SOL3))
536
-
537
-  #define HAS_E4_ENABLE     (PIN_EXISTS(E4_ENABLE))
538
-  #define HAS_E4_DIR        (PIN_EXISTS(E4_DIR))
539
-  #define HAS_E4_STEP       (PIN_EXISTS(E4_STEP))
540
-  #define HAS_E4_MICROSTEPS (PIN_EXISTS(E4_MS1))
541
-  #define HAS_SOLENOID_4    (PIN_EXISTS(SOL4))
542
-
543
-  // Endstops and bed probe
544
-  #define HAS_X_MIN (PIN_EXISTS(X_MIN) && !IS_Z2_OR_PROBE(X,MIN))
545
-  #define HAS_X_MAX (PIN_EXISTS(X_MAX) && !IS_Z2_OR_PROBE(X,MAX))
546
-  #define HAS_Y_MIN (PIN_EXISTS(Y_MIN) && !IS_Z2_OR_PROBE(Y,MIN))
547
-  #define HAS_Y_MAX (PIN_EXISTS(Y_MAX) && !IS_Z2_OR_PROBE(Y,MAX))
548
-  #define HAS_Z_MIN (PIN_EXISTS(Z_MIN) && !IS_Z2_OR_PROBE(Z,MIN))
549
-  #define HAS_Z_MAX (PIN_EXISTS(Z_MAX) && !IS_Z2_OR_PROBE(Z,MAX))
550
-  #define HAS_Z2_MIN (PIN_EXISTS(Z2_MIN))
551
-  #define HAS_Z2_MAX (PIN_EXISTS(Z2_MAX))
552
-  #define HAS_Z_MIN_PROBE_PIN (PIN_EXISTS(Z_MIN_PROBE))
553
-
554
-  // Thermistors
555
-  #define HAS_TEMP_0 (PIN_EXISTS(TEMP_0) && TEMP_SENSOR_0 != 0 && TEMP_SENSOR_0 > -2)
556
-  #define HAS_TEMP_1 (PIN_EXISTS(TEMP_1) && TEMP_SENSOR_1 != 0 && TEMP_SENSOR_1 > -2)
557
-  #define HAS_TEMP_2 (PIN_EXISTS(TEMP_2) && TEMP_SENSOR_2 != 0 && TEMP_SENSOR_2 > -2)
558
-  #define HAS_TEMP_3 (PIN_EXISTS(TEMP_3) && TEMP_SENSOR_3 != 0 && TEMP_SENSOR_3 > -2)
559
-  #define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2)
560
-  #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
561
-  #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2)
562
-
563
-  // Heaters
564
-  #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
565
-  #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
566
-  #define HAS_HEATER_2 (PIN_EXISTS(HEATER_2))
567
-  #define HAS_HEATER_3 (PIN_EXISTS(HEATER_3))
568
-  #define HAS_HEATER_4 (PIN_EXISTS(HEATER_4))
569
-  #define HAS_HEATER_BED (PIN_EXISTS(HEATER_BED))
570
-
571
-  // Thermal protection
572
-  #define HAS_THERMALLY_PROTECTED_BED (ENABLED(THERMAL_PROTECTION_BED) && HAS_TEMP_BED && HAS_HEATER_BED)
573
-  #define WATCH_HOTENDS (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0)
574
-  #define WATCH_THE_BED (HAS_THERMALLY_PROTECTED_BED && WATCH_BED_TEMP_PERIOD > 0)
575
-
576
-  // Auto fans
577
-  #define HAS_AUTO_FAN_0 (PIN_EXISTS(E0_AUTO_FAN))
578
-  #define HAS_AUTO_FAN_1 (HOTENDS > 1 && PIN_EXISTS(E1_AUTO_FAN))
579
-  #define HAS_AUTO_FAN_2 (HOTENDS > 2 && PIN_EXISTS(E2_AUTO_FAN))
580
-  #define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN))
581
-  #define HAS_AUTO_FAN_4 (HOTENDS > 4 && PIN_EXISTS(E4_AUTO_FAN))
582
-  #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
583
-  #define AUTO_1_IS_0 (E1_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
584
-  #define AUTO_2_IS_0 (E2_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
585
-  #define AUTO_2_IS_1 (E2_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
586
-  #define AUTO_3_IS_0 (E3_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
587
-  #define AUTO_3_IS_1 (E3_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
588
-  #define AUTO_3_IS_2 (E3_AUTO_FAN_PIN == E2_AUTO_FAN_PIN)
589
-  #define AUTO_4_IS_0 (E4_AUTO_FAN_PIN == E0_AUTO_FAN_PIN)
590
-  #define AUTO_4_IS_1 (E4_AUTO_FAN_PIN == E1_AUTO_FAN_PIN)
591
-  #define AUTO_4_IS_2 (E4_AUTO_FAN_PIN == E2_AUTO_FAN_PIN)
592
-  #define AUTO_4_IS_3 (E4_AUTO_FAN_PIN == E3_AUTO_FAN_PIN)
593
-
594
-  // Other fans
595
-  #define HAS_FAN0 (PIN_EXISTS(FAN))
596
-  #define HAS_FAN1 (PIN_EXISTS(FAN1) && CONTROLLER_FAN_PIN != FAN1_PIN && E0_AUTO_FAN_PIN != FAN1_PIN && E1_AUTO_FAN_PIN != FAN1_PIN && E2_AUTO_FAN_PIN != FAN1_PIN && E3_AUTO_FAN_PIN != FAN1_PIN)
597
-  #define HAS_FAN2 (PIN_EXISTS(FAN2) && CONTROLLER_FAN_PIN != FAN2_PIN && E0_AUTO_FAN_PIN != FAN2_PIN && E1_AUTO_FAN_PIN != FAN2_PIN && E2_AUTO_FAN_PIN != FAN2_PIN && E3_AUTO_FAN_PIN != FAN2_PIN)
598
-  #define HAS_CONTROLLER_FAN (PIN_EXISTS(CONTROLLER_FAN))
599
-
600
-  // Servos
601
-  #define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0)
602
-  #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
603
-  #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
604
-  #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
605
-  #define HAS_SERVO_3 (PIN_EXISTS(SERVO3))
606
-
607
-  // Sensors
608
-  #define HAS_FILAMENT_WIDTH_SENSOR (PIN_EXISTS(FILWIDTH))
609
-  #define HAS_FIL_RUNOUT (PIN_EXISTS(FIL_RUNOUT))
610
-
611
-  // User Interface
612
-  #define HAS_HOME (PIN_EXISTS(HOME))
613
-  #define HAS_KILL (PIN_EXISTS(KILL))
614
-  #define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
615
-  #define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
616
-  #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
617
-  #define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE))
618
-
619
-  // Digital control
620
-  #define HAS_MICROSTEPS (HAS_X_MICROSTEPS || HAS_Y_MICROSTEPS || HAS_Z_MICROSTEPS || HAS_E0_MICROSTEPS || HAS_E1_MICROSTEPS || HAS_E2_MICROSTEPS || HAS_E3_MICROSTEPS || HAS_E4_MICROSTEPS)
621
-  #define HAS_STEPPER_RESET (PIN_EXISTS(STEPPER_RESET))
622
-  #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
623
-  #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E))
624
-
625
-  /**
626
-   * This setting is also used by M109 when trying to calculate
627
-   * a ballpark safe margin to prevent wait-forever situation.
628
-   */
629
-  #ifndef EXTRUDE_MINTEMP
630
-    #define EXTRUDE_MINTEMP 170
631
-  #endif
632
-
633
-  /**
634
-   * Helper Macros for heaters and extruder fan
635
-   */
636
-  #define WRITE_HEATER_0P(v) WRITE(HEATER_0_PIN, v)
637
-  #if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
638
-    #define WRITE_HEATER_1(v) WRITE(HEATER_1_PIN, v)
639
-    #if HOTENDS > 2
640
-      #define WRITE_HEATER_2(v) WRITE(HEATER_2_PIN, v)
641
-      #if HOTENDS > 3
642
-        #define WRITE_HEATER_3(v) WRITE(HEATER_3_PIN, v)
643
-        #if HOTENDS > 4
644
-          #define WRITE_HEATER_4(v) WRITE(HEATER_4_PIN, v)
645
-        #endif // HOTENDS > 4
646
-      #endif // HOTENDS > 3
647
-    #endif // HOTENDS > 2
648
-  #endif // HOTENDS > 1
649
-  #if ENABLED(HEATERS_PARALLEL)
650
-    #define WRITE_HEATER_0(v) { WRITE_HEATER_0P(v); WRITE_HEATER_1(v); }
651
-  #else
652
-    #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v)
653
-  #endif
654
-
655
-  /**
656
-   * Heated bed requires settings
657
-   */
658
-  #if HAS_HEATER_BED
659
-    #ifndef MAX_BED_POWER
660
-      #define MAX_BED_POWER 255
661
-    #endif
662
-    #ifndef HEATER_BED_INVERTING
663
-      #define HEATER_BED_INVERTING false
664
-    #endif
665
-    #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN, (v) ^ HEATER_BED_INVERTING)
666
-  #endif
667
-
668
-  /**
669
-   * Up to 3 PWM fans
670
-   */
671
-  #if HAS_FAN2
672
-    #define FAN_COUNT 3
673
-  #elif HAS_FAN1
674
-    #define FAN_COUNT 2
675
-  #elif HAS_FAN0
676
-    #define FAN_COUNT 1
677
-  #else
678
-    #define FAN_COUNT 0
679
-  #endif
680
-
681
-  #if HAS_FAN0
682
-    #define WRITE_FAN(v) WRITE(FAN_PIN, v)
683
-    #define WRITE_FAN0(v) WRITE_FAN(v)
684
-  #endif
685
-  #if HAS_FAN1
686
-    #define WRITE_FAN1(v) WRITE(FAN1_PIN, v)
687
-  #endif
688
-  #if HAS_FAN2
689
-    #define WRITE_FAN2(v) WRITE(FAN2_PIN, v)
690
-  #endif
691
-  #define WRITE_FAN_N(n, v) WRITE_FAN##n(v)
692
-
693
-  /**
694
-   * Part Cooling fan multipliexer
695
-   */
696
-  #define HAS_FANMUX PIN_EXISTS(FANMUX0)
697
-
698
-  /**
699
-   * Servos and probes
700
-   */
701
-
702
-  #if HAS_SERVOS
703
-    #ifndef Z_ENDSTOP_SERVO_NR
704
-      #define Z_ENDSTOP_SERVO_NR -1
705
-    #endif
706
-  #endif
707
-
708
-  #define PROBE_PIN_CONFIGURED (HAS_Z_MIN_PROBE_PIN || (HAS_Z_MIN && ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)))
709
-  #define HAS_BED_PROBE (PROBE_SELECTED && PROBE_PIN_CONFIGURED && DISABLED(PROBE_MANUALLY))
710
-
711
-  #if ENABLED(Z_PROBE_ALLEN_KEY)
712
-    #define PROBE_IS_TRIGGERED_WHEN_STOWED_TEST
713
-  #endif
714
-
715
-  /**
716
-   * Bed Probe dependencies
717
-   */
718
-  #if HAS_BED_PROBE
719
-    #if ENABLED(ENDSTOPPULLUPS) && HAS_Z_MIN_PROBE_PIN
720
-      #define ENDSTOPPULLUP_ZMIN_PROBE
721
-    #endif
722
-    #ifndef Z_PROBE_OFFSET_RANGE_MIN
723
-      #define Z_PROBE_OFFSET_RANGE_MIN -20
724
-    #endif
725
-    #ifndef Z_PROBE_OFFSET_RANGE_MAX
726
-      #define Z_PROBE_OFFSET_RANGE_MAX 20
727
-    #endif
728
-    #ifndef XY_PROBE_SPEED
729
-      #ifdef HOMING_FEEDRATE_XY
730
-        #define XY_PROBE_SPEED HOMING_FEEDRATE_XY
731
-      #else
732
-        #define XY_PROBE_SPEED 4000
733
-      #endif
734
-    #endif
735
-    #if Z_CLEARANCE_BETWEEN_PROBES > Z_CLEARANCE_DEPLOY_PROBE
736
-      #define _Z_CLEARANCE_DEPLOY_PROBE Z_CLEARANCE_BETWEEN_PROBES
737
-    #else
738
-      #define _Z_CLEARANCE_DEPLOY_PROBE Z_CLEARANCE_DEPLOY_PROBE
739
-    #endif
740
-  #else
741
-    #undef X_PROBE_OFFSET_FROM_EXTRUDER
742
-    #undef Y_PROBE_OFFSET_FROM_EXTRUDER
743
-    #undef Z_PROBE_OFFSET_FROM_EXTRUDER
744
-    #define X_PROBE_OFFSET_FROM_EXTRUDER 0
745
-    #define Y_PROBE_OFFSET_FROM_EXTRUDER 0
746
-    #define Z_PROBE_OFFSET_FROM_EXTRUDER 0
747
-  #endif
748
-
749
-  /**
750
-   * Heater & Fan Pausing
751
-   */
752
-  #if FAN_COUNT == 0
753
-    #undef PROBING_FANS_OFF
754
-  #endif
755
-  #define QUIET_PROBING (HAS_BED_PROBE && (ENABLED(PROBING_HEATERS_OFF) || ENABLED(PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0))
756
-  #define HEATER_IDLE_HANDLER (ENABLED(ADVANCED_PAUSE_FEATURE) || ENABLED(PROBING_HEATERS_OFF))
757
-
758
-  /**
759
-   * Delta radius/rod trimmers/angle trimmers
760
-   */
761
-  #if ENABLED(DELTA)
762
-    #ifndef DELTA_CALIBRATION_RADIUS
763
-      #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - 10
764
-    #endif
765
-    #ifndef DELTA_ENDSTOP_ADJ
766
-      #define DELTA_ENDSTOP_ADJ { 0, 0, 0 }
767
-    #endif
768
-    #ifndef DELTA_TOWER_ANGLE_TRIM
769
-      #define DELTA_TOWER_ANGLE_TRIM {0, 0, 0}
770
-    #endif
771
-    #ifndef DELTA_RADIUS_TRIM_TOWER
772
-      #define DELTA_RADIUS_TRIM_TOWER {0, 0, 0}
773
-    #endif
774
-    #ifndef DELTA_DIAGONAL_ROD_TRIM_TOWER
775
-      #define DELTA_DIAGONAL_ROD_TRIM_TOWER {0, 0, 0}
776
-    #endif
777
-  #endif
778
-
779
-  /**
780
-   * Set granular options based on the specific type of leveling
781
-   */
782
-
783
-  #define UBL_DELTA  (ENABLED(AUTO_BED_LEVELING_UBL) && (ENABLED(DELTA) || ENABLED(UBL_GRANULAR_SEGMENTATION_FOR_CARTESIAN)))
784
-  #define ABL_PLANAR (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_3POINT))
785
-  #define ABL_GRID   (ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR))
786
-  #define HAS_ABL    (ABL_PLANAR || ABL_GRID || ENABLED(AUTO_BED_LEVELING_UBL))
787
-  #define HAS_LEVELING          (HAS_ABL || ENABLED(MESH_BED_LEVELING))
788
-  #define PLANNER_LEVELING      (ABL_PLANAR || ABL_GRID || ENABLED(MESH_BED_LEVELING) || UBL_DELTA)
789
-  #define HAS_PROBING_PROCEDURE (HAS_ABL || ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST))
790
-  #if HAS_PROBING_PROCEDURE
791
-    #define PROBE_BED_WIDTH abs(RIGHT_PROBE_BED_POSITION - (LEFT_PROBE_BED_POSITION))
792
-    #define PROBE_BED_HEIGHT abs(BACK_PROBE_BED_POSITION - (FRONT_PROBE_BED_POSITION))
793
-  #endif
794
-
795
-  /**
796
-   * Buzzer/Speaker
797
-   */
798
-  #if ENABLED(LCD_USE_I2C_BUZZER)
799
-    #ifndef LCD_FEEDBACK_FREQUENCY_HZ
800
-      #define LCD_FEEDBACK_FREQUENCY_HZ 1000
801
-    #endif
802
-    #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
803
-      #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
804
-    #endif
805
-  #else
806
-    #ifndef LCD_FEEDBACK_FREQUENCY_HZ
807
-      #define LCD_FEEDBACK_FREQUENCY_HZ 5000
808
-    #endif
809
-    #ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
810
-      #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
811
-    #endif
812
-  #endif
813
-
814
-  /**
815
-   * Z_HOMING_HEIGHT / Z_CLEARANCE_BETWEEN_PROBES
816
-   */
817
-  #ifndef Z_HOMING_HEIGHT
818
-    #ifndef Z_CLEARANCE_BETWEEN_PROBES
819
-      #define Z_HOMING_HEIGHT 0
820
-    #else
821
-      #define Z_HOMING_HEIGHT Z_CLEARANCE_BETWEEN_PROBES
822
-    #endif
823
-  #endif
824
-  #ifndef Z_CLEARANCE_BETWEEN_PROBES
825
-    #define Z_CLEARANCE_BETWEEN_PROBES Z_HOMING_HEIGHT
826
-  #endif
827
-  #if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT
828
-    #define MANUAL_PROBE_HEIGHT Z_CLEARANCE_BETWEEN_PROBES
829
-  #else
830
-    #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT
831
-  #endif
832
-
833
-  /**
834
-   * Bed Probing rectangular bounds
835
-   * These can be further constrained in code for Delta and SCARA
836
-   */
837
-  #if ENABLED(DELTA)
838
-    #ifndef DELTA_PROBEABLE_RADIUS
839
-      #define DELTA_PROBEABLE_RADIUS DELTA_PRINTABLE_RADIUS
840
-    #endif
841
-    // Probing points may be verified at compile time within the radius
842
-    // using static_assert(HYPOT2(X2-X1,Y2-Y1)<=sq(DELTA_PRINTABLE_RADIUS),"bad probe point!")
843
-    // so that may be added to SanityCheck.h in the future.
844
-    #define MIN_PROBE_X (X_CENTER - (DELTA_PROBEABLE_RADIUS))
845
-    #define MIN_PROBE_Y (Y_CENTER - (DELTA_PROBEABLE_RADIUS))
846
-    #define MAX_PROBE_X (X_CENTER +  DELTA_PROBEABLE_RADIUS)
847
-    #define MAX_PROBE_Y (Y_CENTER +  DELTA_PROBEABLE_RADIUS)
848
-  #elif IS_SCARA
849
-    #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2)
850
-    #define MIN_PROBE_X (X_CENTER - (SCARA_PRINTABLE_RADIUS))
851
-    #define MIN_PROBE_Y (Y_CENTER - (SCARA_PRINTABLE_RADIUS))
852
-    #define MAX_PROBE_X (X_CENTER +  SCARA_PRINTABLE_RADIUS)
853
-    #define MAX_PROBE_Y (Y_CENTER +  SCARA_PRINTABLE_RADIUS)
854
-  #else
855
-    // Boundaries for Cartesian probing based on set limits
856
-    #if ENABLED(BED_CENTER_AT_0_0)
857
-      #define MIN_PROBE_X (max(X_PROBE_OFFSET_FROM_EXTRUDER, 0) - (X_BED_SIZE) / 2)
858
-      #define MIN_PROBE_Y (max(Y_PROBE_OFFSET_FROM_EXTRUDER, 0) - (Y_BED_SIZE) / 2)
859
-      #define MAX_PROBE_X (min(X_BED_SIZE + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE) - (X_BED_SIZE) / 2)
860
-      #define MAX_PROBE_Y (min(Y_BED_SIZE + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE) - (Y_BED_SIZE) / 2)
861
-    #else
862
-      #define MIN_PROBE_X (max(X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER, 0))
863
-      #define MIN_PROBE_Y (max(Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, 0))
864
-      #define MAX_PROBE_X (min(X_MAX_POS + X_PROBE_OFFSET_FROM_EXTRUDER, X_BED_SIZE))
865
-      #define MAX_PROBE_Y (min(Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER, Y_BED_SIZE))
866
-    #endif
867
-  #endif
868
-
869
-  // Stepper pulse duration, in cycles
870
-  #define STEP_PULSE_CYCLES ((MINIMUM_STEPPER_PULSE) * CYCLES_PER_MICROSECOND)
871
-
872
-  #if ENABLED(SDCARD_SORT_ALPHA)
873
-    #define HAS_FOLDER_SORTING (FOLDER_SORTING || ENABLED(SDSORT_GCODE))
874
-  #endif
875
-
876
-  // Updated G92 behavior shifts the workspace
877
-  #define HAS_POSITION_SHIFT DISABLED(NO_WORKSPACE_OFFSETS)
878
-  // The home offset also shifts the coordinate space
879
-  #define HAS_HOME_OFFSET (DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DELTA))
880
-  // Either offset yields extra calculations on all moves
881
-  #define HAS_WORKSPACE_OFFSET (HAS_POSITION_SHIFT || HAS_HOME_OFFSET)
882
-  // M206 doesn't apply to DELTA
883
-  #define HAS_M206_COMMAND (HAS_HOME_OFFSET && DISABLED(DELTA))
884
-
885
-  // LCD timeout to status screen default is 15s
886
-  #ifndef LCD_TIMEOUT_TO_STATUS
887
-    #define LCD_TIMEOUT_TO_STATUS 15000
888
-  #endif
889
-
890
-  /**
891
-   * DELTA_SEGMENT_MIN_LENGTH for UBL_DELTA
892
-   */
893
-  #if UBL_DELTA
894
-    #ifndef DELTA_SEGMENT_MIN_LENGTH
895
-      #if IS_SCARA
896
-        #define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm
897
-      #elif ENABLED(DELTA)
898
-        #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND)
899
-      #else // CARTESIAN
900
-        #define DELTA_SEGMENT_MIN_LENGTH 1.00 // mm (similar to G2/G3 arc segmentation)
901
-      #endif
902
-    #endif
903
-  #endif
904
-
905
-  // Shorthand
906
-  #define GRID_MAX_POINTS ((GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y))
907
-
908
-  // Add commands that need sub-codes to this list
909
-  #define USE_GCODE_SUBCODES ENABLED(G38_PROBE_TARGET)
910
-
911
-  // MESH_BED_LEVELING overrides PROBE_MANUALLY
912
-  #if ENABLED(MESH_BED_LEVELING)
913
-    #undef PROBE_MANUALLY
914
-  #endif
915
-
916
-  // Parking Extruder
917
-  #if ENABLED(PARKING_EXTRUDER)
918
-    #ifndef PARKING_EXTRUDER_GRAB_DISTANCE
919
-      #define PARKING_EXTRUDER_GRAB_DISTANCE 0
920
-    #endif
921
-    #ifndef PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE
922
-      #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE HIGH
923
-    #endif
924
-  #endif
925
-
926
-#endif // CONDITIONALS_POST_H

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


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


+ 0
- 887
Marlin/G26_Mesh_Validation_Tool.cpp View File

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

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


+ 0
- 359
Marlin/I2CPositionEncoder.h View File

@@ -1,359 +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
-    float     axisOffset          = 0;
131
-
132
-    int32_t   axisOffsetTicks     = 0,
133
-              zeroOffset          = 0,
134
-              lastPosition        = 0,
135
-              position;
136
-
137
-    millis_t  lastPositionTime    = 0,
138
-              nextErrorCountTime  = 0,
139
-              lastErrorTime;
140
-
141
-    //double        positionMm; //calculate
142
-
143
-    #if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
144
-      uint8_t errIdx = 0;
145
-      int     err[I2CPE_ERR_ARRAY_SIZE] = { 0 };
146
-    #endif
147
-
148
-    //float        positionMm; //calculate
149
-
150
-  public:
151
-    void init(const uint8_t address, const AxisEnum axis);
152
-    void reset();
153
-
154
-    void update();
155
-
156
-    void set_homed();
157
-
158
-    int32_t get_raw_count();
159
-
160
-    FORCE_INLINE float mm_from_count(const int32_t count) {
161
-      switch (type) {
162
-        default: return -1;
163
-        case I2CPE_ENC_TYPE_LINEAR:
164
-          return count / encoderTicksPerUnit;
165
-        case I2CPE_ENC_TYPE_ROTARY:
166
-          return (count * stepperTicks) / (encoderTicksPerUnit * planner.axis_steps_per_mm[encoderAxis]);
167
-      }
168
-    }
169
-
170
-    FORCE_INLINE float get_position_mm() { return mm_from_count(get_position()); }
171
-    FORCE_INLINE int32_t get_position() { return get_raw_count() - zeroOffset - axisOffsetTicks; }
172
-
173
-    int32_t get_axis_error_steps(const bool report);
174
-    float get_axis_error_mm(const bool report);
175
-
176
-    void calibrate_steps_mm(const uint8_t iter);
177
-
178
-    bool passes_test(const bool report);
179
-
180
-    bool test_axis(void);
181
-
182
-    FORCE_INLINE int get_error_count(void) { return errorCount; }
183
-    FORCE_INLINE void set_error_count(const int newCount) { errorCount = newCount; }
184
-
185
-    FORCE_INLINE uint8_t get_address() { return i2cAddress; }
186
-    FORCE_INLINE void set_address(const uint8_t addr) { i2cAddress = addr; }
187
-
188
-    FORCE_INLINE bool get_active(void) { return active; }
189
-    FORCE_INLINE void set_active(const bool a) { active = a; }
190
-
191
-    FORCE_INLINE void set_inverted(const bool i) { invert = i; }
192
-
193
-    FORCE_INLINE AxisEnum get_axis() { return encoderAxis; }
194
-
195
-    FORCE_INLINE bool get_ec_enabled() { return ec; }
196
-    FORCE_INLINE void set_ec_enabled(const bool enabled) { ec = enabled; }
197
-
198
-    FORCE_INLINE uint8_t get_ec_method() { return ecMethod; }
199
-    FORCE_INLINE void set_ec_method(const byte method) { ecMethod = method; }
200
-
201
-    FORCE_INLINE float get_ec_threshold() { return ecThreshold; }
202
-    FORCE_INLINE void set_ec_threshold(const float newThreshold) { ecThreshold = newThreshold; }
203
-
204
-    FORCE_INLINE int get_encoder_ticks_mm() {
205
-      switch (type) {
206
-        default: return 0;
207
-        case I2CPE_ENC_TYPE_LINEAR:
208
-          return encoderTicksPerUnit;
209
-        case I2CPE_ENC_TYPE_ROTARY:
210
-          return (int)((encoderTicksPerUnit / stepperTicks) * planner.axis_steps_per_mm[encoderAxis]);
211
-      }
212
-    }
213
-
214
-    FORCE_INLINE int get_ticks_unit() { return encoderTicksPerUnit; }
215
-    FORCE_INLINE void set_ticks_unit(const int ticks) { encoderTicksPerUnit = ticks; }
216
-
217
-    FORCE_INLINE uint8_t get_type() { return type; }
218
-    FORCE_INLINE void set_type(const byte newType) { type = newType; }
219
-
220
-    FORCE_INLINE int get_stepper_ticks() { return stepperTicks; }
221
-    FORCE_INLINE void set_stepper_ticks(const int ticks) { stepperTicks = ticks; }
222
-
223
-    FORCE_INLINE float get_axis_offset() { return axisOffset; }
224
-    FORCE_INLINE void set_axis_offset(const float newOffset) {
225
-      axisOffset = newOffset;
226
-      axisOffsetTicks = int32_t(axisOffset * get_encoder_ticks_mm());
227
-    }
228
-
229
-    FORCE_INLINE void set_current_position(const float newPositionMm) {
230
-      set_axis_offset(get_position_mm() - newPositionMm + axisOffset);
231
-    }
232
-  };
233
-
234
-  class I2CPositionEncodersMgr {
235
-  private:
236
-    static bool I2CPE_anyaxis;
237
-    static uint8_t I2CPE_addr, I2CPE_idx;
238
-
239
-  public:
240
-
241
-    static void init(void);
242
-
243
-    // consider only updating one endoder per call / tick if encoders become too time intensive
244
-    static void update(void) { LOOP_PE(i) encoders[i].update(); }
245
-
246
-    static void homed(const AxisEnum axis) {
247
-      LOOP_PE(i)
248
-        if (encoders[i].get_axis() == axis) encoders[i].set_homed();
249
-    }
250
-
251
-    static void report_position(const int8_t idx, const bool units, const bool noOffset);
252
-
253
-    static void report_status(const int8_t idx) {
254
-      CHECK_IDX();
255
-      SERIAL_ECHOPAIR("Encoder ",idx);
256
-      SERIAL_ECHOPGM(": ");
257
-      encoders[idx].get_raw_count();
258
-      encoders[idx].passes_test(true);
259
-    }
260
-
261
-    static void report_error(const int8_t idx) {
262
-      CHECK_IDX();
263
-      encoders[idx].get_axis_error_steps(true);
264
-    }
265
-
266
-    static void test_axis(const int8_t idx) {
267
-      CHECK_IDX();
268
-      encoders[idx].test_axis();
269
-    }
270
-
271
-    static void calibrate_steps_mm(const int8_t idx, const int iterations) {
272
-      CHECK_IDX();
273
-      encoders[idx].calibrate_steps_mm(iterations);
274
-    }
275
-
276
-    static void change_module_address(const uint8_t oldaddr, const uint8_t newaddr);
277
-    static void report_module_firmware(const uint8_t address);
278
-
279
-    static void report_error_count(const int8_t idx, const AxisEnum axis) {
280
-      CHECK_IDX();
281
-      SERIAL_ECHOPAIR("Error count on ", axis_codes[axis]);
282
-      SERIAL_ECHOLNPAIR(" axis is ", encoders[idx].get_error_count());
283
-    }
284
-
285
-    static void reset_error_count(const int8_t idx, const AxisEnum axis) {
286
-      CHECK_IDX();
287
-      encoders[idx].set_error_count(0);
288
-      SERIAL_ECHOPAIR("Error count on ", axis_codes[axis]);
289
-      SERIAL_ECHOLNPGM(" axis has been reset.");
290
-    }
291
-
292
-    static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) {
293
-      CHECK_IDX();
294
-      encoders[idx].set_ec_enabled(enabled);
295
-      SERIAL_ECHOPAIR("Error correction on ", axis_codes[axis]);
296
-      SERIAL_ECHOPGM(" axis is ");
297
-      serialprintPGM(encoders[idx].get_ec_enabled() ? PSTR("en") : PSTR("dis"));
298
-      SERIAL_ECHOLNPGM("abled.");
299
-    }
300
-
301
-    static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {
302
-      CHECK_IDX();
303
-      encoders[idx].set_ec_threshold(newThreshold);
304
-      SERIAL_ECHOPAIR("Error correct threshold for ", axis_codes[axis]);
305
-      SERIAL_ECHOPAIR_F(" axis set to ", newThreshold);
306
-      SERIAL_ECHOLNPGM("mm.");
307
-    }
308
-
309
-    static void get_ec_threshold(const int8_t idx, const AxisEnum axis) {
310
-      CHECK_IDX();
311
-      const float threshold = encoders[idx].get_ec_threshold();
312
-      SERIAL_ECHOPAIR("Error correct threshold for ", axis_codes[axis]);
313
-      SERIAL_ECHOPAIR_F(" axis is ", threshold);
314
-      SERIAL_ECHOLNPGM("mm.");
315
-    }
316
-
317
-    static int8_t idx_from_axis(const AxisEnum axis) {
318
-      LOOP_PE(i)
319
-        if (encoders[i].get_axis() == axis) return i;
320
-      return -1;
321
-    }
322
-
323
-    static int8_t idx_from_addr(const uint8_t addr) {
324
-      LOOP_PE(i)
325
-        if (encoders[i].get_address() == addr) return i;
326
-      return -1;
327
-    }
328
-
329
-    static int8_t parse();
330
-
331
-    static void M860();
332
-    static void M861();
333
-    static void M862();
334
-    static void M863();
335
-    static void M864();
336
-    static void M865();
337
-    static void M866();
338
-    static void M867();
339
-    static void M868();
340
-    static void M869();
341
-
342
-    static I2CPositionEncoder encoders[I2CPE_ENCODER_CNT];
343
-  };
344
-
345
-  extern I2CPositionEncodersMgr I2CPEM;
346
-
347
-  FORCE_INLINE static void gcode_M860() { I2CPEM.M860(); }
348
-  FORCE_INLINE static void gcode_M861() { I2CPEM.M861(); }
349
-  FORCE_INLINE static void gcode_M862() { I2CPEM.M862(); }
350
-  FORCE_INLINE static void gcode_M863() { I2CPEM.M863(); }
351
-  FORCE_INLINE static void gcode_M864() { I2CPEM.M864(); }
352
-  FORCE_INLINE static void gcode_M865() { I2CPEM.M865(); }
353
-  FORCE_INLINE static void gcode_M866() { I2CPEM.M866(); }
354
-  FORCE_INLINE static void gcode_M867() { I2CPEM.M867(); }
355
-  FORCE_INLINE static void gcode_M868() { I2CPEM.M868(); }
356
-  FORCE_INLINE static void gcode_M869() { I2CPEM.M869(); }
357
-
358
-#endif //I2C_POSITION_ENCODERS
359
-#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
- 497
Marlin/Marlin.h View File

@@ -1,497 +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 int16_t feedrate_percentage;
214
-
215
-#define MMM_TO_MMS(MM_M) ((MM_M)/60.0)
216
-#define MMS_TO_MMM(MM_S) ((MM_S)*60.0)
217
-#define MMS_SCALED(MM_S) ((MM_S)*feedrate_percentage*0.01)
218
-
219
-extern bool axis_relative_modes[];
220
-extern bool volumetric_enabled;
221
-extern int16_t flow_percentage[EXTRUDERS]; // Extrusion factor for each extruder
222
-extern float filament_size[EXTRUDERS]; // cross-sectional area of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder.
223
-extern float volumetric_multiplier[EXTRUDERS]; // reciprocal of cross-sectional area of filament (in square millimeters), stored this way to reduce computational burden in planner
224
-extern bool axis_known_position[XYZ];
225
-extern bool axis_homed[XYZ];
226
-extern volatile bool wait_for_heatup;
227
-
228
-#if HAS_RESUME_CONTINUE
229
-  extern volatile bool wait_for_user;
230
-#endif
231
-
232
-extern float current_position[NUM_AXIS];
233
-
234
-// Workspace offsets
235
-#if HAS_WORKSPACE_OFFSET
236
-  #if HAS_HOME_OFFSET
237
-    extern float home_offset[XYZ];
238
-  #endif
239
-  #if HAS_POSITION_SHIFT
240
-    extern float position_shift[XYZ];
241
-  #endif
242
-#endif
243
-
244
-#if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
245
-  extern float workspace_offset[XYZ];
246
-  #define WORKSPACE_OFFSET(AXIS) workspace_offset[AXIS]
247
-#elif HAS_HOME_OFFSET
248
-  #define WORKSPACE_OFFSET(AXIS) home_offset[AXIS]
249
-#elif HAS_POSITION_SHIFT
250
-  #define WORKSPACE_OFFSET(AXIS) position_shift[AXIS]
251
-#else
252
-  #define WORKSPACE_OFFSET(AXIS) 0
253
-#endif
254
-
255
-#define LOGICAL_POSITION(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
256
-#define RAW_POSITION(POS, AXIS)     ((POS) - WORKSPACE_OFFSET(AXIS))
257
-
258
-#if HAS_POSITION_SHIFT || DISABLED(DELTA)
259
-  #define LOGICAL_X_POSITION(POS)   LOGICAL_POSITION(POS, X_AXIS)
260
-  #define LOGICAL_Y_POSITION(POS)   LOGICAL_POSITION(POS, Y_AXIS)
261
-  #define RAW_X_POSITION(POS)       RAW_POSITION(POS, X_AXIS)
262
-  #define RAW_Y_POSITION(POS)       RAW_POSITION(POS, Y_AXIS)
263
-#else
264
-  #define LOGICAL_X_POSITION(POS)   (POS)
265
-  #define LOGICAL_Y_POSITION(POS)   (POS)
266
-  #define RAW_X_POSITION(POS)       (POS)
267
-  #define RAW_Y_POSITION(POS)       (POS)
268
-#endif
269
-
270
-#define LOGICAL_Z_POSITION(POS)     LOGICAL_POSITION(POS, Z_AXIS)
271
-#define RAW_Z_POSITION(POS)         RAW_POSITION(POS, Z_AXIS)
272
-#define RAW_CURRENT_POSITION(A)     RAW_##A##_POSITION(current_position[A##_AXIS])
273
-
274
-// Hotend Offsets
275
-#if HOTENDS > 1
276
-  extern float hotend_offset[XYZ][HOTENDS];
277
-#endif
278
-
279
-// Software Endstops
280
-extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
281
-
282
-#if HAS_SOFTWARE_ENDSTOPS
283
-  extern bool soft_endstops_enabled;
284
-  void clamp_to_software_endstops(float target[XYZ]);
285
-#else
286
-  #define soft_endstops_enabled false
287
-  #define clamp_to_software_endstops(x) NOOP
288
-#endif
289
-
290
-#if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
291
-  void update_software_endstops(const AxisEnum axis);
292
-#endif
293
-
294
-#if IS_KINEMATIC
295
-  extern float delta[ABC];
296
-  void inverse_kinematics(const float logical[XYZ]);
297
-#endif
298
-
299
-#if ENABLED(DELTA)
300
-  extern float endstop_adj[ABC],
301
-               delta_radius,
302
-               delta_diagonal_rod,
303
-               delta_calibration_radius,
304
-               delta_segments_per_second,
305
-               delta_tower_angle_trim[ABC],
306
-               delta_clip_start_height;
307
-  void recalc_delta_settings(float radius, float diagonal_rod, float tower_angle_trim[ABC]);
308
-#elif IS_SCARA
309
-  void forward_kinematics_SCARA(const float &a, const float &b);
310
-#endif
311
-
312
-#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
313
-  extern int bilinear_grid_spacing[2], bilinear_start[2];
314
-  extern float bilinear_grid_factor[2],
315
-               z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y];
316
-  float bilinear_z_offset(const float logical[XYZ]);
317
-#endif
318
-
319
-#if ENABLED(AUTO_BED_LEVELING_UBL)
320
-  typedef struct { double A, B, D; } linear_fit;
321
-  linear_fit* lsf_linear_fit(double x[], double y[], double z[], const int);
322
-#endif
323
-
324
-#if HAS_LEVELING
325
-  bool leveling_is_valid();
326
-  bool leveling_is_active();
327
-  void set_bed_leveling_enabled(const bool enable=true);
328
-  void reset_bed_level();
329
-#endif
330
-
331
-#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
332
-  void set_z_fade_height(const float zfh);
333
-#endif
334
-
335
-#if ENABLED(Z_DUAL_ENDSTOPS)
336
-  extern float z_endstop_adj;
337
-#endif
338
-
339
-#if HAS_BED_PROBE
340
-  extern float zprobe_zoffset;
341
-  void refresh_zprobe_zoffset(const bool no_babystep=false);
342
-  #define DEPLOY_PROBE() set_probe_deployed(true)
343
-  #define STOW_PROBE() set_probe_deployed(false)
344
-#else
345
-  #define DEPLOY_PROBE()
346
-  #define STOW_PROBE()
347
-#endif
348
-
349
-#if ENABLED(HOST_KEEPALIVE_FEATURE)
350
-  extern MarlinBusyState busy_state;
351
-  #define KEEPALIVE_STATE(n) do{ busy_state = n; }while(0)
352
-#else
353
-  #define KEEPALIVE_STATE(n) NOOP
354
-#endif
355
-
356
-#if FAN_COUNT > 0
357
-  extern int16_t fanSpeeds[FAN_COUNT];
358
-  #if ENABLED(PROBING_FANS_OFF)
359
-    extern bool fans_paused;
360
-    extern int16_t paused_fanSpeeds[FAN_COUNT];
361
-  #endif
362
-#endif
363
-
364
-#if ENABLED(BARICUDA)
365
-  extern uint8_t baricuda_valve_pressure, baricuda_e_to_p_pressure;
366
-#endif
367
-
368
-#if ENABLED(FILAMENT_WIDTH_SENSOR)
369
-  extern bool filament_sensor;         // Flag that filament sensor readings should control extrusion
370
-  extern float filament_width_nominal, // Theoretical filament diameter i.e., 3.00 or 1.75
371
-               filament_width_meas;    // Measured filament diameter
372
-  extern uint8_t meas_delay_cm,        // Delay distance
373
-                 measurement_delay[];  // Ring buffer to delay measurement
374
-  extern int8_t filwidth_delay_index[2]; // Ring buffer indexes. Used by planner, temperature, and main code
375
-#endif
376
-
377
-#if ENABLED(ADVANCED_PAUSE_FEATURE)
378
-  extern AdvancedPauseMenuResponse advanced_pause_menu_response;
379
-#endif
380
-
381
-#if ENABLED(PID_EXTRUSION_SCALING)
382
-  extern int lpq_len;
383
-#endif
384
-
385
-#if ENABLED(FWRETRACT)
386
-  extern bool autoretract_enabled;                 // M209 S - Autoretract switch
387
-  extern float retract_length,                     // M207 S - G10 Retract length
388
-               retract_feedrate_mm_s,              // M207 F - G10 Retract feedrate
389
-               retract_zlift,                      // M207 Z - G10 Retract hop size
390
-               retract_recover_length,             // M208 S - G11 Recover length
391
-               retract_recover_feedrate_mm_s,      // M208 F - G11 Recover feedrate
392
-               swap_retract_length,                // M207 W - G10 Swap Retract length
393
-               swap_retract_recover_length,        // M208 W - G11 Swap Recover length
394
-               swap_retract_recover_feedrate_mm_s; // M208 R - G11 Swap Recover feedrate
395
-#endif
396
-
397
-// Print job timer
398
-#if ENABLED(PRINTCOUNTER)
399
-  extern PrintCounter print_job_timer;
400
-#else
401
-  extern Stopwatch print_job_timer;
402
-#endif
403
-
404
-// Handling multiple extruders pins
405
-extern uint8_t active_extruder;
406
-
407
-#if HAS_TEMP_HOTEND || HAS_TEMP_BED
408
-  void print_heaterstates();
409
-#endif
410
-
411
-#if ENABLED(MIXING_EXTRUDER)
412
-  extern float mixing_factor[MIXING_STEPPERS];
413
-#endif
414
-
415
-void calculate_volumetric_multipliers();
416
-
417
-/**
418
- * Blocking movement and shorthand functions
419
- */
420
-void do_blocking_move_to(const float &x, const float &y, const float &z, const float &fr_mm_s=0.0);
421
-void do_blocking_move_to_x(const float &x, const float &fr_mm_s=0.0);
422
-void do_blocking_move_to_z(const float &z, const float &fr_mm_s=0.0);
423
-void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0);
424
-
425
-#define HAS_AXIS_UNHOMED_ERR (                                                     \
426
-         ENABLED(Z_PROBE_ALLEN_KEY)                                                \
427
-      || ENABLED(Z_PROBE_SLED)                                                     \
428
-      || HAS_PROBING_PROCEDURE                                                     \
429
-      || HOTENDS > 1                                                               \
430
-      || ENABLED(NOZZLE_CLEAN_FEATURE)                                             \
431
-      || ENABLED(NOZZLE_PARK_FEATURE)                                              \
432
-      || (ENABLED(ADVANCED_PAUSE_FEATURE) && ENABLED(HOME_BEFORE_FILAMENT_CHANGE)) \
433
-    ) || ENABLED(NO_MOTION_BEFORE_HOMING)
434
-
435
-#if HAS_AXIS_UNHOMED_ERR
436
-  bool axis_unhomed_error(const bool x=true, const bool y=true, const bool z=true);
437
-#endif
438
-
439
-/**
440
- * position_is_reachable family of functions
441
- */
442
-
443
-#if IS_KINEMATIC // (DELTA or SCARA)
444
-
445
-  #if IS_SCARA
446
-    extern const float L1, L2;
447
-  #endif
448
-
449
-  inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
450
-    #if ENABLED(DELTA)
451
-      return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS);
452
-    #elif IS_SCARA
453
-      #if MIDDLE_DEAD_ZONE_R > 0
454
-        const float R2 = HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y);
455
-        return R2 >= sq(float(MIDDLE_DEAD_ZONE_R)) && R2 <= sq(L1 + L2);
456
-      #else
457
-        return HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y) <= sq(L1 + L2);
458
-      #endif
459
-    #else // CARTESIAN
460
-      // To be migrated from MakerArm branch in future
461
-    #endif
462
-  }
463
-
464
-  inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
465
-
466
-    // Both the nozzle and the probe must be able to reach the point.
467
-    // This won't work on SCARA since the probe offset rotates with the arm.
468
-
469
-    return position_is_reachable_raw_xy(rx, ry)
470
-        && position_is_reachable_raw_xy(rx - X_PROBE_OFFSET_FROM_EXTRUDER, ry - Y_PROBE_OFFSET_FROM_EXTRUDER);
471
-  }
472
-
473
-#else // CARTESIAN
474
-
475
-  inline bool position_is_reachable_raw_xy(const float &rx, const float &ry) {
476
-      // Add 0.001 margin to deal with float imprecision
477
-      return WITHIN(rx, X_MIN_POS - 0.001, X_MAX_POS + 0.001)
478
-          && WITHIN(ry, Y_MIN_POS - 0.001, Y_MAX_POS + 0.001);
479
-  }
480
-
481
-  inline bool position_is_reachable_by_probe_raw_xy(const float &rx, const float &ry) {
482
-      // Add 0.001 margin to deal with float imprecision
483
-      return WITHIN(rx, MIN_PROBE_X - 0.001, MAX_PROBE_X + 0.001)
484
-          && WITHIN(ry, MIN_PROBE_Y - 0.001, MAX_PROBE_Y + 0.001);
485
-  }
486
-
487
-#endif // CARTESIAN
488
-
489
-FORCE_INLINE bool position_is_reachable_by_probe_xy(const float &lx, const float &ly) {
490
-  return position_is_reachable_by_probe_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
491
-}
492
-
493
-FORCE_INLINE bool position_is_reachable_xy(const float &lx, const float &ly) {
494
-  return position_is_reachable_raw_xy(RAW_X_POSITION(lx), RAW_Y_POSITION(ly));
495
-}
496
-
497
-#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
- 41
Marlin/MarlinConfig.h View File

@@ -1,41 +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 "Configuration_adv.h"
33
-#include "pins.h"
34
-#ifndef USBCON
35
-  #define HardwareSerial_h // trick to disable the standard HWserial
36
-#endif
37
-#include "Arduino.h"
38
-#include "Conditionals_post.h"
39
-#include "SanityCheck.h"
40
-
41
-#endif // MARLIN_CONFIG_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
- 180
Marlin/MarlinSerial.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
-  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
-#ifndef USBCON
79
-  // Define constants and variables for buffering incoming serial data.  We're
80
-  // using a ring buffer (I think), in which rx_buffer_head is the index of the
81
-  // location to which to write the next incoming character and rx_buffer_tail
82
-  // is the index of the location from which to read.
83
-  // 256 is the max limit due to uint8_t head and tail. Use only powers of 2. (...,16,32,64,128,256)
84
-  #ifndef RX_BUFFER_SIZE
85
-    #define RX_BUFFER_SIZE 128
86
-  #endif
87
-  #ifndef TX_BUFFER_SIZE
88
-    #define TX_BUFFER_SIZE 32
89
-  #endif
90
-
91
-  #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024
92
-    #error "XON/XOFF requires RX_BUFFER_SIZE >= 1024 for reliable transfers without drops."
93
-  #endif
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
-  #if TX_BUFFER_SIZE && (TX_BUFFER_SIZE < 2 || TX_BUFFER_SIZE > 256 || !IS_POWER_OF_2(TX_BUFFER_SIZE))
98
-    #error "TX_BUFFER_SIZE must be 0 or a power of 2 greater than 1."
99
-  #endif
100
-
101
-  #if RX_BUFFER_SIZE > 256
102
-    typedef uint16_t ring_buffer_pos_t;
103
-  #else
104
-    typedef uint8_t ring_buffer_pos_t;
105
-  #endif
106
-
107
-  #if ENABLED(SERIAL_STATS_DROPPED_RX)
108
-    extern uint8_t rx_dropped_bytes;
109
-  #endif
110
-
111
-  #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
112
-    extern ring_buffer_pos_t rx_max_enqueued;
113
-  #endif
114
-
115
-  class MarlinSerial { //: public Stream
116
-
117
-    public:
118
-      MarlinSerial() {};
119
-      static void begin(const long);
120
-      static void end();
121
-      static int peek(void);
122
-      static int read(void);
123
-      static void flush(void);
124
-      static ring_buffer_pos_t available(void);
125
-      static void checkRx(void);
126
-      static void write(const uint8_t c);
127
-      #if TX_BUFFER_SIZE > 0
128
-        static uint8_t availableForWrite(void);
129
-        static void flushTX(void);
130
-      #endif
131
-      static void writeNoHandshake(const uint8_t c);
132
-
133
-      #if ENABLED(SERIAL_STATS_DROPPED_RX)
134
-        FORCE_INLINE static uint32_t dropped() { return rx_dropped_bytes; }
135
-      #endif
136
-
137
-      #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED)
138
-        FORCE_INLINE static ring_buffer_pos_t rxMaxEnqueued() { return rx_max_enqueued; }
139
-      #endif
140
-
141
-    private:
142
-      static void printNumber(unsigned long, const uint8_t);
143
-      static void printFloat(double, uint8_t);
144
-
145
-    public:
146
-      static FORCE_INLINE void write(const char* str) { while (*str) write(*str++); }
147
-      static FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
148
-      static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
149
-      static FORCE_INLINE void print(const char* str) { write(str); }
150
-
151
-      static void print(char, int = BYTE);
152
-      static void print(unsigned char, int = BYTE);
153
-      static void print(int, int = DEC);
154
-      static void print(unsigned int, int = DEC);
155
-      static void print(long, int = DEC);
156
-      static void print(unsigned long, int = DEC);
157
-      static void print(double, int = 2);
158
-
159
-      static void println(const String& s);
160
-      static void println(const char[]);
161
-      static void println(char, int = BYTE);
162
-      static void println(unsigned char, int = BYTE);
163
-      static void println(int, int = DEC);
164
-      static void println(unsigned int, int = DEC);
165
-      static void println(long, int = DEC);
166
-      static void println(unsigned long, int = DEC);
167
-      static void println(double, int = 2);
168
-      static void println(void);
169
-  };
170
-
171
-  extern MarlinSerial customizedSerial;
172
-
173
-#endif // !USBCON
174
-
175
-// Use the UART for Bluetooth in AT90USB configurations
176
-#if defined(USBCON) && ENABLED(BLUETOOTH)
177
-  extern HardwareSerial bluetoothSerial;
178
-#endif
179
-
180
-#endif // MARLINSERIAL_H

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


+ 0
- 236
Marlin/Max7219_Debug_LEDs.cpp View File

@@ -1,236 +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 row, uint8_t col);
43
- * void Max7219_LED_Off(uint8_t row, uint8_t col);
44
- * void Max7219_LED_Toggle(uint8_t row, uint8_t col);
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_Column(uint8_t col, uint8_t val);
49
- * void Max7219_idle_tasks();
50
- */
51
-
52
-#include "MarlinConfig.h"
53
-
54
-#if ENABLED(MAX7219_DEBUG)
55
-
56
-  #include "Marlin.h"
57
-  #include "planner.h"
58
-  #include "stepper.h"
59
-  #include "Max7219_Debug_LEDs.h"
60
-
61
-  static uint8_t LEDs[8] = { 0 };
62
-
63
-  void Max7219_PutByte(uint8_t data) {
64
-    for (uint8_t i = 8; i--;) {
65
-      WRITE(MAX7219_CLK_PIN, LOW);       // tick
66
-      WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW);  // send 1 or 0 based on data bit
67
-      WRITE(MAX7219_CLK_PIN, HIGH);      // tock
68
-      data <<= 1;
69
-    }
70
-  }
71
-
72
-  void Max7219(const uint8_t reg, const uint8_t data) {
73
-    WRITE(MAX7219_LOAD_PIN, LOW);  // begin
74
-    Max7219_PutByte(reg);          // specify register
75
-    Max7219_PutByte(data);         // put data
76
-    WRITE(MAX7219_LOAD_PIN, LOW);  // and tell the chip to load the data
77
-    WRITE(MAX7219_LOAD_PIN, HIGH);
78
-  }
79
-
80
-  void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on) {
81
-    if (row > 7 || col > 7) return;
82
-    if (TEST(LEDs[row], col) == on) return; // if LED is already on/off, leave alone
83
-    if (on) SBI(LEDs[row], col); else CBI(LEDs[row], col);
84
-    Max7219(8 - row, LEDs[row]);
85
-  }
86
-
87
-  void Max7219_LED_On(const uint8_t row, const uint8_t col) {
88
-    Max7219_LED_Set(row, col, true);
89
-  }
90
-
91
-  void Max7219_LED_Off(const uint8_t row, const uint8_t col) {
92
-    Max7219_LED_Set(row, col, false);
93
-  }
94
-
95
-  void Max7219_LED_Toggle(const uint8_t row, const uint8_t col) {
96
-    if (row > 7 || col > 7) return;
97
-    if (TEST(LEDs[row], col))
98
-      Max7219_LED_Off(row, col);
99
-    else
100
-      Max7219_LED_On(row, col);
101
-  }
102
-
103
-  void Max7219_Clear_Column(const uint8_t col) {
104
-    if (col > 7) return;
105
-    LEDs[col] = 0;
106
-    Max7219(8 - col, LEDs[col]);
107
-  }
108
-
109
-  void Max7219_Clear_Row(const uint8_t row) {
110
-    if (row > 7) return;
111
-    for (uint8_t c = 0; c <= 7; c++)
112
-      Max7219_LED_Off(c, row);
113
-  }
114
-
115
-  void Max7219_Set_Row(const uint8_t row, const uint8_t val) {
116
-    if (row > 7) return;
117
-    for (uint8_t b = 0; b <= 7; b++)
118
-      if (TEST(val, b))
119
-        Max7219_LED_On(7 - b, row);
120
-      else
121
-        Max7219_LED_Off(7 - b, row);
122
-  }
123
-
124
-  void Max7219_Set_Column(const uint8_t col, const uint8_t val) {
125
-    if (col > 7) return;
126
-    LEDs[col] = val;
127
-    Max7219(8 - col, LEDs[col]);
128
-  }
129
-
130
-  void Max7219_init() {
131
-    uint8_t i, x, y;
132
-
133
-    SET_OUTPUT(MAX7219_DIN_PIN);
134
-    SET_OUTPUT(MAX7219_CLK_PIN);
135
-
136
-    OUT_WRITE(MAX7219_LOAD_PIN, HIGH);
137
-
138
-    //initiation of the max 7219
139
-    Max7219(max7219_reg_scanLimit, 0x07);
140
-    Max7219(max7219_reg_decodeMode, 0x00);  // using an led matrix (not digits)
141
-    Max7219(max7219_reg_shutdown, 0x01);    // not in shutdown mode
142
-    Max7219(max7219_reg_displayTest, 0x00); // no display test
143
-    Max7219(max7219_reg_intensity, 0x01 & 0x0F); // the first 0x0F is the value you can set
144
-                                                 // range: 0x00 to 0x0F
145
-    for (i = 0; i <= 7; i++) {      // empty registers, turn all LEDs off
146
-      LEDs[i] = 0x00;
147
-      Max7219(i + 1, 0);
148
-    }
149
-
150
-    for (x = 0; x <= 7; x++)        // Do an aesthetically pleasing pattern to fully test
151
-      for (y = 0; y <= 7; y++) {    // the Max7219 module and LEDs. First, turn them
152
-        Max7219_LED_On(x, y);       // all on.
153
-        delay(3);
154
-      }
155
-
156
-    for (x = 0; x <= 7; x++)        // Now, turn them all off.
157
-      for (y = 0; y <= 7; y++) {
158
-        Max7219_LED_Off(x, y);
159
-        delay(3);                   // delay() is OK here. Max7219_init() is only called from
160
-      }                             // setup() and nothing is running yet.
161
-
162
-    delay(150);
163
-
164
-    for (x = 8; x--;)               // Now, do the same thing from the opposite direction
165
-      for (y = 0; y <= 7; y++) {
166
-        Max7219_LED_On(x, y);
167
-        delay(2);
168
-      }
169
-
170
-    for (x = 8; x--;)
171
-      for (y = 0; y <= 7; y++) {
172
-        Max7219_LED_Off(x, y);
173
-        delay(2);
174
-      }
175
-  }
176
-
177
-/**
178
- * These are sample debug features to demonstrate the usage of the 8x8 LED Matrix for debug purposes.
179
- * There is very little CPU burden added to the system by displaying information within the idle()
180
- * task.
181
- *
182
- * But with that said, if your debugging can be facilitated by making calls into the library from
183
- * other places in the code, feel free to do it.  The CPU burden for a few calls to toggle an LED
184
- * or clear a row is not very significant.
185
- */
186
-  void Max7219_idle_tasks() {
187
-    #if ENABLED(MAX7219_DEBUG_PRINTER_ALIVE)
188
-      static int debug_cnt = 0;
189
-      if (debug_cnt++ > 100) {
190
-        Max7219_LED_Toggle(7, 7);
191
-        debug_cnt = 0;
192
-      }
193
-    #endif
194
-
195
-    #ifdef MAX7219_DEBUG_STEPPER_HEAD
196
-      Max7219_Clear_Row(MAX7219_DEBUG_STEPPER_HEAD);
197
-      Max7219_Clear_Row(MAX7219_DEBUG_STEPPER_HEAD + 1);
198
-      if ( planner.block_buffer_head < 8)
199
-        Max7219_LED_On( planner.block_buffer_head, MAX7219_DEBUG_STEPPER_HEAD);
200
-      else
201
-        Max7219_LED_On( planner.block_buffer_head-8, MAX7219_DEBUG_STEPPER_HEAD+1);
202
-    #endif
203
-
204
-    #ifdef MAX7219_DEBUG_STEPPER_TAIL
205
-      Max7219_Clear_Row(MAX7219_DEBUG_STEPPER_TAIL);
206
-      Max7219_Clear_Row(MAX7219_DEBUG_STEPPER_TAIL + 1);
207
-      if ( planner.block_buffer_tail < 8)
208
-        Max7219_LED_On( planner.block_buffer_tail, MAX7219_DEBUG_STEPPER_TAIL );
209
-      else
210
-        Max7219_LED_On( planner.block_buffer_tail-8, MAX7219_DEBUG_STEPPER_TAIL+1 );
211
-    #endif
212
-
213
-    #ifdef MAX7219_DEBUG_STEPPER_QUEUE
214
-      static int16_t last_depth = 0;
215
-      int16_t current_depth = planner.block_buffer_head - planner.block_buffer_tail;
216
-      if (current_depth != last_depth) {  // usually, no update will be needed.
217
-        if (current_depth < 0) current_depth += BLOCK_BUFFER_SIZE;
218
-        NOMORE(current_depth, BLOCK_BUFFER_SIZE);
219
-        NOMORE(current_depth, 16);        // if the BLOCK_BUFFER_SIZE is greater than 16, two lines
220
-                                          // of LEDs is enough to see if the buffer is draining
221
-
222
-        const uint8_t st = min(current_depth, last_depth),
223
-                      en = max(current_depth, last_depth);
224
-        if (current_depth < last_depth)
225
-          for (uint8_t i = st; i <= en; i++)   // clear the highest order LEDs
226
-            Max7219_LED_Off(i >> 1, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
227
-        else
228
-          for (uint8_t i = st; i <= en; i++)   // set the highest order LEDs
229
-            Max7219_LED_On(i >> 1, MAX7219_DEBUG_STEPPER_QUEUE + (i & 1));
230
-
231
-        last_depth = current_depth;
232
-      }
233
-    #endif
234
-  }
235
-
236
-#endif // MAX7219_DEBUG

+ 0
- 88
Marlin/Max7219_Debug_LEDs.h View File

@@ -1,88 +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 row, uint8_t col);
44
- * void Max7219_LED_Off(uint8_t row, uint8_t col);
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_Column(uint8_t col, uint8_t val);
50
- * void Max7219_idle_tasks();
51
- */
52
-
53
-#ifndef __MAX7219_DEBUG_LEDS_H__
54
-#define __MAX7219_DEBUG_LEDS_H__
55
-
56
-  //
57
-  // define max7219 registers
58
-  //
59
-  #define max7219_reg_noop        0x00
60
-  #define max7219_reg_digit0      0x01
61
-  #define max7219_reg_digit1      0x02
62
-  #define max7219_reg_digit2      0x03
63
-  #define max7219_reg_digit3      0x04
64
-  #define max7219_reg_digit4      0x05
65
-  #define max7219_reg_digit5      0x06
66
-  #define max7219_reg_digit6      0x07
67
-  #define max7219_reg_digit7      0x08
68
-
69
-  #define max7219_reg_intensity   0x0A
70
-  #define max7219_reg_displayTest 0x0F
71
-  #define max7219_reg_decodeMode  0x09
72
-  #define max7219_reg_scanLimit   0x0B
73
-  #define max7219_reg_shutdown    0x0C
74
-
75
-  void Max7219_init();
76
-  void Max7219_PutByte(uint8_t data);
77
-  void Max7219(const uint8_t reg, const uint8_t data);
78
-  void Max7219_LED_Set(const uint8_t row, const uint8_t col, const bool on);
79
-  void Max7219_LED_On(const uint8_t row, const uint8_t col);
80
-  void Max7219_LED_Off(const uint8_t row, const uint8_t col);
81
-  void Max7219_LED_Toggle(const uint8_t row, const uint8_t col);
82
-  void Max7219_Clear_Row(const uint8_t row);
83
-  void Max7219_Clear_Column(const uint8_t col);
84
-  void Max7219_Set_Row(const uint8_t row, const uint8_t val);
85
-  void Max7219_Set_Column(const uint8_t col, const uint8_t val);
86
-  void Max7219_idle_tasks();
87
-
88
-#endif // __MAX7219_DEBUG_LEDS_H__

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


+ 0
- 729
Marlin/Sd2Card.cpp View File

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

+ 0
- 251
Marlin/Sd2Card.h View File

@@ -1,251 +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
-
30
-#include "Marlin.h"
31
-#if ENABLED(SDSUPPORT)
32
-
33
-#ifndef Sd2Card_h
34
-#define Sd2Card_h
35
-/**
36
- * \file
37
- * \brief Sd2Card class for V2 SD/SDHC cards
38
- */
39
-#include "SdFatConfig.h"
40
-#include "SdInfo.h"
41
-//------------------------------------------------------------------------------
42
-// SPI speed is F_CPU/2^(1 + index), 0 <= index <= 6
43
-/** Set SCK to max rate of F_CPU/2. See Sd2Card::setSckRate(). */
44
-uint8_t const SPI_FULL_SPEED = 0;
45
-/** Set SCK rate to F_CPU/4. See Sd2Card::setSckRate(). */
46
-uint8_t const SPI_HALF_SPEED = 1;
47
-/** Set SCK rate to F_CPU/8. See Sd2Card::setSckRate(). */
48
-uint8_t const SPI_QUARTER_SPEED = 2;
49
-/** Set SCK rate to F_CPU/16. See Sd2Card::setSckRate(). */
50
-uint8_t const SPI_EIGHTH_SPEED = 3;
51
-/** Set SCK rate to F_CPU/32. See Sd2Card::setSckRate(). */
52
-uint8_t const SPI_SIXTEENTH_SPEED = 4;
53
-//------------------------------------------------------------------------------
54
-/** init timeout ms */
55
-uint16_t const SD_INIT_TIMEOUT = 2000;
56
-/** erase timeout ms */
57
-uint16_t const SD_ERASE_TIMEOUT = 10000;
58
-/** read timeout ms */
59
-uint16_t const SD_READ_TIMEOUT = 300;
60
-/** write time out ms */
61
-uint16_t const SD_WRITE_TIMEOUT = 600;
62
-//------------------------------------------------------------------------------
63
-// SD card errors
64
-/** timeout error for command CMD0 (initialize card in SPI mode) */
65
-uint8_t const SD_CARD_ERROR_CMD0 = 0X1;
66
-/** CMD8 was not accepted - not a valid SD card*/
67
-uint8_t const SD_CARD_ERROR_CMD8 = 0X2;
68
-/** card returned an error response for CMD12 (write stop) */
69
-uint8_t const SD_CARD_ERROR_CMD12 = 0X3;
70
-/** card returned an error response for CMD17 (read block) */
71
-uint8_t const SD_CARD_ERROR_CMD17 = 0X4;
72
-/** card returned an error response for CMD18 (read multiple block) */
73
-uint8_t const SD_CARD_ERROR_CMD18 = 0X5;
74
-/** card returned an error response for CMD24 (write block) */
75
-uint8_t const SD_CARD_ERROR_CMD24 = 0X6;
76
-/**  WRITE_MULTIPLE_BLOCKS command failed */
77
-uint8_t const SD_CARD_ERROR_CMD25 = 0X7;
78
-/** card returned an error response for CMD58 (read OCR) */
79
-uint8_t const SD_CARD_ERROR_CMD58 = 0X8;
80
-/** SET_WR_BLK_ERASE_COUNT failed */
81
-uint8_t const SD_CARD_ERROR_ACMD23 = 0X9;
82
-/** ACMD41 initialization process timeout */
83
-uint8_t const SD_CARD_ERROR_ACMD41 = 0XA;
84
-/** card returned a bad CSR version field */
85
-uint8_t const SD_CARD_ERROR_BAD_CSD = 0XB;
86
-/** erase block group command failed */
87
-uint8_t const SD_CARD_ERROR_ERASE = 0XC;
88
-/** card not capable of single block erase */
89
-uint8_t const SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0XD;
90
-/** Erase sequence timed out */
91
-uint8_t const SD_CARD_ERROR_ERASE_TIMEOUT = 0XE;
92
-/** card returned an error token instead of read data */
93
-uint8_t const SD_CARD_ERROR_READ = 0XF;
94
-/** read CID or CSD failed */
95
-uint8_t const SD_CARD_ERROR_READ_REG = 0x10;
96
-/** timeout while waiting for start of read data */
97
-uint8_t const SD_CARD_ERROR_READ_TIMEOUT = 0x11;
98
-/** card did not accept STOP_TRAN_TOKEN */
99
-uint8_t const SD_CARD_ERROR_STOP_TRAN = 0x12;
100
-/** card returned an error token as a response to a write operation */
101
-uint8_t const SD_CARD_ERROR_WRITE = 0x13;
102
-/** attempt to write protected block zero */
103
-uint8_t const SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0x14;  // REMOVE - not used
104
-/** card did not go ready for a multiple block write */
105
-uint8_t const SD_CARD_ERROR_WRITE_MULTIPLE = 0x15;
106
-/** card returned an error to a CMD13 status check after a write */
107
-uint8_t const SD_CARD_ERROR_WRITE_PROGRAMMING = 0x16;
108
-/** timeout occurred during write programming */
109
-uint8_t const SD_CARD_ERROR_WRITE_TIMEOUT = 0x17;
110
-/** incorrect rate selected */
111
-uint8_t const SD_CARD_ERROR_SCK_RATE = 0x18;
112
-/** init() not called */
113
-uint8_t const SD_CARD_ERROR_INIT_NOT_CALLED = 0x19;
114
-/** crc check error */
115
-uint8_t const SD_CARD_ERROR_CRC = 0x20;
116
-//------------------------------------------------------------------------------
117
-// card types
118
-/** Standard capacity V1 SD card */
119
-uint8_t const SD_CARD_TYPE_SD1  = 1;
120
-/** Standard capacity V2 SD card */
121
-uint8_t const SD_CARD_TYPE_SD2  = 2;
122
-/** High Capacity SD card */
123
-uint8_t const SD_CARD_TYPE_SDHC = 3;
124
-/**
125
- * define SOFTWARE_SPI to use bit-bang SPI
126
- */
127
-//------------------------------------------------------------------------------
128
-#if MEGA_SOFT_SPI
129
-  #define SOFTWARE_SPI
130
-#elif USE_SOFTWARE_SPI
131
-  #define SOFTWARE_SPI
132
-#endif  // MEGA_SOFT_SPI
133
-//------------------------------------------------------------------------------
134
-// SPI pin definitions - do not edit here - change in SdFatConfig.h
135
-//
136
-#if DISABLED(SOFTWARE_SPI)
137
-  // hardware pin defs
138
-  /** The default chip select pin for the SD card is SS. */
139
-  #define SD_CHIP_SELECT_PIN SS_PIN
140
-  // The following three pins must not be redefined for hardware SPI.
141
-  /** SPI Master Out Slave In pin */
142
-  #define SPI_MOSI_PIN MOSI_PIN
143
-  /** SPI Master In Slave Out pin */
144
-  #define SPI_MISO_PIN MISO_PIN
145
-  /** SPI Clock pin */
146
-  #define SPI_SCK_PIN SCK_PIN
147
-
148
-#else  // SOFTWARE_SPI
149
-
150
-  /** SPI chip select pin */
151
-  #define SD_CHIP_SELECT_PIN SOFT_SPI_CS_PIN
152
-  /** SPI Master Out Slave In pin */
153
-  #define SPI_MOSI_PIN SOFT_SPI_MOSI_PIN
154
-  /** SPI Master In Slave Out pin */
155
-  #define SPI_MISO_PIN SOFT_SPI_MISO_PIN
156
-  /** SPI Clock pin */
157
-  #define SPI_SCK_PIN SOFT_SPI_SCK_PIN
158
-#endif  // SOFTWARE_SPI
159
-//------------------------------------------------------------------------------
160
-/**
161
- * \class Sd2Card
162
- * \brief Raw access to SD and SDHC flash memory cards.
163
- */
164
-class Sd2Card {
165
- public:
166
-  /** Construct an instance of Sd2Card. */
167
-  Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {}
168
-  uint32_t cardSize();
169
-  bool erase(uint32_t firstBlock, uint32_t lastBlock);
170
-  bool eraseSingleBlockEnable();
171
-  /**
172
-   *  Set SD error code.
173
-   *  \param[in] code value for error code.
174
-   */
175
-  void error(uint8_t code) {errorCode_ = code;}
176
-  /**
177
-   * \return error code for last error. See Sd2Card.h for a list of error codes.
178
-   */
179
-  int errorCode() const {return errorCode_;}
180
-  /** \return error data for last error. */
181
-  int errorData() const {return status_;}
182
-  /**
183
-   * Initialize an SD flash memory card with default clock rate and chip
184
-   * select pin.  See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin).
185
-   *
186
-   * \return true for success or false for failure.
187
-   */
188
-  bool init(uint8_t sckRateID = SPI_FULL_SPEED,
189
-            uint8_t chipSelectPin = SD_CHIP_SELECT_PIN);
190
-  bool readBlock(uint32_t block, uint8_t* dst);
191
-  /**
192
-   * Read a card's CID register. The CID contains card identification
193
-   * information such as Manufacturer ID, Product name, Product serial
194
-   * number and Manufacturing date.
195
-   *
196
-   * \param[out] cid pointer to area for returned data.
197
-   *
198
-   * \return true for success or false for failure.
199
-   */
200
-  bool readCID(cid_t* cid) {
201
-    return readRegister(CMD10, cid);
202
-  }
203
-  /**
204
-   * Read a card's CSD register. The CSD contains Card-Specific Data that
205
-   * provides information regarding access to the card's contents.
206
-   *
207
-   * \param[out] csd pointer to area for returned data.
208
-   *
209
-   * \return true for success or false for failure.
210
-   */
211
-  bool readCSD(csd_t* csd) {
212
-    return readRegister(CMD9, csd);
213
-  }
214
-  bool readData(uint8_t* dst);
215
-  bool readStart(uint32_t blockNumber);
216
-  bool readStop();
217
-  bool setSckRate(uint8_t sckRateID);
218
-  /** Return the card type: SD V1, SD V2 or SDHC
219
-   * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC.
220
-   */
221
-  int type() const {return type_;}
222
-  bool writeBlock(uint32_t blockNumber, const uint8_t* src);
223
-  bool writeData(const uint8_t* src);
224
-  bool writeStart(uint32_t blockNumber, uint32_t eraseCount);
225
-  bool writeStop();
226
- private:
227
-  //----------------------------------------------------------------------------
228
-  uint8_t chipSelectPin_;
229
-  uint8_t errorCode_;
230
-  uint8_t spiRate_;
231
-  uint8_t status_;
232
-  uint8_t type_;
233
-  // private functions
234
-  uint8_t cardAcmd(uint8_t cmd, uint32_t arg) {
235
-    cardCommand(CMD55, 0);
236
-    return cardCommand(cmd, arg);
237
-  }
238
-  uint8_t cardCommand(uint8_t cmd, uint32_t arg);
239
-
240
-  bool readData(uint8_t* dst, uint16_t count);
241
-  bool readRegister(uint8_t cmd, void* buf);
242
-  void chipSelectHigh();
243
-  void chipSelectLow();
244
-  void type(uint8_t value) {type_ = value;}
245
-  bool waitNotBusy(uint16_t timeoutMillis);
246
-  bool writeData(uint8_t token, const uint8_t* src);
247
-};
248
-#endif  // Sd2Card_h
249
-
250
-
251
-#endif

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


+ 0
- 492
Marlin/SdBaseFile.h View File

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

+ 0
- 134
Marlin/SdFatConfig.h View File

@@ -1,134 +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
-/**
30
- * \file
31
- * \brief configuration definitions
32
- */
33
-#include "Marlin.h"
34
-#if ENABLED(SDSUPPORT)
35
-
36
-#ifndef SdFatConfig_h
37
-  #define SdFatConfig_h
38
-  #include <stdint.h>
39
-  //------------------------------------------------------------------------------
40
-  /**
41
-  * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
42
-  *
43
-  * Using multiple cards costs 400 - 500  bytes of flash.
44
-  *
45
-  * Each card requires about 550 bytes of SRAM so use of a Mega is recommended.
46
-  */
47
-  #define USE_MULTIPLE_CARDS 0
48
-  //------------------------------------------------------------------------------
49
-  /**
50
-  * Call flush for endl if ENDL_CALLS_FLUSH is nonzero
51
-  *
52
-  * The standard for iostreams is to call flush.  This is very costly for
53
-  * SdFat.  Each call to flush causes 2048 bytes of I/O to the SD.
54
-  *
55
-  * SdFat has a single 512 byte buffer for SD I/O so it must write the current
56
-  * data block to the SD, read the directory block from the SD, update the
57
-  * directory entry, write the directory block to the SD and read the data
58
-  * block back into the buffer.
59
-  *
60
-  * The SD flash memory controller is not designed for this many rewrites
61
-  * so performance may be reduced by more than a factor of 100.
62
-  *
63
-  * If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force
64
-  * all data to be written to the SD.
65
-  */
66
-  #define ENDL_CALLS_FLUSH 0
67
-  //------------------------------------------------------------------------------
68
-  /**
69
-  * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero
70
-  */
71
-  #define ALLOW_DEPRECATED_FUNCTIONS 1
72
-  //------------------------------------------------------------------------------
73
-  /**
74
-  * Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
75
-  * FAT12 has not been well tested.
76
-  */
77
-  #define FAT12_SUPPORT 0
78
-  //------------------------------------------------------------------------------
79
-  /**
80
-  * SPI init rate for SD initialization commands. Must be 5 (F_CPU/64)
81
-  * or 6 (F_CPU/128).
82
-  */
83
-  #define SPI_SD_INIT_RATE 5
84
-  //------------------------------------------------------------------------------
85
-  /**
86
-  * Set the SS pin high for hardware SPI.  If SS is chip select for another SPI
87
-  * device this will disable that device during the SD init phase.
88
-  */
89
-  #define SET_SPI_SS_HIGH 1
90
-  //------------------------------------------------------------------------------
91
-  /**
92
-  * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos.
93
-  * Pins used are SS 10, MOSI 11, MISO 12, and SCK 13.
94
-  *
95
-  * MEGA_SOFT_SPI allows an unmodified Adafruit GPS Shield to be used
96
-  * on Mega Arduinos.  Software SPI works well with GPS Shield V1.1
97
-  * but many SD cards will fail with GPS Shield V1.0.
98
-  */
99
-  #define MEGA_SOFT_SPI 0
100
-  //------------------------------------------------------------------------------
101
-  /**
102
-  * Set USE_SOFTWARE_SPI nonzero to always use software SPI.
103
-  */
104
-  #define USE_SOFTWARE_SPI 0
105
-  // define software SPI pins so Mega can use unmodified 168/328 shields
106
-  /** Software SPI chip select pin for the SD */
107
-  #define SOFT_SPI_CS_PIN 10
108
-  /** Software SPI Master Out Slave In pin */
109
-  #define SOFT_SPI_MOSI_PIN 11
110
-  /** Software SPI Master In Slave Out pin */
111
-  #define SOFT_SPI_MISO_PIN 12
112
-  /** Software SPI Clock pin */
113
-  #define SOFT_SPI_SCK_PIN 13
114
-  //------------------------------------------------------------------------------
115
-  /**
116
-  * The __cxa_pure_virtual function is an error handler that is invoked when
117
-  * a pure virtual function is called.
118
-  */
119
-  #define USE_CXA_PURE_VIRTUAL 1
120
-
121
-  /** Number of UTF-16 characters per entry */
122
-  #define FILENAME_LENGTH 13
123
-
124
-  /**
125
-  * Defines for long (vfat) filenames
126
-  */
127
-  /** Number of VFAT entries used. Every entry has 13 UTF-16 characters */
128
-  #define MAX_VFAT_ENTRIES (2)
129
-  /** Total size of the buffer used to store the long filenames */
130
-  #define LONG_FILENAME_LENGTH (FILENAME_LENGTH*MAX_VFAT_ENTRIES+1)
131
-#endif  // SdFatConfig_h
132
-
133
-
134
-#endif

+ 0
- 655
Marlin/SdFatStructs.h View File

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

+ 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 "Marlin.h"
30
-
31
-#if ENABLED(SDSUPPORT)
32
-#include "SdFatUtil.h"
33
-
34
-//------------------------------------------------------------------------------
35
-/** Amount of free RAM
36
- * \return The number of free bytes.
37
- */
38
-#ifdef __arm__
39
-extern "C" char* sbrk(int incr);
40
-int SdFatUtil::FreeRam() {
41
-  char top;
42
-  return &top - reinterpret_cast<char*>(sbrk(0));
43
-}
44
-#else  // __arm__
45
-extern char* __brkval;
46
-extern char __bss_end;
47
-/** Amount of free RAM
48
- * \return The number of free bytes.
49
- */
50
-int SdFatUtil::FreeRam() {
51
-  char top;
52
-  return __brkval ? &top - __brkval : &top - &__bss_end;
53
-}
54
-#endif  // __arm
55
-
56
-//------------------------------------------------------------------------------
57
-/** %Print a string in flash memory.
58
- *
59
- * \param[in] pr Print object for output.
60
- * \param[in] str Pointer to string stored in flash memory.
61
- */
62
-void SdFatUtil::print_P(PGM_P str) {
63
-  for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c);
64
-}
65
-//------------------------------------------------------------------------------
66
-/** %Print a string in flash memory followed by a CR/LF.
67
- *
68
- * \param[in] pr Print object for output.
69
- * \param[in] str Pointer to string stored in flash memory.
70
- */
71
-void SdFatUtil::println_P(PGM_P str) {
72
-  print_P(str);
73
-  MYSERIAL.println();
74
-}
75
-//------------------------------------------------------------------------------
76
-/** %Print a string in flash memory to Serial.
77
- *
78
- * \param[in] str Pointer to string stored in flash memory.
79
- */
80
-void SdFatUtil::SerialPrint_P(PGM_P str) {
81
-  print_P(str);
82
-}
83
-//------------------------------------------------------------------------------
84
-/** %Print a string in flash memory to Serial followed by a CR/LF.
85
- *
86
- * \param[in] str Pointer to string stored in flash memory.
87
- */
88
-void SdFatUtil::SerialPrintln_P(PGM_P str) {
89
-  println_P(str);
90
-}
91
-#endif

+ 0
- 56
Marlin/SdFatUtil.h View File

@@ -1,56 +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
-#include "Marlin.h"
33
-#if ENABLED(SDSUPPORT)
34
-
35
-/**
36
- * \file
37
- * \brief Useful utility functions.
38
- */
39
-/** Store and print a string in flash memory.*/
40
-#define PgmPrint(x) SerialPrint_P(PSTR(x))
41
-/** Store and print a string in flash memory followed by a CR/LF.*/
42
-#define PgmPrintln(x) SerialPrintln_P(PSTR(x))
43
-
44
-namespace SdFatUtil {
45
-  int FreeRam();
46
-  void print_P(PGM_P str);
47
-  void println_P(PGM_P str);
48
-  void SerialPrint_P(PGM_P str);
49
-  void SerialPrintln_P(PGM_P str);
50
-}
51
-
52
-using namespace SdFatUtil;  // NOLINT
53
-
54
-#endif // SDSUPPORT
55
-
56
-#endif // SdFatUtil_h

+ 0
- 102
Marlin/SdFile.cpp View File

@@ -1,102 +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 "Marlin.h"
30
-
31
-#if ENABLED(SDSUPPORT)
32
-#include "SdFile.h"
33
-/**  Create a file object and open it in the current working directory.
34
- *
35
- * \param[in] path A path with a valid 8.3 DOS name for a file to be opened.
36
- *
37
- * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
38
- * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
39
- */
40
-SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) {
41
-}
42
-//------------------------------------------------------------------------------
43
-/** Write data to an open file.
44
- *
45
- * \note Data is moved to the cache but may not be written to the
46
- * storage device until sync() is called.
47
- *
48
- * \param[in] buf Pointer to the location of the data to be written.
49
- *
50
- * \param[in] nbyte Number of bytes to write.
51
- *
52
- * \return For success write() returns the number of bytes written, always
53
- * \a nbyte.  If an error occurs, write() returns -1.  Possible errors
54
- * include write() is called before a file has been opened, write is called
55
- * for a read-only file, device is full, a corrupt file system or an I/O error.
56
- *
57
- */
58
-int16_t SdFile::write(const void* buf, uint16_t nbyte) {
59
-  return SdBaseFile::write(buf, nbyte);
60
-}
61
-//------------------------------------------------------------------------------
62
-/** Write a byte to a file. Required by the Arduino Print class.
63
- * \param[in] b the byte to be written.
64
- * Use writeError to check for errors.
65
- */
66
-#if ARDUINO >= 100
67
-  size_t SdFile::write(uint8_t b) {
68
-    return SdBaseFile::write(&b, 1);
69
-  }
70
-#else
71
-  void SdFile::write(uint8_t b) {
72
-    SdBaseFile::write(&b, 1);
73
-  }
74
-#endif
75
-//------------------------------------------------------------------------------
76
-/** Write a string to a file. Used by the Arduino Print class.
77
- * \param[in] str Pointer to the string.
78
- * Use writeError to check for errors.
79
- */
80
-void SdFile::write(const char* str) {
81
-  SdBaseFile::write(str, strlen(str));
82
-}
83
-//------------------------------------------------------------------------------
84
-/** Write a PROGMEM string to a file.
85
- * \param[in] str Pointer to the PROGMEM string.
86
- * Use writeError to check for errors.
87
- */
88
-void SdFile::write_P(PGM_P str) {
89
-  for (uint8_t c; (c = pgm_read_byte(str)); str++) write(c);
90
-}
91
-//------------------------------------------------------------------------------
92
-/** Write a PROGMEM string followed by CR/LF to a file.
93
- * \param[in] str Pointer to the PROGMEM string.
94
- * Use writeError to check for errors.
95
- */
96
-void SdFile::writeln_P(PGM_P str) {
97
-  write_P(str);
98
-  write_P(PSTR("\r\n"));
99
-}
100
-
101
-
102
-#endif

+ 0
- 63
Marlin/SdFile.h View File

@@ -1,63 +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
-/**
30
- * \file
31
- * \brief SdFile class
32
- */
33
-#include "Marlin.h"
34
-
35
-#if ENABLED(SDSUPPORT)
36
-#include "SdBaseFile.h"
37
-#include <Print.h>
38
-#ifndef SdFile_h
39
-#define SdFile_h
40
-//------------------------------------------------------------------------------
41
-/**
42
- * \class SdFile
43
- * \brief SdBaseFile with Print.
44
- */
45
-class SdFile : public SdBaseFile, public Print {
46
- public:
47
-  SdFile() {}
48
-  SdFile(const char* name, uint8_t oflag);
49
-  #if ARDUINO >= 100
50
-    size_t write(uint8_t b);
51
-  #else
52
-   void write(uint8_t b);
53
-  #endif
54
-
55
-  int16_t write(const void* buf, uint16_t nbyte);
56
-  void write(const char* str);
57
-  void write_P(PGM_P str);
58
-  void writeln_P(PGM_P str);
59
-};
60
-#endif  // SdFile_h
61
-
62
-
63
-#endif

+ 0
- 289
Marlin/SdInfo.h View File

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

+ 0
- 420
Marlin/SdVolume.cpp View File

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

+ 0
- 227
Marlin/SdVolume.h View File

@@ -1,227 +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 "Marlin.h"
30
-#if ENABLED(SDSUPPORT)
31
-#ifndef SdVolume_h
32
-#define SdVolume_h
33
-/**
34
- * \file
35
- * \brief SdVolume class
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
-           /** Used to access cached file data blocks. */
48
-  uint8_t  data[512];
49
-           /** Used to access cached FAT16 entries. */
50
-  uint16_t fat16[256];
51
-           /** Used to access cached FAT32 entries. */
52
-  uint32_t fat32[128];
53
-           /** Used to access cached directory entries. */
54
-  dir_t    dir[16];
55
-           /** Used to access a cached Master Boot Record. */
56
-  mbr_t    mbr;
57
-           /** Used to access to a cached FAT boot sector. */
58
-  fat_boot_t fbs;
59
-           /** Used to access to a cached FAT32 boot sector. */
60
-  fat32_boot_t fbs32;
61
-           /** Used to access to a cached FAT32 FSINFO sector. */
62
-  fat32_fsinfo_t fsinfo;
63
-};
64
-//------------------------------------------------------------------------------
65
-/**
66
- * \class SdVolume
67
- * \brief Access FAT16 and FAT32 volumes on SD and SDHC cards.
68
- */
69
-class SdVolume {
70
- public:
71
-  /** Create an instance of SdVolume */
72
-  SdVolume() : fatType_(0) {}
73
-  /** Clear the cache and returns a pointer to the cache.  Used by the WaveRP
74
-   * recorder to do raw write to the SD card.  Not for normal apps.
75
-   * \return A pointer to the cache buffer or zero if an error occurs.
76
-   */
77
-  cache_t* cacheClear() {
78
-    if (!cacheFlush()) return 0;
79
-    cacheBlockNumber_ = 0xFFFFFFFF;
80
-    return &cacheBuffer_;
81
-  }
82
-  /** Initialize a FAT volume.  Try partition one first then try super
83
-   * floppy format.
84
-   *
85
-   * \param[in] dev The Sd2Card where the volume is located.
86
-   *
87
-   * \return The value one, true, is returned for success and
88
-   * the value zero, false, is returned for failure.  Reasons for
89
-   * failure include not finding a valid partition, not finding a valid
90
-   * FAT file system or an I/O error.
91
-   */
92
-  bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0);}
93
-  bool init(Sd2Card* dev, uint8_t part);
94
-
95
-  // inline functions that return volume info
96
-  /** \return The volume's cluster size in blocks. */
97
-  uint8_t blocksPerCluster() const {return blocksPerCluster_;}
98
-  /** \return The number of blocks in one FAT. */
99
-  uint32_t blocksPerFat()  const {return blocksPerFat_;}
100
-  /** \return The total number of clusters in the volume. */
101
-  uint32_t clusterCount() const {return clusterCount_;}
102
-  /** \return The shift count required to multiply by blocksPerCluster. */
103
-  uint8_t clusterSizeShift() const {return clusterSizeShift_;}
104
-  /** \return The logical block number for the start of file data. */
105
-  uint32_t dataStartBlock() const {return dataStartBlock_;}
106
-  /** \return The number of FAT structures on the volume. */
107
-  uint8_t fatCount() const {return fatCount_;}
108
-  /** \return The logical block number for the start of the first FAT. */
109
-  uint32_t fatStartBlock() const {return fatStartBlock_;}
110
-  /** \return The FAT type of the volume. Values are 12, 16 or 32. */
111
-  uint8_t fatType() const {return fatType_;}
112
-  int32_t freeClusterCount();
113
-  /** \return The number of entries in the root directory for FAT16 volumes. */
114
-  uint32_t rootDirEntryCount() const {return rootDirEntryCount_;}
115
-  /** \return The logical block number for the start of the root directory
116
-       on FAT16 volumes or the first cluster number on FAT32 volumes. */
117
-  uint32_t rootDirStart() const {return rootDirStart_;}
118
-  /** Sd2Card object for this volume
119
-   * \return pointer to Sd2Card object.
120
-   */
121
-  Sd2Card* sdCard() {return sdCard_;}
122
-  /** Debug access to FAT table
123
-   *
124
-   * \param[in] n cluster number.
125
-   * \param[out] v value of entry
126
-   * \return true for success or false for failure
127
-   */
128
-  bool dbgFat(uint32_t n, uint32_t* v) {return fatGet(n, v);}
129
-  //------------------------------------------------------------------------------
130
- private:
131
-  // Allow SdBaseFile access to SdVolume private data.
132
-  friend class SdBaseFile;
133
-
134
-  // value for dirty argument in cacheRawBlock to indicate read from cache
135
-  static bool const CACHE_FOR_READ = false;
136
-  // value for dirty argument in cacheRawBlock to indicate write to cache
137
-  static bool const CACHE_FOR_WRITE = true;
138
-
139
-#if USE_MULTIPLE_CARDS
140
-  cache_t cacheBuffer_;        // 512 byte cache for device blocks
141
-  uint32_t cacheBlockNumber_;  // Logical number of block in the cache
142
-  Sd2Card* sdCard_;            // Sd2Card object for cache
143
-  bool cacheDirty_;            // cacheFlush() will write block if true
144
-  uint32_t cacheMirrorBlock_;  // block number for mirror FAT
145
-#else  // USE_MULTIPLE_CARDS
146
-  static cache_t cacheBuffer_;        // 512 byte cache for device blocks
147
-  static uint32_t cacheBlockNumber_;  // Logical number of block in the cache
148
-  static Sd2Card* sdCard_;            // Sd2Card object for cache
149
-  static bool cacheDirty_;            // cacheFlush() will write block if true
150
-  static uint32_t cacheMirrorBlock_;  // block number for mirror FAT
151
-#endif  // USE_MULTIPLE_CARDS
152
-  uint32_t allocSearchStart_;   // start cluster for alloc search
153
-  uint8_t blocksPerCluster_;    // cluster size in blocks
154
-  uint32_t blocksPerFat_;       // FAT size in blocks
155
-  uint32_t clusterCount_;       // clusters in one FAT
156
-  uint8_t clusterSizeShift_;    // shift to convert cluster count to block count
157
-  uint32_t dataStartBlock_;     // first data block number
158
-  uint8_t fatCount_;            // number of FATs on volume
159
-  uint32_t fatStartBlock_;      // start block for first FAT
160
-  uint8_t fatType_;             // volume type (12, 16, OR 32)
161
-  uint16_t rootDirEntryCount_;  // number of entries in FAT16 root dir
162
-  uint32_t rootDirStart_;       // root start block for FAT16, cluster for FAT32
163
-  //----------------------------------------------------------------------------
164
-  bool allocContiguous(uint32_t count, uint32_t* curCluster);
165
-  uint8_t blockOfCluster(uint32_t position) const {
166
-    return (position >> 9) & (blocksPerCluster_ - 1);
167
-  }
168
-  uint32_t clusterStartBlock(uint32_t cluster) const {
169
-    return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_);
170
-  }
171
-  uint32_t blockNumber(uint32_t cluster, uint32_t position) const {
172
-    return clusterStartBlock(cluster) + blockOfCluster(position);
173
-  }
174
-  cache_t* cache() {return &cacheBuffer_;}
175
-  uint32_t cacheBlockNumber() {return cacheBlockNumber_;}
176
-#if USE_MULTIPLE_CARDS
177
-  bool cacheFlush();
178
-  bool cacheRawBlock(uint32_t blockNumber, bool dirty);
179
-#else  // USE_MULTIPLE_CARDS
180
-  static bool cacheFlush();
181
-  static bool cacheRawBlock(uint32_t blockNumber, bool dirty);
182
-#endif  // USE_MULTIPLE_CARDS
183
-  // used by SdBaseFile write to assign cache to SD location
184
-  void cacheSetBlockNumber(uint32_t blockNumber, bool dirty) {
185
-    cacheDirty_ = dirty;
186
-    cacheBlockNumber_  = blockNumber;
187
-  }
188
-  void cacheSetDirty() {cacheDirty_ |= CACHE_FOR_WRITE;}
189
-  bool chainSize(uint32_t beginCluster, uint32_t* size);
190
-  bool fatGet(uint32_t cluster, uint32_t* value);
191
-  bool fatPut(uint32_t cluster, uint32_t value);
192
-  bool fatPutEOC(uint32_t cluster) {
193
-    return fatPut(cluster, 0x0FFFFFFF);
194
-  }
195
-  bool freeChain(uint32_t cluster);
196
-  bool isEOC(uint32_t cluster) const {
197
-    if (FAT12_SUPPORT && fatType_ == 12) return  cluster >= FAT12EOC_MIN;
198
-    if (fatType_ == 16) return cluster >= FAT16EOC_MIN;
199
-    return  cluster >= FAT32EOC_MIN;
200
-  }
201
-  bool readBlock(uint32_t block, uint8_t* dst) {
202
-    return sdCard_->readBlock(block, dst);
203
-  }
204
-  bool writeBlock(uint32_t block, const uint8_t* dst) {
205
-    return sdCard_->writeBlock(block, dst);
206
-  }
207
-  //------------------------------------------------------------------------------
208
-  // Deprecated functions  - suppress cpplint warnings with NOLINT comment
209
-#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
210
- public:
211
-  /** \deprecated Use: bool SdVolume::init(Sd2Card* dev);
212
-   * \param[in] dev The SD card where the volume is located.
213
-   * \return true for success or false for failure.
214
-   */
215
-  bool init(Sd2Card& dev) {return init(&dev);}  // NOLINT
216
-  /** \deprecated Use: bool SdVolume::init(Sd2Card* dev, uint8_t vol);
217
-   * \param[in] dev The SD card where the volume is located.
218
-   * \param[in] part The partition to be used.
219
-   * \return true for success or false for failure.
220
-   */
221
-  bool init(Sd2Card& dev, uint8_t part) {  // NOLINT
222
-    return init(&dev, part);
223
-  }
224
-#endif  // ALLOW_DEPRECATED_FUNCTIONS
225
-};
226
-#endif  // SdVolume
227
-#endif

+ 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.6"
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-10-10 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 010100
61
-  #define REQUIRED_CONFIGURATION_ADV_H_VERSION 010100
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
- 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 - Library for controlling a BlinkM over i2c
25
- * Created by Tim Koster, August 21 2013.
26
- */
27
-
28
-#include "Marlin.h"
29
-
30
-#if ENABLED(BLINKM)
31
-
32
-#include "blinkm.h"
33
-
34
-void SendColors(byte red, byte grn, byte blu) {
35
-  Wire.begin();
36
-  Wire.beginTransmission(0x09);
37
-  Wire.write('o');                    //to disable ongoing script, only needs to be used once
38
-  Wire.write('n');
39
-  Wire.write(red);
40
-  Wire.write(grn);
41
-  Wire.write(blu);
42
-  Wire.endTransmission();
43
-}
44
-
45
-#endif // BLINKM
46
-

+ 0
- 31
Marlin/blinkm.h View File

@@ -1,31 +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 - Library for controlling a BlinkM over i2c
25
- * Created by Tim Koster, August 21 2013.
26
- */
27
-
28
-#include "Arduino.h"
29
-#include "Wire.h"
30
-
31
-void SendColors(byte red, byte grn, byte blu);

+ 0
- 106
Marlin/boards.h 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
-#ifndef BOARDS_H
24
-#define BOARDS_H
25
-
26
-#define BOARD_UNKNOWN -1
27
-
28
-#define BOARD_GEN7_CUSTOM       10   // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
29
-#define BOARD_GEN7_12           11   // Gen7 v1.1, v1.2
30
-#define BOARD_GEN7_13           12   // Gen7 v1.3
31
-#define BOARD_GEN7_14           13   // Gen7 v1.4
32
-#define BOARD_CNCONTROLS_11     111  // Cartesio CN Controls V11
33
-#define BOARD_CNCONTROLS_12     112  // Cartesio CN Controls V12
34
-#define BOARD_CHEAPTRONIC       2    // Cheaptronic v1.0
35
-#define BOARD_CHEAPTRONIC_V2    21   // Cheaptronic v2.0
36
-#define BOARD_SETHI             20   // Sethi 3D_1
37
-#define BOARD_MIGHTYBOARD_REVE  200  // Makerbot Mightyboard Revision E
38
-#define BOARD_RAMPS_OLD         3    // MEGA/RAMPS up to 1.2
39
-#define BOARD_RAMPS_13_EFB      33   // RAMPS 1.3 (Power outputs: Hotend, Fan, Bed)
40
-#define BOARD_RAMPS_13_EEB      34   // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Bed)
41
-#define BOARD_RAMPS_13_EFF      35   // RAMPS 1.3 (Power outputs: Hotend, Fan0, Fan1)
42
-#define BOARD_RAMPS_13_EEF      36   // RAMPS 1.3 (Power outputs: Hotend0, Hotend1, Fan)
43
-#define BOARD_RAMPS_13_SF       38   // RAMPS 1.3 (Power outputs: Spindle, Controller Fan)
44
-#define BOARD_FELIX2            37   // Felix 2.0+ Electronics Board (RAMPS like)
45
-#define BOARD_RIGIDBOARD        42   // Invent-A-Part RigidBoard
46
-#define BOARD_RIGIDBOARD_V2     52   // Invent-A-Part RigidBoard V2
47
-#define BOARD_RAMPS_14_EFB      43   // RAMPS 1.4 (Power outputs: Hotend, Fan, Bed)
48
-#define BOARD_RAMPS_14_EEB      44   // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Bed)
49
-#define BOARD_RAMPS_14_EFF      45   // RAMPS 1.4 (Power outputs: Hotend, Fan0, Fan1)
50
-#define BOARD_RAMPS_14_EEF      46   // RAMPS 1.4 (Power outputs: Hotend0, Hotend1, Fan)
51
-#define BOARD_RAMPS_14_SF       48   // RAMPS 1.4 (Power outputs: Spindle, Controller Fan)
52
-#define BOARD_GEN6              5    // Gen6
53
-#define BOARD_GEN6_DELUXE       51   // Gen6 deluxe
54
-#define BOARD_SANGUINOLOLU_11   6    // Sanguinololu < 1.2
55
-#define BOARD_SANGUINOLOLU_12   62   // Sanguinololu 1.2 and above
56
-#define BOARD_MELZI             63   // Melzi
57
-#define BOARD_MELZI_MAKR3D      66   // Melzi with ATmega1284 (MaKr3d version)
58
-#define BOARD_MELZI_CREALITY    89   // Melzi Creality3D board (for CR-10 etc)
59
-#define BOARD_STB_11            64   // STB V1.1
60
-#define BOARD_AZTEEG_X1         65   // Azteeg X1
61
-#define BOARD_AZTEEG_X3         67   // Azteeg X3
62
-#define BOARD_AZTEEG_X3_PRO     68   // Azteeg X3 Pro
63
-#define BOARD_ANET_10           69   // Anet 1.0 (Melzi clone)
64
-#define BOARD_ULTIMAKER         7    // Ultimaker
65
-#define BOARD_ULTIMAKER_OLD     71   // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
66
-#define BOARD_ULTIMAIN_2        72   // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
67
-#define BOARD_GT2560_REV_A      74   // Geeetech GT2560 Rev. A
68
-#define BOARD_GT2560_REV_A_PLUS 75   // Geeetech GT2560 Rev. A+ (with auto level probe)
69
-#define BOARD_3DRAG             77   // 3Drag Controller
70
-#define BOARD_K8200             78   // Velleman K8200 Controller (derived from 3Drag Controller)
71
-#define BOARD_K8400             79   // Velleman K8400 Controller (derived from 3Drag Controller)
72
-#define BOARD_TEENSYLU          8    // Teensylu
73
-#define BOARD_RUMBA             80   // Rumba
74
-#define BOARD_PRINTRBOARD       81   // Printrboard (AT90USB1286)
75
-#define BOARD_PRINTRBOARD_REVF  811  // Printrboard Revision F (AT90USB1286)
76
-#define BOARD_BRAINWAVE         82   // Brainwave (AT90USB646)
77
-#define BOARD_SAV_MKI           83   // SAV Mk-I (AT90USB1286)
78
-#define BOARD_TEENSY2           84   // Teensy++2.0 (AT90USB1286) - CLI compile: HARDWARE_MOTHERBOARD=84  make
79
-#define BOARD_BRAINWAVE_PRO     85   // Brainwave Pro (AT90USB1286)
80
-#define BOARD_GEN3_PLUS         9    // Gen3+
81
-#define BOARD_GEN3_MONOLITHIC   22   // Gen3 Monolithic Electronics
82
-#define BOARD_MEGATRONICS       70   // Megatronics
83
-#define BOARD_MEGATRONICS_2     701  // Megatronics v2.0
84
-#define BOARD_MINITRONICS       702  // Minitronics v1.0/1.1
85
-#define BOARD_MEGATRONICS_3     703  // Megatronics v3.0
86
-#define BOARD_MEGATRONICS_31    704  // Megatronics v3.1
87
-#define BOARD_OMCA_A            90   // Alpha OMCA board
88
-#define BOARD_OMCA              91   // Final OMCA board
89
-#define BOARD_RAMBO             301  // Rambo
90
-#define BOARD_MINIRAMBO         302  // Mini-Rambo
91
-#define BOARD_SCOOVO_X9H        303  // abee Scoovo X9H
92
-#define BOARD_MEGACONTROLLER    310  // Mega controller
93
-#define BOARD_ELEFU_3           21   // Elefu Ra Board (v3)
94
-#define BOARD_5DPRINT           88   // 5DPrint D8 Driver Board
95
-#define BOARD_LEAPFROG          999  // Leapfrog
96
-#define BOARD_MKS_BASE          40   // MKS BASE 1.0
97
-#define BOARD_MKS_13            47   // MKS v1.3 or 1.4 (maybe higher)
98
-#define BOARD_SAINSMART_2IN1    49   // Sainsmart 2-in-1 board
99
-#define BOARD_BAM_DICE          401  // 2PrintBeta BAM&DICE with STK drivers
100
-#define BOARD_BAM_DICE_DUE      402  // 2PrintBeta BAM&DICE Due with STK drivers
101
-#define BOARD_BQ_ZUM_MEGA_3D    503  // bq ZUM Mega 3D
102
-#define BOARD_ZRIB_V20          504  // zrib V2.0 control board (Chinese knock off RAMPS replica)
103
-
104
-#define MB(board) (MOTHERBOARD==BOARD_##board)
105
-
106
-#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
- 885
Marlin/cardreader.cpp View File

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

+ 0
- 190
Marlin/cardreader.h View File

@@ -1,190 +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
-
34
-#include "types.h"
35
-#include "enum.h"
36
-
37
-class CardReader {
38
-public:
39
-  CardReader();
40
-
41
-  void initsd();
42
-  void write_command(char *buf);
43
-  //files auto[0-9].g on the sd card are performed in a row
44
-  //this is to delay autostart and hence the initialisaiton of the sd card to some seconds after the normal init, so the device is available quick after a reset
45
-
46
-  void checkautostart(bool x);
47
-  void openFile(char* name, bool read, bool push_current=false);
48
-  void openLogFile(char* name);
49
-  void removeFile(char* name);
50
-  void closefile(bool store_location=false);
51
-  void release();
52
-  void openAndPrintFile(const char *name);
53
-  void startFileprint();
54
-  void stopSDPrint();
55
-  void getStatus();
56
-  void printingHasFinished();
57
-
58
-  #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
59
-    void printLongPath(char *path);
60
-  #endif
61
-
62
-  void getfilename(uint16_t nr, const char* const match=NULL);
63
-  uint16_t getnrfilenames();
64
-
65
-  void getAbsFilename(char *t);
66
-
67
-  void ls();
68
-  void chdir(const char *relpath);
69
-  void updir();
70
-  void setroot();
71
-
72
-  #if ENABLED(SDCARD_SORT_ALPHA)
73
-    void presort();
74
-    void getfilename_sorted(const uint16_t nr);
75
-    #if ENABLED(SDSORT_GCODE)
76
-      FORCE_INLINE void setSortOn(bool b) { sort_alpha = b; presort(); }
77
-      FORCE_INLINE void setSortFolders(int i) { sort_folders = i; presort(); }
78
-      //FORCE_INLINE void setSortReverse(bool b) { sort_reverse = b; }
79
-    #endif
80
-  #endif
81
-
82
-  FORCE_INLINE void pauseSDPrint() { sdprinting = false; }
83
-  FORCE_INLINE bool isFileOpen() { return file.isOpen(); }
84
-  FORCE_INLINE bool eof() { return sdpos >= filesize; }
85
-  FORCE_INLINE int16_t get() { sdpos = file.curPosition(); return (int16_t)file.read(); }
86
-  FORCE_INLINE void setIndex(long index) { sdpos = index; file.seekSet(index); }
87
-  FORCE_INLINE uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; }
88
-  FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; }
89
-
90
-public:
91
-  bool saving, logging, sdprinting, cardOK, filenameIsDir;
92
-  char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH];
93
-  int autostart_index;
94
-private:
95
-  SdFile root, *curDir, workDir, workDirParents[MAX_DIR_DEPTH];
96
-  uint8_t workDirDepth;
97
-
98
-  // Sort files and folders alphabetically.
99
-  #if ENABLED(SDCARD_SORT_ALPHA)
100
-    uint16_t sort_count;        // Count of sorted items in the current directory
101
-    #if ENABLED(SDSORT_GCODE)
102
-      bool sort_alpha;          // Flag to enable / disable the feature
103
-      int sort_folders;         // Flag to enable / disable folder sorting
104
-      //bool sort_reverse;      // Flag to enable / disable reverse sorting
105
-    #endif
106
-
107
-    // By default the sort index is static
108
-    #if ENABLED(SDSORT_DYNAMIC_RAM)
109
-      uint8_t *sort_order;
110
-    #else
111
-      uint8_t sort_order[SDSORT_LIMIT];
112
-    #endif
113
-
114
-    // Cache filenames to speed up SD menus.
115
-    #if ENABLED(SDSORT_USES_RAM)
116
-
117
-      // If using dynamic ram for names, allocate on the heap.
118
-      #if ENABLED(SDSORT_CACHE_NAMES)
119
-        #if ENABLED(SDSORT_DYNAMIC_RAM)
120
-          char **sortshort, **sortnames;
121
-        #else
122
-          char sortshort[SDSORT_LIMIT][FILENAME_LENGTH];
123
-          char sortnames[SDSORT_LIMIT][LONG_FILENAME_LENGTH];
124
-        #endif
125
-      #elif DISABLED(SDSORT_USES_STACK)
126
-        char sortnames[SDSORT_LIMIT][LONG_FILENAME_LENGTH];
127
-      #endif
128
-
129
-      // Folder sorting uses an isDir array when caching items.
130
-      #if HAS_FOLDER_SORTING
131
-        #if ENABLED(SDSORT_DYNAMIC_RAM)
132
-          uint8_t *isDir;
133
-        #elif ENABLED(SDSORT_CACHE_NAMES) || DISABLED(SDSORT_USES_STACK)
134
-          uint8_t isDir[(SDSORT_LIMIT+7)>>3];
135
-        #endif
136
-      #endif
137
-
138
-    #endif // SDSORT_USES_RAM
139
-
140
-  #endif // SDCARD_SORT_ALPHA
141
-
142
-  Sd2Card card;
143
-  SdVolume volume;
144
-  SdFile file;
145
-
146
-  #define SD_PROCEDURE_DEPTH 1
147
-  #define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1)
148
-  uint8_t file_subcall_ctr;
149
-  uint32_t filespos[SD_PROCEDURE_DEPTH];
150
-  char proc_filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
151
-  uint32_t filesize;
152
-  uint32_t sdpos;
153
-
154
-  millis_t next_autostart_ms;
155
-  bool autostart_stilltocheck; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
156
-
157
-  LsAction lsAction; //stored for recursion.
158
-  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.
159
-  char* diveDirName;
160
-  void lsDive(const char *prepend, SdFile parent, const char * const match=NULL);
161
-
162
-  #if ENABLED(SDCARD_SORT_ALPHA)
163
-    void flush_presort();
164
-  #endif
165
-};
166
-
167
-extern CardReader card;
168
-
169
-#define IS_SD_PRINTING (card.sdprinting)
170
-#define IS_SD_FILE_OPEN (card.isFileOpen())
171
-
172
-#if PIN_EXISTS(SD_DETECT)
173
-  #if ENABLED(SD_DETECT_INVERTED)
174
-    #define IS_SD_INSERTED (READ(SD_DETECT_PIN) != 0)
175
-  #else
176
-    #define IS_SD_INSERTED (READ(SD_DETECT_PIN) == 0)
177
-  #endif
178
-#else
179
-  //No card detect line? Assume the card is inserted.
180
-  #define IS_SD_INSERTED true
181
-#endif
182
-
183
-#else
184
-
185
-#define IS_SD_PRINTING (false)
186
-#define IS_SD_FILE_OPEN (false)
187
-
188
-#endif // SDSUPPORT
189
-
190
-#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
- 1852
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(bool forReplay=false);
56
-    #else
57
-      FORCE_INLINE
58
-      static void report(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
- 514
Marlin/dogm_bitmaps.h View File

@@ -1,514 +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
-    #define START_BMPBYTEWIDTH   14
42
-    #define START_BMPBYTES      532 // START_BMPWIDTH * START_BMPHEIGHT / 8
43
-
44
-    const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
45
-      0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
46
-      0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
47
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF,
48
-      0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF,
49
-      0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF,
50
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
51
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF,
52
-      0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x3F, 0xFF,
53
-      0xC0, 0x0F, 0xC0, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x00, 0x1F, 0xFF,
54
-      0xC0, 0x3F, 0xE1, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x0F, 0xFF,
55
-      0xC0, 0x7F, 0xF3, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x07, 0xFF,
56
-      0xC0, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x03, 0xFF,
57
-      0xC1, 0xF8, 0x7F, 0x87, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xFF,
58
-      0xC1, 0xF0, 0x3F, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xFF,
59
-      0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x1F, 0x00, 0x03, 0xE0, 0x78, 0x3C, 0x03, 0xF0, 0x7F,
60
-      0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0xC0, 0x0F, 0xF8, 0x78, 0x3C, 0x07, 0xFC, 0x3F,
61
-      0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0xE0, 0x1F, 0xFC, 0x78, 0x3C, 0x0F, 0xFE, 0x1F,
62
-      0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0xF0, 0x3F, 0xFE, 0x78, 0x3C, 0x1F, 0xFE, 0x0F,
63
-      0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xF3, 0xF8, 0x3F, 0x3E, 0x78, 0x3C, 0x3F, 0x3F, 0x07,
64
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xE0, 0xFC, 0x7C, 0x1F, 0x78, 0x3C, 0x3E, 0x1F, 0x07,
65
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x7C, 0x7C, 0x0F, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
66
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x7C, 0x78, 0x0F, 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, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
69
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
70
-      0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03,
71
-      0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xE0, 0x3C, 0x78, 0x00, 0x7C, 0x3C, 0x3C, 0x0F, 0x03,
72
-      0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0x3F, 0xF8, 0x00, 0x7F, 0xBC, 0x3C, 0x0F, 0x03,
73
-      0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0x3F, 0xF8, 0x00, 0x3F, 0xBF, 0xFC, 0x0F, 0x03,
74
-      0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0xFF, 0x3F, 0xF8, 0x00, 0x1F, 0xBF, 0xFC, 0x0F, 0x03,
75
-      0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0x3F, 0xF8, 0x00, 0x0F, 0xBF, 0xFC, 0x0F, 0x03,
76
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
77
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
78
-      0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E,
79
-      0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C,
80
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78,
81
-      0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0,
82
-      0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80 };
83
-  #else
84
-    #define START_BMPWIDTH      56
85
-    #define START_BMPHEIGHT     19
86
-    #define START_BMPBYTEWIDTH  7
87
-    #define START_BMPBYTES      133 // START_BMPWIDTH * START_BMPHEIGHT / 8
88
-
89
-    const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
90
-      0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
91
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF,
92
-      0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
93
-      0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F,
94
-      0x83, 0xCF, 0x00, 0x00, 0x0C, 0x30, 0x3F,
95
-      0x87, 0xFF, 0x80, 0x00, 0x0C, 0x30, 0x1F,
96
-      0x86, 0x79, 0x80, 0x00, 0x0C, 0x00, 0x0F,
97
-      0x8C, 0x30, 0xC7, 0x83, 0x8C, 0x30, 0xE7,
98
-      0x8C, 0x30, 0xCF, 0xC7, 0xCC, 0x31, 0xF3,
99
-      0x8C, 0x30, 0xDC, 0xEC, 0xEC, 0x33, 0xB9,
100
-      0x8C, 0x30, 0xD8, 0x6C, 0x6C, 0x33, 0x19,
101
-      0x8C, 0x30, 0xD0, 0x6C, 0x0C, 0x33, 0x19,
102
-      0x8C, 0x30, 0xD8, 0x6C, 0x0C, 0x33, 0x19,
103
-      0x8C, 0x30, 0xDC, 0x6C, 0x0E, 0x3B, 0x19,
104
-      0x8C, 0x30, 0xCF, 0x7C, 0x07, 0x9F, 0x19,
105
-      0x8C, 0x30, 0xC7, 0x7C, 0x03, 0x8F, 0x19,
106
-      0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
107
-      0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
108
-      0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8 };
109
-  #endif
110
-#endif
111
-
112
-// Here comes a compile-time operation to match the extruder symbols
113
-// on the info screen to the set number of extruders in configuration.h
114
-//
115
-// When only one extruder is selected, the "1" on the symbol will not
116
-// be displayed.
117
-
118
-#if HAS_TEMP_BED
119
-  #if HOTENDS == 1
120
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
121
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
122
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
123
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
124
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
125
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
126
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
127
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
128
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
129
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
130
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
131
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
132
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
133
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
134
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
135
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
136
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
137
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
138
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
139
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
140
-      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
141
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
142
-      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
143
-    };
144
-
145
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
146
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
147
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
148
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
149
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
150
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
151
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
152
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
153
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
154
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
155
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
156
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
157
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
158
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
159
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
160
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
161
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
162
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
163
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
164
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
165
-      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
166
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
167
-      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
168
-    };
169
-  #elif HOTENDS == 2
170
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
171
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
172
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
173
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
174
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
175
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
176
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
177
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
178
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
179
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
180
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
181
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
182
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
183
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
184
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
185
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
186
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
187
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
188
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
189
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
190
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
191
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
192
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
193
-    };
194
-
195
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
196
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
197
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
198
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
199
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
200
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
201
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
202
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
203
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
204
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
205
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
206
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
207
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
208
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
209
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
210
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
211
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
212
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
213
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
214
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
215
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
216
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
217
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
218
-    };
219
-  #else
220
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
221
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
222
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
223
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
224
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
225
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
226
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
227
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
228
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
229
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
230
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
231
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
232
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
233
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20,
234
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20,
235
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0,
236
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0,
237
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20,
238
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20,
239
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60,
240
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
241
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
242
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
243
-    };
244
-
245
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
246
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
247
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
248
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
249
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
250
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
251
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
252
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
253
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
254
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
255
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
256
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
257
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
258
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0,
259
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0,
260
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0,
261
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20,
262
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20,
263
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20,
264
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60,
265
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
266
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0,
267
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00
268
-    };
269
-  #endif // Extruders
270
-#else
271
-  #if HOTENDS == 1
272
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
273
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
274
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
275
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
276
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
277
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
278
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
279
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
280
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
281
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
282
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
283
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
284
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
285
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
286
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
287
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
288
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
289
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
290
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
291
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
292
-      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
293
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
294
-      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
295
-    };
296
-
297
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
298
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
299
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
300
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
301
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
302
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
303
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
304
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 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, 0x60, 0x20,
307
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
308
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
309
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
310
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
311
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
312
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
313
-      0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
314
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
315
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
316
-      0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
317
-      0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
318
-      0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
319
-      0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
320
-    };
321
-  #elif HOTENDS == 2
322
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
323
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
324
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
325
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
326
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
327
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
328
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
329
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
330
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
331
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
332
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
333
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
334
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
335
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
336
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
337
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
338
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
339
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
340
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
341
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
342
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
343
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
344
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
345
-    };
346
-
347
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
348
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
349
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
350
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
351
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
352
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
353
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
354
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
355
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
356
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
357
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
358
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
359
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
360
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
361
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
362
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
363
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
364
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
365
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
366
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
367
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
368
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
369
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
370
-    };
371
-  #else
372
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
373
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
374
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
375
-    const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR
376
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
377
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
378
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
379
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
380
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
381
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
382
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
383
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
384
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
385
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
386
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
387
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0,
388
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0,
389
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20,
390
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20,
391
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60,
392
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
393
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
394
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
395
-    };
396
-
397
-    #define STATUS_SCREENWIDTH     115 //Width in pixels
398
-    #define STATUS_SCREENHEIGHT     19 //Height in pixels
399
-    #define STATUS_SCREENBYTEWIDTH  15 //Width in bytes
400
-    const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR
401
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
402
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
403
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
404
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
405
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
406
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
407
-      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
408
-      0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
409
-      0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
410
-      0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0,
411
-      0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0,
412
-      0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0,
413
-      0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20,
414
-      0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20,
415
-      0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20,
416
-      0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60,
417
-      0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0,
418
-      0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
419
-      0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
420
-    };
421
-  #endif // Extruders
422
-
423
-  #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
424
-    const unsigned char cw_bmp[] PROGMEM = { //AVR-GCC, WinAVR
425
-      0x07,0xf8,0x00, // 000001111111100000000000
426
-      0x0c,0x0c,0x00, // 000011000000110000000000
427
-      0x10,0x02,0x00, // 000100000000001000000000
428
-      0x20,0x01,0x00, // 001000000000000100000000
429
-      0x60,0x01,0x80, // 011000000000000100000000
430
-      0x40,0x00,0x80, // 010000000000000010000000
431
-      0x40,0x03,0xe0, // 010000000000000011100000
432
-      0x40,0x01,0xc0, // 010000000000000011000000
433
-      0x40,0x00,0x80, // 010000000000000010000000
434
-      0x40,0x00,0x00, // 010000000000000000000000
435
-      0x40,0x00,0x00, // 010000000000000000000000
436
-      0x60,0x00,0x00, // 011000000000000000000000
437
-      0x20,0x00,0x00, // 001000000000000000000000
438
-      0x10,0x00,0x00, // 000100000000000000000000
439
-      0x0c,0x0c,0x00, // 000011000000110000000000
440
-      0x07,0xf8,0x00  // 000001111111100000000000
441
-    };
442
-
443
-    const unsigned char ccw_bmp[] PROGMEM = { //AVR-GCC, WinAVR
444
-      0x01,0xfe,0x00, // 000000011111111000000000
445
-      0x03,0x03,0x00, // 000000110000001100000000
446
-      0x04,0x00,0x80, // 000001000000000010000000
447
-      0x08,0x00,0x40, // 000010000000000001000000
448
-      0x18,0x00,0x60, // 000110000000000001100000
449
-      0x10,0x00,0x20, // 000100000000000000100000
450
-      0x7c,0x00,0x20, // 011111000000000000100000
451
-      0x38,0x00,0x20, // 001110000000000000100000
452
-      0x10,0x00,0x20, // 000100000000000000100000
453
-      0x00,0x00,0x20, // 000000000000000000100000
454
-      0x00,0x00,0x20, // 000000000000000000100000
455
-      0x00,0x00,0x60, // 000000000000000001100000
456
-      0x00,0x00,0x40, // 000000000000000001000000
457
-      0x00,0x00,0x80, // 000000000000000010000000
458
-      0x03,0x03,0x00, // 000000110000001100000000
459
-      0x01,0xfe,0x00  // 000000011111111000000000
460
-    };
461
-
462
-
463
-    const unsigned char up_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR
464
-      0x06,0x00, // 000001100000
465
-      0x0F,0x00, // 000011110000
466
-      0x1F,0x80, // 000111111000
467
-      0x3F,0xC0, // 001111111100
468
-      0x06,0x00, // 000001100000
469
-      0x06,0x00, // 000001100000
470
-      0x06,0x00, // 000001100000
471
-      0x06,0x00, // 000001100000
472
-      0x06,0x00, // 000001100000
473
-      0x06,0x00, // 000001100000
474
-      0x06,0x00, // 000001100000
475
-      0x06,0x00, // 000001100000
476
-      0x06,0x00  // 000001100000
477
-    };
478
-
479
-    const unsigned char down_arrow_bmp[] PROGMEM = { //AVR-GCC, WinAVR
480
-      0x06,0x00, // 000001100000
481
-      0x06,0x00, // 000001100000
482
-      0x06,0x00, // 000001100000
483
-      0x06,0x00, // 000001100000
484
-      0x06,0x00, // 000001100000
485
-      0x06,0x00, // 000001100000
486
-      0x06,0x00, // 000001100000
487
-      0x06,0x00, // 000001100000
488
-      0x06,0x00, // 000001100000
489
-      0x3F,0xC0, // 001111111100
490
-      0x1F,0x80, // 000111111000
491
-      0x0F,0x00, // 000011110000
492
-      0x06,0x00  // 000001100000
493
-    };
494
-
495
-    const unsigned char offset_bedline_bmp[] PROGMEM = { //AVR-GCC, WinAVR
496
-      0xFF,0xFF,0xFF // 111111111111111111111111
497
-    };
498
-
499
-    const unsigned char nozzle_bmp[] PROGMEM = { //AVR-GCC, WinAVR
500
-      0x7F,0x80, // 0111111110000000
501
-      0xFF,0xC0, // 1111111111000000
502
-      0xFF,0xC0, // 1111111111000000
503
-      0xFF,0xC0, // 1111111111000000
504
-      0x7F,0x80, // 0111111110000000
505
-      0x7F,0x80, // 0111111110000000
506
-      0xFF,0xC0, // 1111111111000000
507
-      0xFF,0xC0, // 1111111111000000
508
-      0xFF,0xC0, // 1111111111000000
509
-      0x3F,0x00, // 0011111100000000
510
-      0x1E,0x00, // 0001111000000000
511
-      0x0C,0x00  // 0000110000000000
512
-    };
513
-  #endif // BABYSTEP_ZPROBE_GFX_OVERLAY
514
-#endif // HAS_TEMP_BED

+ 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
- 198
Marlin/dogm_font_data_ISO10646_1.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
-/**
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
-const u8g_fntpgm_uint8_t ISO10646_1_5x7[2592] U8G_SECTION(".progmem.ISO10646_1_5x7") = {
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, 7, 7, 6, 0, 0, 112, 72, 72, 232, 72, 72, 112, 5, 8,
158
-  8, 6, 0, 0, 104, 144, 0, 136, 200, 168, 152, 136, 5, 8, 8, 6,
159
-  0, 0, 64, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0,
160
-  16, 32, 112, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80,
161
-  0, 112, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 112,
162
-  136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 112, 136, 136, 136,
163
-  136, 112, 5, 5, 5, 6, 0, 1, 136, 80, 32, 80, 136, 5, 8, 8,
164
-  6, 0, 255, 16, 112, 168, 168, 168, 168, 112, 64, 5, 8, 8, 6, 0,
165
-  0, 64, 32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 16,
166
-  32, 136, 136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0,
167
-  136, 136, 136, 136, 112, 5, 8, 8, 6, 0, 0, 80, 0, 136, 136, 136,
168
-  136, 136, 112, 5, 8, 8, 6, 0, 0, 16, 32, 136, 80, 32, 32, 32,
169
-  32, 5, 9, 9, 6, 0, 255, 192, 64, 112, 72, 72, 112, 64, 64, 224,
170
-  4, 8, 8, 6, 1, 255, 96, 144, 144, 160, 144, 144, 224, 128, 5, 8,
171
-  8, 6, 0, 0, 64, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6,
172
-  0, 0, 16, 32, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0,
173
-  32, 80, 0, 112, 8, 120, 136, 120, 5, 8, 8, 6, 0, 0, 104, 144,
174
-  0, 112, 8, 120, 136, 120, 5, 7, 7, 6, 0, 0, 80, 0, 112, 8,
175
-  120, 136, 120, 5, 8, 8, 6, 0, 0, 32, 80, 32, 112, 8, 120, 136,
176
-  120, 5, 6, 6, 6, 0, 0, 208, 40, 120, 160, 168, 80, 5, 6, 6,
177
-  6, 0, 255, 112, 128, 136, 112, 32, 96, 5, 8, 8, 6, 0, 0, 64,
178
-  32, 0, 112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 16, 32, 0,
179
-  112, 136, 248, 128, 112, 5, 8, 8, 6, 0, 0, 32, 80, 0, 112, 136,
180
-  248, 128, 112, 5, 7, 7, 6, 0, 0, 80, 0, 112, 136, 248, 128, 112,
181
-  3, 8, 8, 6, 1, 0, 128, 64, 0, 64, 192, 64, 64, 224, 3, 8,
182
-  8, 6, 1, 0, 32, 64, 0, 64, 192, 64, 64, 224, 3, 8, 8, 6,
183
-  1, 0, 64, 160, 0, 64, 192, 64, 64, 224, 3, 7, 7, 6, 1, 0,
184
-  160, 0, 64, 192, 64, 64, 224, 5, 7, 7, 6, 0, 0, 160, 64, 160,
185
-  16, 120, 136, 112, 5, 8, 8, 6, 0, 0, 104, 144, 0, 176, 200, 136,
186
-  136, 136, 5, 8, 8, 6, 0, 0, 64, 32, 0, 112, 136, 136, 136, 112,
187
-  5, 8, 8, 6, 0, 0, 16, 32, 0, 112, 136, 136, 136, 112, 5, 8,
188
-  8, 6, 0, 0, 32, 80, 0, 112, 136, 136, 136, 112, 5, 8, 8, 6,
189
-  0, 0, 104, 144, 0, 112, 136, 136, 136, 112, 5, 7, 7, 6, 0, 0,
190
-  80, 0, 112, 136, 136, 136, 112, 5, 5, 5, 6, 0, 1, 32, 0, 248,
191
-  0, 32, 5, 7, 7, 6, 0, 255, 16, 112, 168, 168, 168, 112, 64, 5,
192
-  8, 8, 6, 0, 0, 64, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8,
193
-  6, 0, 0, 16, 32, 0, 136, 136, 136, 152, 104, 5, 8, 8, 6, 0,
194
-  0, 32, 80, 0, 136, 136, 136, 152, 104, 5, 7, 7, 6, 0, 0, 80,
195
-  0, 136, 136, 136, 152, 104, 5, 9, 9, 6, 0, 255, 16, 32, 0, 136,
196
-  136, 136, 248, 8, 112, 4, 7, 7, 6, 1, 255, 192, 64, 96, 80, 96,
197
-  64, 224, 5, 8, 8, 6, 0, 255, 80, 0, 136, 136, 136, 120, 8, 112
198
-};

+ 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
- 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
- 206
Marlin/endstop_interrupts.h View File

@@ -1,206 +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_Z2_MAX
174
-    #if (digitalPinToInterrupt(Z2_MAX_PIN) != NOT_AN_INTERRUPT)
175
-      attachInterrupt(digitalPinToInterrupt(Z2_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(Z2_MAX_PIN) != NULL, "Z2_MAX_PIN is not interrupt-capable");
179
-      pciSetup(Z2_MAX_PIN);
180
-    #endif
181
-  #endif
182
-
183
-  #if HAS_Z2_MIN
184
-    #if (digitalPinToInterrupt(Z2_MIN_PIN) != NOT_AN_INTERRUPT)
185
-      attachInterrupt(digitalPinToInterrupt(Z2_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(Z2_MIN_PIN) != NULL, "Z2_MIN_PIN is not interrupt-capable");
189
-      pciSetup(Z2_MIN_PIN);
190
-    #endif
191
-  #endif
192
-
193
-  #if HAS_Z_MIN_PROBE_PIN
194
-    #if (digitalPinToInterrupt(Z_MIN_PROBE_PIN) != NOT_AN_INTERRUPT)
195
-      attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_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(Z_MIN_PROBE_PIN) != NULL, "Z_MIN_PROBE_PIN is not interrupt-capable");
199
-      pciSetup(Z_MIN_PROBE_PIN);
200
-    #endif
201
-  #endif
202
-
203
-  // If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
204
-}
205
-
206
-#endif // _ENDSTOP_INTERRUPTS_H_

+ 0
- 451
Marlin/endstops.cpp View File

@@ -1,451 +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(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_Y_MIN
71
-    #if ENABLED(ENDSTOPPULLUP_YMIN)
72
-      SET_INPUT_PULLUP(Y_MIN_PIN);
73
-    #else
74
-      SET_INPUT(Y_MIN_PIN);
75
-    #endif
76
-  #endif
77
-
78
-  #if HAS_Z_MIN
79
-    #if ENABLED(ENDSTOPPULLUP_ZMIN)
80
-      SET_INPUT_PULLUP(Z_MIN_PIN);
81
-    #else
82
-      SET_INPUT(Z_MIN_PIN);
83
-    #endif
84
-  #endif
85
-
86
-  #if HAS_Z2_MIN
87
-    #if ENABLED(ENDSTOPPULLUP_ZMIN)
88
-      SET_INPUT_PULLUP(Z2_MIN_PIN);
89
-    #else
90
-      SET_INPUT(Z2_MIN_PIN);
91
-    #endif
92
-  #endif
93
-
94
-  #if HAS_X_MAX
95
-    #if ENABLED(ENDSTOPPULLUP_XMAX)
96
-      SET_INPUT_PULLUP(X_MAX_PIN);
97
-    #else
98
-      SET_INPUT(X_MAX_PIN);
99
-    #endif
100
-  #endif
101
-
102
-  #if HAS_Y_MAX
103
-    #if ENABLED(ENDSTOPPULLUP_YMAX)
104
-      SET_INPUT_PULLUP(Y_MAX_PIN);
105
-    #else
106
-      SET_INPUT(Y_MAX_PIN);
107
-    #endif
108
-  #endif
109
-
110
-  #if HAS_Z_MAX
111
-    #if ENABLED(ENDSTOPPULLUP_ZMAX)
112
-      SET_INPUT_PULLUP(Z_MAX_PIN);
113
-    #else
114
-      SET_INPUT(Z_MAX_PIN);
115
-    #endif
116
-  #endif
117
-
118
-  #if HAS_Z2_MAX
119
-    #if ENABLED(ENDSTOPPULLUP_ZMAX)
120
-      SET_INPUT_PULLUP(Z2_MAX_PIN);
121
-    #else
122
-      SET_INPUT(Z2_MAX_PIN);
123
-    #endif
124
-  #endif
125
-
126
-  #if ENABLED(Z_MIN_PROBE_ENDSTOP)
127
-    #if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)
128
-      SET_INPUT_PULLUP(Z_MIN_PROBE_PIN);
129
-    #else
130
-      SET_INPUT(Z_MIN_PROBE_PIN);
131
-    #endif
132
-  #endif
133
-
134
-} // Endstops::init
135
-
136
-void Endstops::report_state() {
137
-  if (endstop_hit_bits) {
138
-    #if ENABLED(ULTRA_LCD)
139
-      char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' ';
140
-      #define _SET_STOP_CHAR(A,C) (chr## A = C)
141
-    #else
142
-      #define _SET_STOP_CHAR(A,C) ;
143
-    #endif
144
-
145
-    #define _ENDSTOP_HIT_ECHO(A,C) do{ \
146
-      SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", stepper.triggered_position_mm(A ##_AXIS)); \
147
-      _SET_STOP_CHAR(A,C); }while(0)
148
-
149
-    #define _ENDSTOP_HIT_TEST(A,C) \
150
-      if (TEST(endstop_hit_bits, A ##_MIN) || TEST(endstop_hit_bits, A ##_MAX)) \
151
-        _ENDSTOP_HIT_ECHO(A,C)
152
-
153
-    #define ENDSTOP_HIT_TEST_X() _ENDSTOP_HIT_TEST(X,'X')
154
-    #define ENDSTOP_HIT_TEST_Y() _ENDSTOP_HIT_TEST(Y,'Y')
155
-    #define ENDSTOP_HIT_TEST_Z() _ENDSTOP_HIT_TEST(Z,'Z')
156
-
157
-    SERIAL_ECHO_START();
158
-    SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
159
-    ENDSTOP_HIT_TEST_X();
160
-    ENDSTOP_HIT_TEST_Y();
161
-    ENDSTOP_HIT_TEST_Z();
162
-
163
-    #if ENABLED(Z_MIN_PROBE_ENDSTOP)
164
-      #define P_AXIS Z_AXIS
165
-      if (TEST(endstop_hit_bits, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P');
166
-    #endif
167
-    SERIAL_EOL();
168
-
169
-    #if ENABLED(ULTRA_LCD)
170
-      lcd_status_printf_P(0, PSTR(MSG_LCD_ENDSTOPS " %c %c %c %c"), chrX, chrY, chrZ, chrP);
171
-    #endif
172
-
173
-    hit_on_purpose();
174
-
175
-    #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT)
176
-      if (stepper.abort_on_endstop_hit) {
177
-        card.sdprinting = false;
178
-        card.closefile();
179
-        quickstop_stepper();
180
-        thermalManager.disable_all_heaters(); // switch off all heaters.
181
-      }
182
-    #endif
183
-  }
184
-} // Endstops::report_state
185
-
186
-void Endstops::M119() {
187
-  SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT);
188
-  #if HAS_X_MIN
189
-    SERIAL_PROTOCOLPGM(MSG_X_MIN);
190
-    SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
191
-  #endif
192
-  #if HAS_X_MAX
193
-    SERIAL_PROTOCOLPGM(MSG_X_MAX);
194
-    SERIAL_PROTOCOLLN(((READ(X_MAX_PIN)^X_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
195
-  #endif
196
-  #if HAS_Y_MIN
197
-    SERIAL_PROTOCOLPGM(MSG_Y_MIN);
198
-    SERIAL_PROTOCOLLN(((READ(Y_MIN_PIN)^Y_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
199
-  #endif
200
-  #if HAS_Y_MAX
201
-    SERIAL_PROTOCOLPGM(MSG_Y_MAX);
202
-    SERIAL_PROTOCOLLN(((READ(Y_MAX_PIN)^Y_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
203
-  #endif
204
-  #if HAS_Z_MIN
205
-    SERIAL_PROTOCOLPGM(MSG_Z_MIN);
206
-    SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
207
-  #endif
208
-  #if HAS_Z2_MIN
209
-    SERIAL_PROTOCOLPGM(MSG_Z2_MIN);
210
-    SERIAL_PROTOCOLLN(((READ(Z2_MIN_PIN)^Z2_MIN_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
211
-  #endif
212
-  #if HAS_Z_MAX
213
-    SERIAL_PROTOCOLPGM(MSG_Z_MAX);
214
-    SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
215
-  #endif
216
-  #if HAS_Z2_MAX
217
-    SERIAL_PROTOCOLPGM(MSG_Z2_MAX);
218
-    SERIAL_PROTOCOLLN(((READ(Z2_MAX_PIN)^Z2_MAX_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
219
-  #endif
220
-  #if ENABLED(Z_MIN_PROBE_ENDSTOP)
221
-    SERIAL_PROTOCOLPGM(MSG_Z_PROBE);
222
-    SERIAL_PROTOCOLLN(((READ(Z_MIN_PROBE_PIN)^Z_MIN_PROBE_ENDSTOP_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
223
-  #endif
224
-  #if ENABLED(FILAMENT_RUNOUT_SENSOR)
225
-    SERIAL_PROTOCOLPGM(MSG_FILAMENT_RUNOUT_SENSOR);
226
-    SERIAL_PROTOCOLLN(((READ(FIL_RUNOUT_PIN)^FIL_RUNOUT_INVERTING) ? MSG_ENDSTOP_HIT : MSG_ENDSTOP_OPEN));
227
-  #endif
228
-} // Endstops::M119
229
-
230
-#if ENABLED(Z_DUAL_ENDSTOPS)
231
-
232
-  // Pass the result of the endstop test
233
-  void Endstops::test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2) {
234
-    byte z_test = TEST_ENDSTOP(es1) | (TEST_ENDSTOP(es2) << 1); // bit 0 for Z, bit 1 for Z2
235
-    if (z_test && stepper.current_block->steps[Z_AXIS] > 0) {
236
-      SBI(endstop_hit_bits, Z_MIN);
237
-      if (!stepper.performing_homing || (z_test == 0x3))  //if not performing home or if both endstops were trigged during homing...
238
-        stepper.kill_current_block();
239
-    }
240
-  }
241
-
242
-#endif
243
-
244
-// Check endstops - Called from ISR!
245
-void Endstops::update() {
246
-
247
-  #define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX
248
-  #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN
249
-  #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING
250
-  #define _ENDSTOP_HIT(AXIS, MINMAX) SBI(endstop_hit_bits, _ENDSTOP(AXIS, MINMAX))
251
-
252
-  // UPDATE_ENDSTOP_BIT: set the current endstop bits for an endstop to its status
253
-  #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT(current_endstop_bits, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
254
-  // COPY_BIT: copy the value of SRC_BIT to DST_BIT in DST
255
-  #define COPY_BIT(DST, SRC_BIT, DST_BIT) SET_BIT(DST, DST_BIT, TEST(DST, SRC_BIT))
256
-
257
-  #define UPDATE_ENDSTOP(AXIS,MINMAX) do { \
258
-      UPDATE_ENDSTOP_BIT(AXIS, MINMAX); \
259
-      if (TEST_ENDSTOP(_ENDSTOP(AXIS, MINMAX)) && stepper.current_block->steps[_AXIS(AXIS)] > 0) { \
260
-        _ENDSTOP_HIT(AXIS, MINMAX); \
261
-        stepper.endstop_triggered(_AXIS(AXIS)); \
262
-      } \
263
-    } while(0)
264
-
265
-  #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && !(CORE_IS_XY || CORE_IS_XZ)
266
-    // If G38 command is active check Z_MIN_PROBE for ALL movement
267
-    if (G38_move) {
268
-      UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
269
-      if (TEST_ENDSTOP(_ENDSTOP(Z, MIN_PROBE))) {
270
-        if      (stepper.current_block->steps[_AXIS(X)] > 0) { _ENDSTOP_HIT(X, MIN); stepper.endstop_triggered(_AXIS(X)); }
271
-        else if (stepper.current_block->steps[_AXIS(Y)] > 0) { _ENDSTOP_HIT(Y, MIN); stepper.endstop_triggered(_AXIS(Y)); }
272
-        else if (stepper.current_block->steps[_AXIS(Z)] > 0) { _ENDSTOP_HIT(Z, MIN); stepper.endstop_triggered(_AXIS(Z)); }
273
-        G38_endstop_hit = true;
274
-      }
275
-    }
276
-  #endif
277
-
278
-  /**
279
-   * Define conditions for checking endstops
280
-   */
281
-
282
-  #if IS_CORE
283
-    #define S_(N) stepper.current_block->steps[CORE_AXIS_##N]
284
-    #define D_(N) stepper.motor_direction(CORE_AXIS_##N)
285
-  #endif
286
-
287
-  #if CORE_IS_XY || CORE_IS_XZ
288
-    /**
289
-     * Head direction in -X axis for CoreXY and CoreXZ bots.
290
-     *
291
-     * If steps differ, both axes are moving.
292
-     * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z, handled below)
293
-     * If DeltaA ==  DeltaB, the movement is only in the 1st axis (X)
294
-     */
295
-    #if ENABLED(COREXY) || ENABLED(COREXZ)
296
-      #define X_CMP ==
297
-    #else
298
-      #define X_CMP !=
299
-    #endif
300
-    #define X_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && D_(1) X_CMP D_(2)) )
301
-    #define X_AXIS_HEAD X_HEAD
302
-  #else
303
-    #define X_MOVE_TEST stepper.current_block->steps[X_AXIS] > 0
304
-    #define X_AXIS_HEAD X_AXIS
305
-  #endif
306
-
307
-  #if CORE_IS_XY || CORE_IS_YZ
308
-    /**
309
-     * Head direction in -Y axis for CoreXY / CoreYZ bots.
310
-     *
311
-     * If steps differ, both axes are moving
312
-     * If DeltaA ==  DeltaB, the movement is only in the 1st axis (X or Y)
313
-     * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Y or Z)
314
-     */
315
-    #if ENABLED(COREYX) || ENABLED(COREYZ)
316
-      #define Y_CMP ==
317
-    #else
318
-      #define Y_CMP !=
319
-    #endif
320
-    #define Y_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && D_(1) Y_CMP D_(2)) )
321
-    #define Y_AXIS_HEAD Y_HEAD
322
-  #else
323
-    #define Y_MOVE_TEST stepper.current_block->steps[Y_AXIS] > 0
324
-    #define Y_AXIS_HEAD Y_AXIS
325
-  #endif
326
-
327
-  #if CORE_IS_XZ || CORE_IS_YZ
328
-    /**
329
-     * Head direction in -Z axis for CoreXZ or CoreYZ bots.
330
-     *
331
-     * If steps differ, both axes are moving
332
-     * If DeltaA ==  DeltaB, the movement is only in the 1st axis (X or Y, already handled above)
333
-     * If DeltaA == -DeltaB, the movement is only in the 2nd axis (Z)
334
-     */
335
-    #if ENABLED(COREZX) || ENABLED(COREZY)
336
-      #define Z_CMP ==
337
-    #else
338
-      #define Z_CMP !=
339
-    #endif
340
-    #define Z_MOVE_TEST ( S_(1) != S_(2) || (S_(1) > 0 && D_(1) Z_CMP D_(2)) )
341
-    #define Z_AXIS_HEAD Z_HEAD
342
-  #else
343
-    #define Z_MOVE_TEST stepper.current_block->steps[Z_AXIS] > 0
344
-    #define Z_AXIS_HEAD Z_AXIS
345
-  #endif
346
-
347
-  // With Dual X, endstops are only checked in the homing direction for the active extruder
348
-  #if ENABLED(DUAL_X_CARRIAGE)
349
-    #define E0_ACTIVE stepper.current_block->active_extruder == 0
350
-    #define X_MIN_TEST ((X_HOME_DIR < 0 && E0_ACTIVE) || (X2_HOME_DIR < 0 && !E0_ACTIVE))
351
-    #define X_MAX_TEST ((X_HOME_DIR > 0 && E0_ACTIVE) || (X2_HOME_DIR > 0 && !E0_ACTIVE))
352
-  #else
353
-    #define X_MIN_TEST true
354
-    #define X_MAX_TEST true
355
-  #endif
356
-
357
-  /**
358
-   * Check and update endstops according to conditions
359
-   */
360
-
361
-  if (X_MOVE_TEST) {
362
-    if (stepper.motor_direction(X_AXIS_HEAD)) {
363
-      if (X_MIN_TEST) { // -direction
364
-        #if HAS_X_MIN
365
-          UPDATE_ENDSTOP(X, MIN);
366
-        #endif
367
-      }
368
-    }
369
-    else if (X_MAX_TEST) { // +direction
370
-      #if HAS_X_MAX
371
-        UPDATE_ENDSTOP(X, MAX);
372
-      #endif
373
-    }
374
-  }
375
-
376
-  if (Y_MOVE_TEST) {
377
-    if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction
378
-      #if HAS_Y_MIN
379
-        UPDATE_ENDSTOP(Y, MIN);
380
-      #endif
381
-    }
382
-    else { // +direction
383
-      #if HAS_Y_MAX
384
-        UPDATE_ENDSTOP(Y, MAX);
385
-      #endif
386
-    }
387
-  }
388
-
389
-  if (Z_MOVE_TEST) {
390
-    if (stepper.motor_direction(Z_AXIS_HEAD)) { // Z -direction. Gantry down, bed up.
391
-      #if HAS_Z_MIN
392
-        #if ENABLED(Z_DUAL_ENDSTOPS)
393
-
394
-          UPDATE_ENDSTOP_BIT(Z, MIN);
395
-          #if HAS_Z2_MIN
396
-            UPDATE_ENDSTOP_BIT(Z2, MIN);
397
-          #else
398
-            COPY_BIT(current_endstop_bits, Z_MIN, Z2_MIN);
399
-          #endif
400
-
401
-          test_dual_z_endstops(Z_MIN, Z2_MIN);
402
-
403
-        #else // !Z_DUAL_ENDSTOPS
404
-
405
-          #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
406
-            if (z_probe_enabled) UPDATE_ENDSTOP(Z, MIN);
407
-          #else
408
-            UPDATE_ENDSTOP(Z, MIN);
409
-          #endif
410
-
411
-        #endif // !Z_DUAL_ENDSTOPS
412
-
413
-      #endif // HAS_Z_MIN
414
-
415
-      // When closing the gap check the enabled probe
416
-      #if ENABLED(Z_MIN_PROBE_ENDSTOP)
417
-        if (z_probe_enabled) {
418
-          UPDATE_ENDSTOP(Z, MIN_PROBE);
419
-          if (TEST_ENDSTOP(Z_MIN_PROBE)) SBI(endstop_hit_bits, Z_MIN_PROBE);
420
-        }
421
-      #endif
422
-    }
423
-    else { // Z +direction. Gantry up, bed down.
424
-      #if HAS_Z_MAX
425
-
426
-        // Check both Z dual endstops
427
-        #if ENABLED(Z_DUAL_ENDSTOPS)
428
-
429
-          UPDATE_ENDSTOP_BIT(Z, MAX);
430
-          #if HAS_Z2_MAX
431
-            UPDATE_ENDSTOP_BIT(Z2, MAX);
432
-          #else
433
-            COPY_BIT(current_endstop_bits, Z_MAX, Z2_MAX);
434
-          #endif
435
-
436
-          test_dual_z_endstops(Z_MAX, Z2_MAX);
437
-
438
-        // If this pin is not hijacked for the bed probe
439
-        // then it belongs to the Z endstop
440
-        #elif DISABLED(Z_MIN_PROBE_ENDSTOP) || Z_MAX_PIN != Z_MIN_PROBE_PIN
441
-
442
-          UPDATE_ENDSTOP(Z, MAX);
443
-
444
-        #endif // !Z_MIN_PROBE_PIN...
445
-      #endif // Z_MAX_PIN
446
-    }
447
-  }
448
-
449
-  old_endstop_bits = current_endstop_bits;
450
-
451
-} // Endstops::update()

+ 0
- 102
Marlin/endstops.h View File

@@ -1,102 +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
-
32
-class Endstops {
33
-
34
-  public:
35
-
36
-    static bool enabled, enabled_globally;
37
-    static volatile char endstop_hit_bits; // use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT value
38
-
39
-    #if ENABLED(Z_DUAL_ENDSTOPS)
40
-      static uint16_t
41
-    #else
42
-      static byte
43
-    #endif
44
-        current_endstop_bits, old_endstop_bits;
45
-
46
-    Endstops() {};
47
-
48
-    /**
49
-     * Initialize the endstop pins
50
-     */
51
-    void init();
52
-
53
-    /**
54
-     * Update the endstops bits from the pins
55
-     */
56
-    static void update();
57
-
58
-    /**
59
-     * Print an error message reporting the position when the endstops were last hit.
60
-     */
61
-    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
62
-
63
-    /**
64
-     * Report endstop positions in response to M119
65
-     */
66
-    static void M119();
67
-
68
-    // Enable / disable endstop checking globally
69
-    static void enable_globally(bool onoff=true) { enabled_globally = enabled = onoff; }
70
-
71
-    // Enable / disable endstop checking
72
-    static void enable(bool onoff=true) { enabled = onoff; }
73
-
74
-    // Disable / Enable endstops based on ENSTOPS_ONLY_FOR_HOMING and global enable
75
-    static void not_homing() { enabled = enabled_globally; }
76
-
77
-    // Clear endstops (i.e., they were hit intentionally) to suppress the report
78
-    static void hit_on_purpose() { endstop_hit_bits = 0; }
79
-
80
-    // Enable / disable endstop z-probe checking
81
-    #if HAS_BED_PROBE
82
-      static volatile bool z_probe_enabled;
83
-      static void enable_z_probe(bool onoff=true) { z_probe_enabled = onoff; }
84
-    #endif
85
-
86
-  private:
87
-
88
-    #if ENABLED(Z_DUAL_ENDSTOPS)
89
-      static void test_dual_z_endstops(const EndstopEnum es1, const EndstopEnum es2);
90
-    #endif
91
-};
92
-
93
-extern Endstops endstops;
94
-
95
-#if HAS_BED_PROBE
96
-  #define ENDSTOPS_ENABLED  (endstops.enabled || endstops.z_probe_enabled)
97
-#else
98
-  #define ENDSTOPS_ENABLED  endstops.enabled
99
-#endif
100
-
101
-
102
-#endif // ENDSTOPS_H

+ 0
- 189
Marlin/enum.h View File

@@ -1,189 +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
-  Z2_MIN,
97
-  Z2_MAX
98
-};
99
-
100
-#if ENABLED(EMERGENCY_PARSER)
101
-  enum e_parser_state {
102
-    state_RESET,
103
-    state_N,
104
-    state_M,
105
-    state_M1,
106
-    state_M10,
107
-    state_M108,
108
-    state_M11,
109
-    state_M112,
110
-    state_M4,
111
-    state_M41,
112
-    state_M410,
113
-    state_IGNORE // to '\n'
114
-  };
115
-#endif
116
-
117
-#if ENABLED(ADVANCED_PAUSE_FEATURE)
118
-  enum AdvancedPauseMenuResponse {
119
-    ADVANCED_PAUSE_RESPONSE_WAIT_FOR,
120
-    ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE,
121
-    ADVANCED_PAUSE_RESPONSE_RESUME_PRINT
122
-  };
123
-
124
-  #if ENABLED(ULTIPANEL)
125
-    enum AdvancedPauseMessage {
126
-      ADVANCED_PAUSE_MESSAGE_INIT,
127
-      ADVANCED_PAUSE_MESSAGE_UNLOAD,
128
-      ADVANCED_PAUSE_MESSAGE_INSERT,
129
-      ADVANCED_PAUSE_MESSAGE_LOAD,
130
-      ADVANCED_PAUSE_MESSAGE_EXTRUDE,
131
-      ADVANCED_PAUSE_MESSAGE_OPTION,
132
-      ADVANCED_PAUSE_MESSAGE_RESUME,
133
-      ADVANCED_PAUSE_MESSAGE_STATUS,
134
-      ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE,
135
-      ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT
136
-    };
137
-  #endif
138
-#endif
139
-
140
-/**
141
- * States for managing Marlin and host communication
142
- * Marlin sends messages if blocked or busy
143
- */
144
-#if ENABLED(HOST_KEEPALIVE_FEATURE)
145
-  enum MarlinBusyState {
146
-    NOT_BUSY,           // Not in a handler
147
-    IN_HANDLER,         // Processing a GCode
148
-    IN_PROCESS,         // Known to be blocking command input (as in G29)
149
-    PAUSED_FOR_USER,    // Blocking pending any input
150
-    PAUSED_FOR_INPUT    // Blocking pending text input (concept)
151
-  };
152
-#endif
153
-
154
-/**
155
- * SD Card
156
- */
157
-enum LsAction { LS_SerialPrint, LS_Count, LS_GetFilename };
158
-
159
-/**
160
- * Ultra LCD
161
- */
162
-enum LCDViewAction {
163
-  LCDVIEW_NONE,
164
-  LCDVIEW_REDRAW_NOW,
165
-  LCDVIEW_CALL_REDRAW_NEXT,
166
-  LCDVIEW_CLEAR_CALL_REDRAW,
167
-  LCDVIEW_CALL_NO_REDRAW
168
-};
169
-
170
-/**
171
- * Dual X Carriage modes. A Dual Nozzle can also do duplication.
172
- */
173
-#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
174
-  enum DualXMode {
175
-    DXC_FULL_CONTROL_MODE,  // DUAL_X_CARRIAGE only
176
-    DXC_AUTO_PARK_MODE,     // DUAL_X_CARRIAGE only
177
-    DXC_DUPLICATION_MODE
178
-  };
179
-#endif
180
-
181
-/**
182
- * Workspace planes only apply to G2/G3 moves
183
- * (and "canned cycles" - not a current feature)
184
- */
185
-#if ENABLED(CNC_WORKSPACE_PLANES)
186
-  enum WorkspacePlane { PLANE_XY, PLANE_ZX, PLANE_YZ };
187
-#endif
188
-
189
-#endif // __ENUM_H__

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


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


+ 0
- 1700
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
- 1859
Marlin/example_configurations/Anet/A6/Configuration.h
File diff suppressed because it is too large
View File


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


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


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


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


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


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


+ 0
- 1424
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
- 1691
Marlin/example_configurations/BQ/WITBOX/Configuration.h
File diff suppressed because it is too large
View File


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


+ 0
- 1699
Marlin/example_configurations/Cartesio/Configuration.h
File diff suppressed because it is too large
View File


+ 0
- 0
Marlin/example_configurations/Cartesio/Configuration_adv.h View File


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

Loading…
Cancel
Save