'Overflow Timer in cosmic stm8s

how I write a interrupt function in cosmic stm8s Stvd For a timer?

i found some result for this in the internet but they work with another library

here a Example code for timer 2. but its not have Overflow function

#include "STM8S.h"
 
void TIM2_setup(void);
 
 
void main(void)
{
    TIM2_setup();
                
    while(TRUE)
    {
          

    };
}
 
 
 
void TIM2_setup(void)
{
    TIM2_DeInit();
    TIM2_TimeBaseInit(TIM2_PRESCALER_2048, 1952);
    TIM2_Cmd(ENABLE);
} 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source