From e97dddcdcaa70b7d21971cbee32cf1f4981877e0 Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Thu, 9 Apr 2015 10:08:25 +0100
Subject: [PATCH] docs: Document pyb.main function to set main script.

---
 docs/library/pyb.rst | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/docs/library/pyb.rst b/docs/library/pyb.rst
index f93b884ab4..91b8cccbde 100644
--- a/docs/library/pyb.rst
+++ b/docs/library/pyb.rst
@@ -162,6 +162,13 @@ Miscellaneous functions
 
    Print out lots of information about the board.
 
+.. function:: main(filename)
+
+   Set the filename of the main script to run after boot.py is finished.  If
+   this function is not called then the default file main.py will be executed.
+
+   It only makes sense to call this function from within boot.py.
+
 .. function:: mount(device, mountpoint, \*, readonly=False, mkfs=False)
 
    Mount a block device and make it available as part of the filesystem.