How to read a data from a bus of 8-bit width

whoyoume
Posts: 23
Joined: Fri Sep 07, 2018 2:42 am

How to read a data from a bus of 8-bit width

Postby whoyoume » Mon Sep 24, 2018 3:20 am

Hello People,

Please tell me a sample or fragment of source code to do that, like below.

//--------------------------------------------------------
uint8_t buff[1000];
uint32_t i = 0;
void my_func_init() {
???
}
uint8_t my_func_read_bus() {
uint8_t data;
???
return data;
}
void my_func_handler() {
buff[i++] = my_func_read_bus();
}
void main() {
set_interrupt_handler(my_func_handler, PIN_X);
my_func_init();
}
//--------------------------------------------------------

I would like to connect the ESP32-DevKitC to an external device with a bus of 8-bit width.

Thank you.

Who is online

Users browsing this forum: No registered users and 40 guests