Skip to content

Commit e97dddc

Browse files
committed
docs: Document pyb.main function to set main script.
1 parent 9988618 commit e97dddc

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

docs/library/pyb.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ Miscellaneous functions
162162

163163
Print out lots of information about the board.
164164

165+
.. function:: main(filename)
166+
167+
Set the filename of the main script to run after boot.py is finished. If
168+
this function is not called then the default file main.py will be executed.
169+
170+
It only makes sense to call this function from within boot.py.
171+
165172
.. function:: mount(device, mountpoint, \*, readonly=False, mkfs=False)
166173

167174
Mount a block device and make it available as part of the filesystem.

0 commit comments

Comments
 (0)