mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-16 22:21:21 +00:00
manual: fix listing refs for mkdocs
This commit is contained in:
parent
4c719da614
commit
cae650303c
@ -14,7 +14,8 @@ all:
|
||||
cp btstack_gettingstarted.tex latex
|
||||
cd latex && pdflatex btstack_gettingstarted.tex && pdflatex btstack_gettingstarted.tex
|
||||
mv latex/btstack_gettingstarted.pdf btstack.pdf
|
||||
rm -rf latex docs_final
|
||||
rm -rf latex
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -75,7 +75,7 @@ by RFCOMM:
|
||||
Possible errors: an L2CAP error, out of memory.
|
||||
|
||||
- RFCOMM_EVENT_CREDITS - The application can resume sending when
|
||||
this even is received. See Section on [RFCOMM credit-based flow-control]{protocols/#sec:flowControlProtocols}
|
||||
this even is received. See Section on [RFCOMM credit-based flow-control](../protocols/#sec:flowControlProtocols)
|
||||
for more.
|
||||
|
||||
- RFCOMM_EVENT_SERVICE_REGISTERED - Status not equal zero indicates
|
||||
|
@ -66,13 +66,20 @@ def process_tables(temp_file, dest_file):
|
||||
return
|
||||
|
||||
|
||||
# def process_listings(temp_file, dest_file):
|
||||
# with open(dest_file, 'w') as mdout:
|
||||
# with open(temp_file, 'r') as mdin:
|
||||
# for line in mdin:
|
||||
# mdout.write(line)
|
||||
# fcopy(dest_file, temp_file)
|
||||
# return
|
||||
def process_listings(temp_file, dest_file):
|
||||
with open(dest_file, 'w') as mdout:
|
||||
with open(temp_file, 'r') as mdin:
|
||||
for line in mdin:
|
||||
listing_start = re.match('.*{#(lst:.*)\s+.c\s+.*',line)
|
||||
listing_end = re.match('\s*~~~~\s*\n',line)
|
||||
if listing_start:
|
||||
insert_anchor(mdout, listing_start.group(1))
|
||||
elif listing_end:
|
||||
mdout.write("\n")
|
||||
else:
|
||||
mdout.write(line)
|
||||
fcopy(dest_file, temp_file)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@ -92,7 +99,7 @@ def main(argv):
|
||||
process_sections(temp_file, dest_file)
|
||||
process_figures(temp_file, dest_file)
|
||||
process_tables(temp_file, dest_file)
|
||||
# process_listings(temp_file, dest_file)
|
||||
process_listings(temp_file, dest_file)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -236,7 +236,7 @@ static void packet_handler (uint8_t packet_type, uint8_t *packet, uint16_t size)
|
||||
}
|
||||
|
||||
/* @text For more details on discovering remote devices, please see
|
||||
* Section on [GAP](profiles/#sec:GAPdiscoverRemoteDevices).
|
||||
* Section on [GAP](../profiles/#sec:GAPdiscoverRemoteDevices).
|
||||
*/
|
||||
|
||||
|
||||
|
@ -98,7 +98,7 @@ static int service_index = 0;
|
||||
* packet handlers, as shown in Listing GATTClientSetup.
|
||||
* Additionally, the security manager can be setup, if signed writes, or
|
||||
* encrypted, or authenticated connection are required, to access the
|
||||
* characteristics, as explained in Section on [SMP](protocols/#sec:smpProtocols).
|
||||
* characteristics, as explained in Section on [SMP](../protocols/#sec:smpProtocols).
|
||||
*/
|
||||
|
||||
/* LISTING_START(GATTClientSetup): Setting up GATT client */
|
||||
|
@ -315,7 +315,7 @@ char * get_string_from_data_element(uint8_t * element){
|
||||
/* @section SDP parser callback
|
||||
*
|
||||
* @text The SDP parsers retrieves the BNEP PAN UUID as explained in
|
||||
* Section [on SDP BNEP Query example](examples/#sec:sdpbnepqueryExample}.
|
||||
* Section [on SDP BNEP Query example](#sec:sdpbnepqueryExample}.
|
||||
*/
|
||||
static void handle_sdp_client_query_result(sdp_query_event_t *event)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user