Sorry I am not aware about your controller but for program side you need to define the one gpio as INPUT(button) and other two gpio as output one for led and another for buzzer.
Code:
if(sw_pressed )
{
//on timer to check sw pressed for 2 sec
if(time==2sec)
{
led_gpio_on;
buzzer_on;
delay;
buzzer_off;
delay;
//repeat buzzer code in for loop
}
}
else
{
timer-off;
led_gpio_off;
buzzer_off;
}
I mean I don't use ARM controller and don't aware about its compiler and programming gpios.You can use the code as I suggested but just repeat the buzzer on and off number of times you want to beep the buzzer.