X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=firmware%2Fmodbus.h;fp=firmware%2Fmodbus.h;h=e762b706a5173542f795e15eb8cdd16674d21eb8;hb=6146a1caafd449cae4ce08134d763137424300c6;hp=9f5afa6f7329d0c9971cbcb215bbc55500b5b025;hpb=0c9ed6a110149013fd3690338fac0b33f760e0ed;p=openparking.git diff --git a/firmware/modbus.h b/firmware/modbus.h index 9f5afa6..e762b70 100644 --- a/firmware/modbus.h +++ b/firmware/modbus.h @@ -8,8 +8,17 @@ * All bugs by Jan "Yenya" Kasprzak :-) */ +/* + * Call this at the beginning of the program. + */ void modbus_init(uint8_t unit_id); -void modbus_poll(); + +/* + * Call this frequently. Returns 0 when no data was received + * and the processing went on quickly. Returns 1 after potentially lengthy + * packet processing. + */ +uint8_t modbus_poll(); typedef enum { MB_OK = 0,