Need to make LIBRARY/EXTRA VOID

Hello, i am making a program for a touch screen. The “setup” of the screen is always the same so i want to make it shorter. Here is my code:

#include "FT_Platform.h"
#include <SPI.h>

#define SAMAPP_DELAY_BTW_APIS (1000)
#define SAMAPP_ENABLE_DELAY() Ft_Gpu_Hal_Sleep(SAMAPP_DELAY_BTW_APIS)
#define SAMAPP_ENABLE_DELAY_VALUE(x) Ft_Gpu_Hal_Sleep(x)

char font; //0-15 minder geheugen dan int

screen();

//--------------------------------------------------------------------------

ft_void_t Ft_App_WrDlCmd_Buffer(Ft_Gpu_Hal_Context_t *phost,ft_uint32_t cmd)
{
  Ft_Gpu_Hal_Wr32(phost,(RAM_DL+Ft_DlBuffer_Index),cmd);
  // Increment the command index 
  Ft_DlBuffer_Index += FT_CMD_SIZE;  
}


ft_void_t Ft_App_Flush_DL_Buffer(Ft_Gpu_Hal_Context_t *phost)
{  
  Ft_DlBuffer_Index = 0;   
}

// API checkt de status van de vorige DL swap en doet een nieuwe, als vorige niet gedaan is wachten en na een tijdje opnieuw proberen
ft_void_t SAMAPP_GPU_DLSwap(ft_uint8_t DL_Swap_Type)
{
ft_uint8_t Swap_Type = DLSWAP_FRAME,Swap_Done = DLSWAP_FRAME;

if(DL_Swap_Type == DLSWAP_LINE)
{
Swap_Type = DLSWAP_LINE;
}

// nieuwe DL swap doen
Ft_Gpu_Hal_Wr8(phost,REG_DLSWAP,Swap_Type);

// wachten tot Swap gedaan is
while(Swap_Done)
{
Swap_Done = Ft_Gpu_Hal_Rd8(phost,REG_DLSWAP);

if(DLSWAP_DONE != Swap_Done)
{
Ft_Gpu_Hal_Sleep(10); //10ms wachten
}
} 
}

//------......-------

void setup()
{  
 Serial.begin(9600);
 
Ft_Gpu_HalInit_t halinit;

halinit.TotalChannelNum = 1;              
Ft_Gpu_Hal_Init(&halinit);
host.hal_config.channel_no = 0;
host.hal_config.spi_clockrate_khz = 4000; //in KHz
       Ft_Gpu_Hal_Open(&host);
           
phost = &host;

       SAMAPP_BootupConfig();
   
       // scherm clearen 
       Ft_Gpu_Hal_WrMem(phost, RAM_DL,(ft_uint8_t *)FT_DLCODE_BOOTUP,sizeof(FT_DLCODE_BOOTUP));
       Ft_Gpu_Hal_Wr8(phost, REG_DLSWAP,DLSWAP_FRAME);
}

void loop() 
{  
ft_int32_t font,j,hoffset,voffset,stringlen;
ft_uint32_t FontTableAddress;
FT_Gpu_Fonts_t Display_fontstruct;

       // VARIABELEN
       char text[] = "GIP"; // hier tekst typen die uuitgeprint moet worden.
hoffset = ((FT_DispWidth - 100)/2);
       voffset = FT_DispHeight/2;
       stringlen = sizeof(text) - 1;
       font = 15; //0-->15

// font adres van deze locatie lezen: 0xFFFFC (vast)
FontTableAddress = Ft_Gpu_Hal_Rd32(phost, 0xFFFFC);
       
//font uitlezen in tabel op GPU (hardware)
Ft_Gpu_Hal_RdMem(phost,(FontTableAddress + font*FT_GPU_FONT_TABLE_SIZE),(ft_uint8_t *)&Display_fontstruct,FT_GPU_FONT_TABLE_SIZE);
               
       //------BEGINNEN PRINTEN SCHERM-------
        
        Ft_App_WrDlCmd_Buffer(phost, CLEAR(1, 1, 1)); // clear screen
        Ft_App_WrDlCmd_Buffer(phost, COLOR_RGB(255, 255, 255)); // clear screen
       
        //coördinaten text
        Ft_App_WrDlCmd_Buffer(phost, BEGIN(BITMAPS));
        hoffset = ((FT_DispWidth - 120)/2);
        voffset = ((FT_DispHeight - Display_fontstruct.FontHeightInPixels)/2);
       
        for(j=0;j<stringlen;j++) // Text tonen (letter1-->j=0; letter2-->j=1; ...)
        {
           Ft_App_WrDlCmd_Buffer(phost, VERTEX2II(hoffset,voffset,(font+16),text[j]));
           hoffset += Display_fontstruct.FontWidth[text[j]];
        }
        Ft_App_WrDlCmd_Buffer(phost, END());
        Ft_App_WrDlCmd_Buffer(phost, DISPLAY() );
       
        //DL downloaden in ram
        Ft_App_Flush_DL_Buffer(phost);
       
        //DL swap (& delay)
        SAMAPP_GPU_DLSwap(DLSWAP_FRAME);
               //SAMAPP_ENABLE_DELAY_VALUE(1000);
       
       Serial.println(text);        
       Serial.print("font=");
       Serial.println(font);
       Serial.println();
}

void screen()
{
 
     // Waardes van scherm die gebruikt worden
     // Default WQVGA 480x272 
     ft_int16_t FT_DispWidth = 480;
     ft_int16_t FT_DispHeight = 272;
     ft_int16_t FT_DispHCycle =  548;
     ft_int16_t FT_DispHOffset = 43;
     ft_int16_t FT_DispHSync0 = 0;
     ft_int16_t FT_DispHSync1 = 41;
     ft_int16_t FT_DispVCycle = 292;
     ft_int16_t FT_DispVOffset = 12;
     ft_int16_t FT_DispVSync0 = 0;
     ft_int16_t FT_DispVSync1 = 10;
     ft_uint8_t FT_DispPCLK = 5;
     ft_char8_t FT_DispSwizzle = 0;
     ft_char8_t FT_DispPCLKPol = 1;
     
     // dit commando wordt globaal gebruikt om de buffer te optimaliseren
     Ft_Gpu_Hal_Context_t host,*phost;
     
     ft_uint32_t Ft_CmdBuffer_Index;
     ft_uint32_t Ft_DlBuffer_Index;
     
     ft_void_t SAMAPP_BootupConfig()
     {
     
      // powercycle doen (test)
      Ft_Gpu_Hal_Powercycle(phost,FT_TRUE);
     
      // adres 0 aanspreken om de ft800 'wakker' te maken
      Ft_Gpu_HostCommand(phost,FT_GPU_ACTIVE_M);  
      Ft_Gpu_Hal_Sleep(20);
     
      // CLK naar externe klok zetten
      Ft_Gpu_HostCommand(phost,FT_GPU_EXTERNAL_OSC);  
      Ft_Gpu_Hal_Sleep(10);
       
     
      // de PLL output op 48MHz zetten
      Ft_Gpu_HostCommand(phost,FT_GPU_PLL_48M);  
      Ft_Gpu_Hal_Sleep(10);
     
      // core resetten
      Ft_Gpu_HostCommand(phost,FT_GPU_CORE_RESET);     
     
      
      {
      ft_uint8_t chipid;
      // chipid lezen om te weten of de ft800 klaar is
      chipid = Ft_Gpu_Hal_Rd8(phost, REG_ID);
      while(chipid != 0x7C)
      chipid = Ft_Gpu_Hal_Rd8(phost, REG_ID);
      }
     
         Ft_Gpu_Hal_Wr16(phost, REG_HCYCLE, FT_DispHCycle);
         Ft_Gpu_Hal_Wr16(phost, REG_HOFFSET, FT_DispHOffset);
         Ft_Gpu_Hal_Wr16(phost, REG_HSYNC0, FT_DispHSync0);
         Ft_Gpu_Hal_Wr16(phost, REG_HSYNC1, FT_DispHSync1);
         Ft_Gpu_Hal_Wr16(phost, REG_VCYCLE, FT_DispVCycle);
         Ft_Gpu_Hal_Wr16(phost, REG_VOFFSET, FT_DispVOffset);
         Ft_Gpu_Hal_Wr16(phost, REG_VSYNC0, FT_DispVSync0);
         Ft_Gpu_Hal_Wr16(phost, REG_VSYNC1, FT_DispVSync1);
         Ft_Gpu_Hal_Wr8(phost, REG_SWIZZLE, FT_DispSwizzle);
         Ft_Gpu_Hal_Wr8(phost, REG_PCLK_POL, FT_DispPCLKPol);
         Ft_Gpu_Hal_Wr8(phost, REG_PCLK,FT_DispPCLK); // na deze display zichtbaar op scherm
         Ft_Gpu_Hal_Wr16(phost, REG_HSIZE, FT_DispWidth);
         Ft_Gpu_Hal_Wr16(phost, REG_VSIZE, FT_DispHeight);
     
         // zet DISP_EN naar 1
         Ft_Gpu_Hal_Wr8(phost, REG_GPIO_DIR,0x83 | Ft_Gpu_Hal_Rd8(phost,REG_GPIO_DIR));
         Ft_Gpu_Hal_Wr8(phost, REG_GPIO,0x083 | Ft_Gpu_Hal_Rd8(phost,REG_GPIO));
         
         // Touch configuratie (de weerstandswaarde 1200) waarde hangt af van waar gebruikt wordt (resistief scherm)
         Ft_Gpu_Hal_Wr16(phost, REG_TOUCH_RZTHRESH,1200);
     
     }
     
     const ft_uint8_t FT_DLCODE_BOOTUP[12] = 
     {
         0,255,0,0,//GPU instructie CLEAR_COLOR_RGB
         7,0,0,38, //GPU instructie CLEAR
         0,0,0,0,  //GPU instructie DISPLAY
     };
 
}

I hope someone can help me. The place where screen(); is, is where the code of void screen should be.

Moderator edit: the usual

Need to make LIBRARY/EXTRA VOID

It will be immensely easier when you know something about C. The thing you want to make is a function, not a void. Void is a return type. If the function returned a float, you wouldn't say you needed to make a float, would you? Unless there was a parade coming up...

So, what is the problem?

PaulS:
It will be immensely easier when you know something about C. The thing you want to make is a function, not a void. Void is a return type. If the function returned a float, you wouldn't say you needed to make a float, would you? Unless there was a parade coming up...

So, what is the problem?

I know but couldn't find the name. I know how C works mate i just asked some help, dont be this rude please.

PaulS:
It will be immensely easier when you know something about C. The thing you want to make is a function, not a void. Void is a return type. If the function returned a float, you wouldn't say you needed to make a float, would you? Unless there was a parade coming up...

So, what is the problem?

I've solved my problem, how to delete this post?

Don't delete it, leave it here and explain the solution. Someone might benefit in the future.