Difference between revisions of "Template:Board"

m
m

1 Usage[edit]

The Board template is used to indicate for which board(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 boards for which the entire article is valid.

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

Usage: {{Board | type=<type>}}
Where:
  • <type> is the mandatory identifier of the board type. The possible values are:
    • 157A-EV1: STM32MP157A-EV1 Evaluation board
    • 157C-EV1: STM32MP157C-EV1 Evaluation board
    • 157x-EV1: any of the previous two
    • 157A-DK1: STM32MP157A-DK1 Discovery kit
    • 157C-DK2: STM32MP157C-DK2 Discovery kit
    • 157x-DKx: any of the previous two

Clicking on the Info.png icon displays the article about the board (e.g. STM32MP157X-DKX - hardware description).

2 Basic examples[edit]

You type You get
STM32MP157C-EV1 Evaluation board
{{Board | type=157C-EV1}}

STM32MP157C-EV1 Evaluation board More info.png

STM32MP157C-DK2 Discovery kit
{{Board | type=157C-DK2}}

STM32MP157C-DK2 Discovery kit More info.png

3 More examples[edit]

You type You get
Unspecified board
{{Board}}

STM32MP unknown board type identifier

Unknown board
{{Board | type=153C-EV1}}

STM32MP153C-EV1 unknown board type identifier

Unknown lines
{{Board | type=157C-DK3}}

STM32MP157C-DK3 unknown board type identifier

4 Code[edit]

STM32MP unknown board type identifier

<noinclude>

==Usage==
The [[Template:Board|Board]] template is used '''to indicate for which board(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 boards for which the entire article is valid.

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

 Usage: <nowiki>{{</nowiki>Board | type={{HighlightParam|<type>}}}}
:Where:
* {{HighlightParam|<type>}} is the '''mandatory''' identifier of the board type. The possible values are:
** '''157A-EV1''': STM32MP157A-EV1 Evaluation board
** '''157C-EV1''': STM32MP157C-EV1 Evaluation board
** '''157x-EV1''':  any of the previous two
** '''157A-DK1''': STM32MP157A-DK1 Discovery kit
** '''157C-DK2''': STM32MP157C-DK2 Discovery kit
** '''157x-DKx''': any of the previous two

Clicking on the <sup>[[File:Info.png|15px|link=]]</sup> icon displays '''the article about the board''' (e.g. [[STM32MP157X-DKX - hardware description]]).

==Basic examples==
{| class="st-table"
! style="width: 50%;" | You type !! You get
|-
| STM32MP157C-EV1 Evaluation board<pre style="white-space: pre-wrap;">

{{Board | type=157C-EV1}}</pre>

|
{{Board | type=157C-EV1}}
|-
| STM32MP157C-DK2 Discovery kit<pre style="white-space: pre-wrap;">

{{Board | type=157C-DK2}}</pre>

|
{{Board | type=157C-DK2}}
|}

==More examples==
{| class="st-table"
! style="width: 50%;" | You type !! You get
|-
| Unspecified board<pre style="white-space: pre-wrap;">

{{Board}}</pre>

|
{{Board}}
|-
| Unknown board<pre style="white-space: pre-wrap;">

{{Board | type=153C-EV1}}</pre>

|
{{Board | type=153C-EV1}}
|-
| Unknown lines<pre style="white-space: pre-wrap;">

{{Board | type=157C-DK3}}</pre>

|
{{Board | type=157C-DK3}}
|}

==Code==
{{UpdateNeededForNewBoard|Add the new board in the code below and in the list of the possible values above}}</noinclude>{{#vardefine:info|}}{{#switch:{{{type|}}}
| 157A-EV1 | 157C-EV1 | 157x-EV1 = {{#vardefine:typ|Evaluation board}}{{#vardefine:info|<sup>[[File:Info.png|15px|link=STM32MP157C-EV1 - hardware description]]</sup>}} 
| 157A-DK1 | 157C-DK2 | 157x-DKx = {{#vardefine:typ|Discovery kit}}{{#vardefine:info|<sup>[[File:Info.png|15px|link=STM32MP157X-DKX - hardware description]]</sup>}} 
| #default = {{#vardefine:typ|{{Highlight|unknown board type identifier}}}}
}}STM32MP{{{type|}}} {{#var:typ}}{{#var:info}}
Line 15: Line 15:
 
** '''157x-DKx''': any of the previous two
 
** '''157x-DKx''': any of the previous two
   
Clicking on the <sup>[[File:Info.png|15px|link=]]</sup> icon displays the article about the board (e.g. [[STM32MP157X-DKX - hardware description]]).
+
Clicking on the <sup>[[File:Info.png|15px|link=]]</sup> icon displays '''the article about the board''' (e.g. [[STM32MP157X-DKX - hardware description]]).
   
 
==Basic examples==
 
==Basic examples==

Attachments

Discussions