diff options
author | Damien George <damien.p.george@gmail.com> | 2014-08-02 14:43:20 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-08-02 14:43:20 +0100 |
commit | 2e41646eb76348a25eb2f20bd1a46e6fbdbc82df (patch) | |
tree | d3b860992e7cc9a67af04ab460f1ac50d91d01a5 /stmhal | |
parent | 87bbb388dbd712989b8b0bb4e79a639c5ed8d1c0 (diff) | |
download | micropython-2e41646eb76348a25eb2f20bd1a46e6fbdbc82df.tar.gz micropython-2e41646eb76348a25eb2f20bd1a46e6fbdbc82df.zip |
stmhal: Add more documentation for USB_VCP.
Diffstat (limited to 'stmhal')
-rw-r--r-- | stmhal/usb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/stmhal/usb.c b/stmhal/usb.c index 13f8f83307..7db8ca218a 100644 --- a/stmhal/usb.c +++ b/stmhal/usb.c @@ -154,6 +154,8 @@ STATIC void pyb_usb_vcp_print(void (*print)(void *env, const char *fmt, ...), vo print(env, "USB_VCP()"); } +/// \classmethod \constructor() +/// Create a new USB_VCP object. STATIC mp_obj_t pyb_usb_vcp_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) { // check arguments mp_arg_check_num(n_args, n_kw, 0, 0, false); @@ -252,10 +254,15 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pyb_usb_vcp___exit___obj, 4, 4, pyb_u STATIC const mp_map_elem_t pyb_usb_vcp_locals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_send), (mp_obj_t)&pyb_usb_vcp_send_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_recv), (mp_obj_t)&pyb_usb_vcp_recv_obj }, + /// \method read([nbytes]) { MP_OBJ_NEW_QSTR(MP_QSTR_read), (mp_obj_t)&mp_stream_read_obj }, + /// \method readall() { MP_OBJ_NEW_QSTR(MP_QSTR_readall), (mp_obj_t)&mp_stream_readall_obj }, + /// \method readline() { MP_OBJ_NEW_QSTR(MP_QSTR_readline), (mp_obj_t)&mp_stream_unbuffered_readline_obj}, + /// \method write(buf) { MP_OBJ_NEW_QSTR(MP_QSTR_write), (mp_obj_t)&mp_stream_write_obj }, + /// \method close() { MP_OBJ_NEW_QSTR(MP_QSTR_close), (mp_obj_t)&mp_identity_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR___del__), (mp_obj_t)&mp_identity_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR___enter__), (mp_obj_t)&mp_identity_obj }, |