Soon found that the 'L' series devices throw an exception on set_port_pull_up(). Doh.
Member 'jai' refers to this in their post "RE: unused ports" on 22 Jul 2011:
Incidentally, kudos to anyone who can point me to the correct place in the XMOS specs that confirms this..PS: XS1-L series does not have PullUps, they have only PullDowns
The lack of pull_up() is a nuisance, because on the I2C bus devices need to drive the bus low and tristate for logic '1'. So using pull_up() mode on a one-bit XS-1 port is great, because you can define the port as a output (hence benefiting from serialisation etc.), and still read the replies back from other peripherals using peek() without having to reconfigure the port as an input.
Hence my question: if I combine set_port_pull_down() with set_port_inv(), can I re-produce the effect of set_port_pull_up() ?
Furthermore, what's the effect of the above on peek() - is it reversed by set_port_inv() ?
I guess I can test this with a simple enough circuit, but in case anyone knows already I thought I would ask...
MARTIN