https://www.st.com/en/ecosystems/x-nucleo-plm01a1.html MBED driver for the ST7580 IC.

Revision:
1:edbcde816013
Parent:
0:e88514a784bb
--- a/ST7580.h	Mon Apr 15 06:41:00 2019 +0000
+++ b/ST7580.h	Sat Apr 20 20:18:49 2019 +0000
@@ -12,13 +12,18 @@
 * \brief ST7580 driver
 *
 *  here is a minimal example:
-*   
-*    ST7580 shield(D8, D2, D13, D7);
+*  void callback_function(unsigned char *data, int payload_length)
+*  {
+*       //Do what you want with the data
+*  }
+*  int main() {
+*    ST7580 shield(D8, D2, D13, D7, callback_function);
 *    shield.init();
 *    wait(1);
 *    while(1) {
 *        shield.send_frame("Hello world!");
 *    }
+* }
 */
 class ST7580 
 {
@@ -43,7 +48,6 @@
          */
         void init();
         void send_frame(unsigned char *msg, int msg_length);
-        //void receive_frame();
 
     private:
         void wait_status();
@@ -54,14 +58,14 @@
 
         void (*_usr_callback)(unsigned char *, int);
         volatile unsigned char _rx_char;
-        volatile unsigned char _rcv_data[512];
+        volatile unsigned char _rcv_data[255];
         volatile int _rcv_data_idx;
         volatile int _rcv_data_offset;
-        volatile int _step;
+        volatile int _rcv_payload_len;
 
         DigitalOut  *_plm_t_req;
         DigitalOut  *_plm_reset;
         RawSerial   *_plm_uart;
 };
 
-#endif
\ No newline at end of file
+#endif