- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi
From the doc found at https://software.intel.com/en-us/node/557355 MCU API | Intel® Software :
int gpio_register_interrupt(int gpio, int mode, irq_handler_t isr);
where mode: 0 = falling edge interrupt, 1 = rising edge interrupt
I just wonder if i can make interrupt for both falling and rising edge .
i try to call :
gpio_register_interrupt(my_pin, 0, my_isr);
then
gpio_register_interrupt(my_pin, 1, my_isr);
which give me error when debuggin /dev/ttymcu1;
but when i try :
gpio_register_interrupt(my_pin, 2, my_isr);
no error raised...
just to be sure if there was not some mistake in the api documentation because it seems that mcu_snprintf
is bad documented:
from the doc, we can see that the declaration tell us that there is NO RETURN ( cause the void) and later, 'return value, number of chars ....' , in the 'mcu_api.h' header file this return an interger :
mcu_snprintf
A simplified version of snprintf.
void mcu_snprintf(char *buf, unsigned int size, const char *fmt, ...)
...where:
buf: the buffer point to contain the datasize: size of bufferfmt: format stringreturn value: the number of characters that have been writtenthanks
EDIT:
just found this thread
which answer to my first question...
so whats about the doc ?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi toukytrip,
Thank you for contacting us and letting us know you found the solution to your fiest question. In regards to your second question, I looked at the mcu_snprintf function on the document you posted and at the mcu_api.h file. It appears that both documents say different things, as you pointed out. In https://software.intel.com/en-us/node/557355 https://software.intel.com/en-us/node/557355 , mcu_snprintf is declared as a void and in mcu_api.h, it is declared as an int, as you can see here:
So, it appears that there's a mismatch in the documentation. We'll report this to the appropriate team so that the document can be modified.
Let us know if there's anything else we can assist you with.
-Sergio

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page