user23860: I'm working on lcd128x64 spi library. And was working with my Arduino Atmega328p chip.
Now I want to run the code with my maple mini board too.
So I have to specify the name on the pins for each chip board.
But I want to learn the basics of how to write these statements.
Could you tell me where to find the attributions for each board ?
For now I want to define the pin names for the Atmega328p and maple mini. This is my intention:
#if defined(__AVR_ATmega328P__)
    #define CS_PIN                  10
    #define MOSI_PIN                11
    #define CLK_PIN                 13
#elif defined(STM32_SERIES_F1)  
    #define CS_PIN                  PB12
    #define MOSI_PIN                PB15
    #define CLK_PIN                 PB13
#endif  

I don't think that's %100 correct, but I'm pretty sure that it's not the correct names of boards.

user63711: If you are working on Maple Mini, you may look in this folder, you will found the pin mapping between STM32 and Arduino nomenclature.

user37622: The Arduino defines to identify a board are in form of ARDUINO_<board>, where <board> is the value from <x>.build.board from boards.txt for board <x>
For example for Arduino AVR boards, in the boards.txt file is uno.build.board=AVR_UNO so the define is ARDUINO_AVR_UNO.
And Arduino has 'architecture' identification define too. This has form of ARDUINO_ARCH_<arch.name>. The <arch.name> is the uppercase version of the folder name with the boards package version. For example AVR for packages/arduino/hardware/avr/1.6.21. 

23860: <p>I'm working on lcd128x64 spi library. And was working with my Arduino Atmega328p chip.</p>

<p>Now I want to run the code with my maple mini board too.
So I have to specify the name on the pins for each chip board.
But I want to learn the basics of how to write these statements.</p>

<p>Could you tell me where to find the attributions for each board ?</p>

<p>For now I want to define the pin names for the Atmega328p and maple mini. This is my intention:</p>

<pre><code>#if defined(__AVR_ATmega328P__)
    #define CS_PIN                  10
    #define MOSI_PIN                11
    #define CLK_PIN                 13
#elif defined(STM32_SERIES_F1)  
    #define CS_PIN                  PB12
    #define MOSI_PIN                PB15
    #define CLK_PIN                 PB13
#endif  
</code></pre>

<p>I don't think that's %100 correct, but I'm pretty sure that it's not the correct names of boards.</p>
 63711: <p>If you are working on Maple Mini, you may look in <a href="https://github.com/rogerclarkmelbourne/Arduino_STM32/tree/master/STM32F1/variants/maple_mini" rel="nofollow noreferrer">this folder</a>, you will found the pin mapping between STM32 and Arduino nomenclature.</p>
 37622: <p>The Arduino defines to identify a board are in form of <code>ARDUINO_&lt;board&gt;</code>, where <code>&lt;board&gt;</code> is the value from <code>&lt;x&gt;.build.board</code> from boards.txt for board <code>&lt;x&gt;</code></p>

<p>For example for Arduino AVR boards, in the boards.txt file is <code>uno.build.board=AVR_UNO</code> so the define is <code>ARDUINO_AVR_UNO</code>.</p>

<p>And Arduino has <a href="https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#working-with-multiple-architectures" rel="nofollow noreferrer">'architecture' identification define</a> too. This has form of <code>ARDUINO_ARCH_&lt;arch.name&gt;</code>. The <code>&lt;arch.name&gt;</code> is the uppercase version of the folder name with the boards package version. For example AVR for packages/arduino/hardware/avr/1.6.21. </p>
