@brief Read up to a certain number of events from the GPIO line. @param line GPIO line object. @param events Buffer to which the event data will be copied. Must hold at least the amount of events specified in num_events. @param num_events Specifies how many events can be stored in the buffer. @return On success returns the number of events stored in the buffer, on failure -1 is returned.