How do I stop timer.h from including?

mailhouse
Wed Nov 23, 2016 3:25 am
void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{

}


RogerClark
Wed Nov 23, 2016 5:55 am
You can’t prevent define that function as its already defined in timer.c, and the Arduino API always compiles all “core” files

For whatever you are writing, the Arduino IDE does not seem to be suitable, as you require access to low level callbacks etc which have already been taken by the Arduino core.


racemaniac
Wed Nov 23, 2016 6:47 am
You could do what i did for my projects. I needed my own interrupt handlers for i2c ports while they were already defined in the core. So i made a small change in the core so i could inject my own handlers to replace the existing ones.
@roger: is it useful to create a pull request for such changes? Do you want to give access to such handlers to users, or is it something hardly anybody will ever use? It’s not quite in the spirit of arduino to go so low level (but i think quite some users on this forum don’t mind going that low level).

stevestrong
Wed Nov 23, 2016 10:00 am
racemaniac wrote:
@roger: is it useful to create a pull request for such changes? Do you want to give access to such handlers to users, or is it something hardly anybody will ever use? It’s not quite in the spirit of arduino to go so low level (but i think quite some users on this forum don’t mind going that low level).

racemaniac
Wed Nov 23, 2016 3:55 pm
stevestrong wrote:racemaniac wrote:
@roger: is it useful to create a pull request for such changes? Do you want to give access to such handlers to users, or is it something hardly anybody will ever use? It’s not quite in the spirit of arduino to go so low level (but i think quite some users on this forum don’t mind going that low level).

mailhouse
Wed Nov 23, 2016 5:18 pm
RogerClark wrote:You can’t prevent define that function as its already defined in timer.c, and the Arduino API always compiles all “core” files

For whatever you are writing, the Arduino IDE does not seem to be suitable, as you require access to low level callbacks etc which have already been taken by the Arduino core.


danieleff
Wed Nov 23, 2016 5:29 pm
mailhouse wrote:RogerClark wrote:You can’t prevent define that function as its already defined in timer.c, and the Arduino API always compiles all “core” files

For whatever you are writing, the Arduino IDE does not seem to be suitable, as you require access to low level callbacks etc which have already been taken by the Arduino core.


mailhouse
Wed Nov 23, 2016 6:30 pm
you guys rock. thanks.

RogerClark
Wed Nov 23, 2016 7:51 pm
I presume we need to do this for all the callbacks in both the L4 and F1

racemaniac
Wed Nov 23, 2016 7:56 pm
danieleff wrote:mailhouse wrote:RogerClark wrote:You can’t prevent define that function as its already defined in timer.c, and the Arduino API always compiles all “core” files

For whatever you are writing, the Arduino IDE does not seem to be suitable, as you require access to low level callbacks etc which have already been taken by the Arduino core.


RogerClark
Wed Nov 23, 2016 7:58 pm
Ok. We better put that on the issues list ;-)

mailhouse
Wed Nov 23, 2016 8:47 pm
racemaniac wrote:
ooh, that’s even better :)
would indeed be nice to have this on all callbacks :)

racemaniac
Thu Nov 24, 2016 6:51 am
mailhouse wrote:racemaniac wrote:
ooh, that’s even better :)
would indeed be nice to have this on all callbacks :)

Leave a Reply

Your email address will not be published. Required fields are marked *