Where to find the attribution name for a certain board? 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.
The Arduino defines to identify a board are in form of ARDUINO_&lt;board&gt;, where &lt;board&gt; is the value from &lt;x&gt;.build.board from boards.txt for board &lt;x&gt;

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_&lt;arch.name&gt;. The &lt;arch.name&gt; is the uppercase version of the folder name with the boards package version. For example AVR for packages/arduino/hardware/avr/1.6.21.