<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/stmhal/modusocket.c, branch v1.5.1</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.5.1</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.5.1'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2015-05-12T22:05:53+00:00</updated>
<entry>
<title>py: Add mp_obj_get_int_truncated and use it where appropriate.</title>
<updated>2015-05-12T22:05:53+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-05-12T22:05:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c50772d19fe2804a6d0258f89dd9967d3b516fd3'/>
<id>urn:sha1:c50772d19fe2804a6d0258f89dd9967d3b516fd3</id>
<content type='text'>
mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type.  Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
</content>
</entry>
<entry>
<title>lib: Move some common mod_network_* functions to lib/netutils.</title>
<updated>2015-05-04T10:48:40+00:00</updated>
<author>
<name>Josef Gajdusek</name>
<email>atx@atx.name</email>
</author>
<published>2015-05-03T18:26:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=04ee5983feadc6945e324eb54cd9e7f8c1d6aa8c'/>
<id>urn:sha1:04ee5983feadc6945e324eb54cd9e7f8c1d6aa8c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Change vstr so that it doesn't null terminate buffer by default.</title>
<updated>2015-01-28T23:43:01+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-28T23:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0d3cb6726ddc1bab9fdd11a0aaa259fb436da4b2'/>
<id>urn:sha1:0d3cb6726ddc1bab9fdd11a0aaa259fb436da4b2</id>
<content type='text'>
This cleans up vstr so that it's a pure "variable buffer", and the user
can decide whether they need to add a terminating null byte.  In most
places where vstr is used, the vstr did not need to be null terminated
and so this patch saves code size, a tiny bit of RAM, and makes vstr
usage more efficient.  When null termination is needed it must be
done explicitly using vstr_null_terminate.
</content>
</entry>
<entry>
<title>stmhal: Bug fix for usocket's accept and setsockopt methods.</title>
<updated>2015-01-24T15:07:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-24T15:07:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=23342c09ff9e7d5ead4905a4692e9646b4bbc2eb'/>
<id>urn:sha1:23342c09ff9e7d5ead4905a4692e9646b4bbc2eb</id>
<content type='text'>
accept might raise an exception, in which case the new socket is not
fully created.  It has a finaliser so will run close() method when GC'd.
Before this patch close would try to close an invalid socket.  Now
fixed.

setsockopt took address of stack value which became out of scope.  Now
fixed.
</content>
</entry>
<entry>
<title>stmhal: Put mod_network_nic_list in global root-pointer state.</title>
<updated>2015-01-22T00:16:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-22T00:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8b77e3dd2fd3005bc67bb59a701c6ea2422bf928'/>
<id>urn:sha1:8b77e3dd2fd3005bc67bb59a701c6ea2422bf928</id>
<content type='text'>
It needs to be scanned by GC.  Thanks to Daniel Campora.
</content>
</entry>
<entry>
<title>py: Remove mp_obj_str_builder and use vstr instead.</title>
<updated>2015-01-21T23:18:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-21T22:48:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=05005f679e00241e15a87751d89327f2c4630cb6'/>
<id>urn:sha1:05005f679e00241e15a87751d89327f2c4630cb6</id>
<content type='text'>
With this patch str/bytes construction is streamlined.  Always use a
vstr to build a str/bytes object.  If the size is known beforehand then
use vstr_init_len to allocate only required memory.  Otherwise use
vstr_init and the vstr will grow as needed.  Then use
mp_obj_new_str_from_vstr to create a str/bytes object using the vstr
memory.

Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes
on unix x64.
</content>
</entry>
<entry>
<title>stmhal: Prefix includes with py/; remove need for -I../py.</title>
<updated>2015-01-01T21:06:20+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-01T21:06:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2cf6dfa280a8149941aafc852fbaae8bdfc4999e'/>
<id>urn:sha1:2cf6dfa280a8149941aafc852fbaae8bdfc4999e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stmhal: Allow network, uselect, usocket mods to be used by other ports.</title>
<updated>2014-12-07T17:03:47+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-12-07T17:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d0caaadaeea48e8f76dca3125a2dea3465a58416'/>
<id>urn:sha1:d0caaadaeea48e8f76dca3125a2dea3465a58416</id>
<content type='text'>
Remove include of stm32f4xx_hal.h, replace by include of MICROPY_HAL_H
where needed, and make it compile without float support.  This makes
these 3 modules much more generic and usable by other ports.
</content>
</entry>
<entry>
<title>py: Rename mp_obj_int_get to mp_obj_int_get_truncated; fix struct.pack.</title>
<updated>2014-12-05T23:13:52+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-12-05T23:13:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=be6d8be91e133e98117025062df0e63aaf87efd2'/>
<id>urn:sha1:be6d8be91e133e98117025062df0e63aaf87efd2</id>
<content type='text'>
mp_obj_int_get_truncated is used as a "fast path" int accessor that
doesn't check for overflow and returns the int truncated to the machine
word size, ie mp_int_t.

Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word
sized values.

Addresses issues #779 and #998.
</content>
</entry>
<entry>
<title>stmhal: Overhaul network drivers; has generic network protocol in C.</title>
<updated>2014-12-04T18:57:57+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-11-29T13:48:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=29a1ec1bd6680d1108408cc825935012af10d938'/>
<id>urn:sha1:29a1ec1bd6680d1108408cc825935012af10d938</id>
<content type='text'>
This patch overhauls the network driver interface.  A generic NIC must
provide a set of C-level functions to implement low-level socket control
(eg socket, bind, connect, send, recv).  Doing this, the network and
usocket modules can then use such a NIC to implement proper socket
control at the Python level.

This patch also updates the CC3K and WIZNET5K drivers to conform to the
new interface, and fixes some bugs in the drivers.  They now work
reasonably well.
</content>
</entry>
</feed>
