模板:MicroprocessorDevice

来自百问网嵌入式Linux wiki
Wiki讨论 | 贡献2020年4月10日 (五) 15:37的版本 (创建页面,内容为“<noinclude> ==Usage== The MicroprocessorDevice template is used '''to indicate for which microprocessor device(s), an article part…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

Usage

The MicroprocessorDevice template is used to indicate for which microprocessor device(s), an article part (chapter, paragraph, table...) is valid. Per default (i.e. if this template is not used), any part of an article is valid for all microprocessor devices for which the entire article is valid.

It outputs a "standardized" string that might be used to name an article part.

Usage: {{MicroprocessorDevice | device=<device> | security=<security>}}
Where:
  • <device> is the mandatory identifier that specify the class, the Series, the lines or the line.The possible values are:
    • Class: STM32 Arm® Cortex® MPUs
    • 1: STM32MP1 Series
      • 15: STM32MP15x lines
        • 151: STM32MP151 access line
        • 153: STM32MP153 foundation line
        • 157: STM32MP157 advanced line
  • <security> is the optional identifier (one letter) that specifies the security. The possible values are:
    • A: Basic
    • C: Secure boot and cryptography

Clicking on the More info.png icon displays the article about the microprocessor device lines (e.g. STM32MP15 microprocessor).

Basic examples

You type You get
STM32 Arm® Cortex® MPUs
{{MicroprocessorDevice | device=Class}}

{{#vardefine:info|}}{{#vardefine:dev| Arm® Cortex® MPUs}}{{#vardefine:info| More info.png}}STM32{{#var:dev}}{{#var:info}}

STM32MP1 Series
{{MicroprocessorDevice | device=1}}

{{#vardefine:info|}}{{#vardefine:dev|MP1 Series}}STM32{{#var:dev}}{{#var:info}}

STM32MP15x lines
{{MicroprocessorDevice | device=15}}

{{#vardefine:info|}}{{#vardefine:dev|MP15x lines}}{{#vardefine:info| More info.png}}STM32{{#var:dev}}{{#var:info}}

STM32MP157 line
{{MicroprocessorDevice | device=157}}

{{#vardefine:info|}}{{#vardefine:dev|MP157 line}}{{#vardefine:info| 2}} microprocessor}}STM32{{#var:dev}}{{#var:info}}

STM32MP15x lines with basic security
{{MicroprocessorDevice | device=15 | security=A}}

{{#vardefine:info|}}{{#vardefine:dev|MP15xA lines}}{{#vardefine:info| More info.png}}STM32{{#var:dev}}{{#var:info}}

STM32MP157 line with secure boot and cryptography
{{MicroprocessorDevice | device=157 | security=C}}

{{#vardefine:info|}}{{#vardefine:dev|MP157C line}}{{#vardefine:info| 2}} microprocessor}}STM32{{#var:dev}}{{#var:info}}

More examples

You type You get
Unspecified microprocessor device
{{MicroprocessorDevice}}

{{#vardefine:info|}}{{#vardefine:dev|MP unknown microprocessor device}}STM32{{#var:dev}}{{#var:info}}

Security ignored for class
{{MicroprocessorDevice | device=Class | security=A}}

{{#vardefine:info|}}{{#vardefine:dev| Arm® Cortex® MPUs}}{{#vardefine:info| More info.png}}STM32{{#var:dev}}{{#var:info}}

Security ignored for Series
{{MicroprocessorDevice | device=1 | security=A}}

{{#vardefine:info|}}{{#vardefine:dev|MP1 Series}}STM32{{#var:dev}}{{#var:info}}

Unknown Series
{{MicroprocessorDevice | device=0}}

{{#vardefine:info|}}{{#vardefine:dev|MP0 unknown microprocessor device}}STM32{{#var:dev}}{{#var:info}}

Unknown lines
{{MicroprocessorDevice | device=11}}

{{#vardefine:info|}}{{#vardefine:dev|MP11 unknown microprocessor device}}STM32{{#var:dev}}{{#var:info}}

Unknown line
{{MicroprocessorDevice | device=154}}

{{#vardefine:info|}}{{#vardefine:dev|MP154 unknown microprocessor device}}STM32{{#var:dev}}{{#var:info}}

Unknown line
{{MicroprocessorDevice | device=1531}}

{{#vardefine:info|}}{{#vardefine:dev|MP1531 unknown microprocessor device}}STM32{{#var:dev}}{{#var:info}}

Unknown security
{{MicroprocessorDevice | device=15 | security=Z}}

{{#vardefine:info|}}unknown security {{#vardefine:dev|MP15xZ lines}}{{#vardefine:info| More info.png}}STM32{{#var:dev}}{{#var:info}}

Unknown line and security
{{MicroprocessorDevice | device=152 | security=Z}}

{{#vardefine:info|}}unknown security {{#vardefine:dev|MP152 unknown microprocessor device}}STM32{{#var:dev}}{{#var:info}}

Check that there's no space before and after the text
BEFORE{{MicroprocessorDevice | device=Class}}AFTER<br>
BEFORE{{MicroprocessorDevice | device=1}}AFTER<br>
BEFORE{{MicroprocessorDevice | device=15}}AFTER<br>
BEFORE{{MicroprocessorDevice | device=157}}AFTER<br>
BEFORE{{MicroprocessorDevice | device=15 | security=A}}AFTER

BEFORE{{#vardefine:info|}}{{#vardefine:dev| Arm® Cortex® MPUs}}{{#vardefine:info| More info.png}}STM32{{#var:dev}}{{#var:info}}AFTER
BEFORE{{#vardefine:info|}}{{#vardefine:dev|MP1 Series}}STM32{{#var:dev}}{{#var:info}}AFTER
BEFORE{{#vardefine:info|}}{{#vardefine:dev|MP15x lines}}{{#vardefine:info| More info.png}}STM32{{#var:dev}}{{#var:info}}AFTER
BEFORE{{#vardefine:info|}}{{#vardefine:dev|MP157 line}}{{#vardefine:info| 2}} microprocessor}}STM32{{#var:dev}}{{#var:info}}AFTER
BEFORE{{#vardefine:info|}}{{#vardefine:dev|MP15xA lines}}{{#vardefine:info| More info.png}}STM32{{#var:dev}}{{#var:info}}AFTER

Code

{{#vardefine:info|}}{{#vardefine:dev|MP unknown microprocessor device}}STM32{{#var:dev}}{{#var:info}}