xref: /btstack/doc/manual/btstack_gettingstarted.tex (revision 9ea49f801ca9d49a65636d9ce376c8a09ffa18c0)
1\UseRawInputEncoding
2\documentclass[a4paper,titlepage,oneside,12pt]{amsart} %amsart
3\usepackage{graphicx}
4\usepackage[colorlinks=true]{hyperref}
5%\usepackage{geometry} % see geometry.pdf on how to lay out the page. There's lots.
6\usepackage[margin=1.3in]{geometry}
7\geometry{a4paper} % or letter or a5paper or ... etc
8% \geometry{landscape} % rotated page geometry
9\usepackage{ifthen}
10\usepackage{longtable}
11
12% See the ``Article customise'' template for come common customisations
13\usepackage[usenames,dvipsnames]{color}
14
15\usepackage[table]{xcolor}
16
17\definecolor{lightgray}{RGB}{245, 245, 245}
18\definecolor{bkblue}{RGB}{18, 47, 76}
19\definecolor{bklightblue}{RGB}{102, 131, 158}
20\definecolor{mygreen}{rgb}{0,0.6,0}
21\definecolor{orange}{RGB}{255,153,0}
22
23\usepackage{opensans}
24\usepackage{setspace}
25\usepackage{booktabs} \newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}
26
27\usepackage{color}
28
29% show todos
30\newcommand{\todo}[1]{\colorbox{yellow}{#1}}
31% ignore todos
32% \newcommand{\todo}[1]{}
33
34\newcommand{\toread}[1]{{\color{bklightblue} #1}}
35
36\usepackage{listings}
37% add passthrough command used by pandoc for listings, apparently not defined by rmarkdown (maybe need to be removed later)
38% https://github.com/rstudio/rmarkdown/commit/bc2a49ed9da00fd5ec414bc192b112bbba34513d
39\newcommand{\passthrough}[1]{#1}
40\lstset{ %
41float,
42language=C,                % choose the language of the code
43basicstyle=\footnotesize,       % the size of the fonts that are used for the code
44%numbers=left,                   % where to put the line-numbers
45%numberstyle=\footnotesize,      % the size of the fonts that are used for the line-numbers
46%stepnumber=1,                   % the step between two line-numbers. If it is 1 each line will be numbered
47%numbersep=5pt,                  % how far the line-numbers are from the code
48backgroundcolor=\color{lightgray},  % choose the background color. You must add \usepackage{color}
49showspaces=false,               % show spaces adding particular underscores
50showstringspaces=false,         % underline spaces within strings
51showtabs=false,                 % show tabs within strings adding particular underscores
52frame=single,           % adds a frame around the code
53framerule=0.2pt,
54tabsize=2,          % sets default tabsize to 2 spaces
55captionpos=b,           % sets the caption-position to bottom
56breaklines=true,        % sets automatic line breaking
57breakatwhitespace=false,    % sets if automatic breaks should only happen at whitespace
58escapeinside={\%*}{*)},          % if you want to add a comment within your code
59belowcaptionskip=5em,
60aboveskip=\baselineskip,
61belowskip=\baselineskip,
62commentstyle=\itshape\color{mygreen},
63keywordstyle=\bfseries\color{black},
64identifierstyle=\color{black},
65stringstyle=\color{blue},
66morekeywords={*, btstack_timer_source_t, btstack_data_source_t, uint32_t, uint16_t, uint8_t, btstack_run_loop_TYPE, le_command_status_t, gatt_client_t,
67 							gatt_client_characteristic_t, gatt_client_service_t, gatt_client_characteristic_descriptor_t, service_record_item_t, bd_addr_t, btstack_packet_handler_t,
68							hci_cmd_t, btstack_control_t, btstack_link_key_db_t, link_key_t, device_name_t, hci_transport_t, hci_uart_config_t, sdp_query_event_t,
69							sdp_query_complete_event_t, sdp_client_query_rfcomm_service_event_t, sdp_parser_event_t, sdp_parser_event_type_t,
70							sdp_parser_attribute_value_event_t, sdp_parser_complete_event_t, advertising_report_t, gc_state_t, le_service_event_t,
71							le_characteristic_event_t}
72}
73
74\newcommand{\versionNr}{VERSION}
75\newcommand{\authorMila}{Dr. sc. Milanka Ringwald}
76\newcommand{\authorMatthias}{Dr. sc. Matthias Ringwald}
77\newcommand{\bkContact}{\href{[email protected]}{[email protected]}}
78\newcommand{\barWidth}{0.3cm}
79\newcommand{\urlfoot}[2]{\href{#1}{{\color{blue} #2}}\footnote{#1}}
80
81\makeatletter
82\renewcommand{\maketitle}{
83  \begin{titlepage}
84    \fosfamily
85    \begin{center}
86    \begin{minipage}[b]{\textwidth}
87        \begin{minipage}[b]{.1\textwidth}
88            \color{bkblue}\rule{\barWidth{}}{22cm}
89        \end{minipage}
90        \hfill\begin{minipage}[b]{.8\textwidth}\begin{flushright}
91            {\color{bkblue}
92            \versionNr{} \\
93            \today \\}
94            \vspace*{7.5cm}
95            \hfill\includegraphics[width=0.85\textwidth]{picts/bklogo.pdf}
96            \vspace*{1.5cm}
97            \begin{spacing}{2}
98                {\huge \color{bkblue} \@title} \\
99                {\Large \color{bklightblue} Including Quickstart Guide}
100            \end{spacing}
101            \vspace*{1.5cm}
102            {\color{bkblue}\large \authorMila \\
103            \large \authorMatthias \\
104            \large \bkContact\\ }
105        \end{flushright}\end{minipage}
106        \vfill
107        \begin{minipage}[b]{\textwidth}
108            \color{bklightblue}\rule{\barWidth{}}{\barWidth{}}
109        \end{minipage}
110    \end{minipage}
111
112
113    \end{center}
114  \end{titlepage}
115}
116\makeatother
117
118\title[BTstack Manual] {BTstack Manual}
119\author{Copyright \copyright 2012-2015 BlueKitchen GmbH}
120
121%%% BEGIN DOCUMENT
122
123\newcommand{\UserGuide}{\urlfoot{http://processors.wiki.ti.com/index.php/PAN1315EMK\_User\_Guide\#RF3\_Connector}{User Guide}{}}
124\newcommand{\MSPGCCWiki}{\urlfoot{http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=MSPGCC\_Wiki}{MSPGCC Wiki}}
125\newcommand{\GNUMake}{\urlfoot{http://gnuwin32.sourceforge.net/packages/make.htm}{GNU Make}}
126\newcommand{\Python}{\urlfoot{http://www.python.org/getit/}{Python}}
127\newcommand{\mspgcc}{\urlfoot{http://sourceforge.net/projects/mspgcc/files/Windows/mingw32/}{mspgcc}}
128\newcommand{\BTSfile}{\urlfoot{http://processors.wiki.ti.com/index.php/CC256x\_Downloads}{BTS file}}
129\newcommand{\MSPFlasher}{\urlfoot{http://processors.wiki.ti.com/index.php/MSP430\_Flasher\_-\_Command\_Line\_Programmer}{MSP430Flasher}}
130\newcommand{\MSPDebug}{\urlfoot{http://mspdebug.sourceforge.net/}{MSPDebug}}
131\newcommand{\BtstackGithub}{\urlfoot{https://github.com/bluekitchen/btstack/archive/master.zip}{BTstack's page}}
132\newcommand{\gccarm}{\urlfoot{https://launchpad.net/gcc-arm-embedded}{arm-gcc}}
133\newcommand{\OpenOCD}{\urlfoot{http://openocd.org}{OpenOCD}}
134\newcommand{\mplabxc}{\urlfoot{http://www.microchip.com/pagehandler/en\_us/devtools/mplabxc/}{MPLAB XC}}
135\newcommand{\PICkit}{\urlfoot{http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=pg164130}{PICkit 3}}
136\newcommand{\pkgconfig}{\urlfoot{http://www.freedesktop.org/wiki/Software/pkg-config/}{pkg-config}}
137\newcommand{\libusb}{\urlfoot{www.libusb.org}{libusb}}
138\newcommand{\Zadig}{\urlfoot{http://zadig.akeo.ie}{Zadig}}
139\newcommand{\MSYS}{\urlfoot{www.mingw.org/wiki/msys}{MSYS}}
140\newcommand{\MINGW}{\urlfoot{www.mingw.org}{MINGW32}}
141
142%% pandoc-tablenos: required package
143\usepackage{caption}
144
145%% pandoc-fignos: environment to disable figure caption prefixes
146\makeatletter
147\newcounter{figno}
148\newenvironment{fignos:no-prefix-figure-caption}{
149  \caption@ifcompatibility{}{
150    \let\oldthefigure\thefigure
151    \let\oldtheHfigure\theHfigure
152    \renewcommand{\thefigure}{figno:\thefigno}
153    \renewcommand{\theHfigure}{figno:\thefigno}
154    \stepcounter{figno}
155    \captionsetup{labelformat=empty}
156  }
157}{
158  \caption@ifcompatibility{}{
159    \captionsetup{labelformat=default}
160    \let\thefigure\oldthefigure
161    \let\theHfigure\oldtheHfigure
162    \addtocounter{figure}{-1}
163  }
164}
165\makeatother
166
167%% pandoc-tablenos: environment to disable table caption prefixes
168\makeatletter
169\newcounter{tableno}
170\newenvironment{tablenos:no-prefix-table-caption}{
171  \caption@ifcompatibility{}{
172    \let\oldthetable\thetable
173    \let\oldtheHtable\theHtable
174    \renewcommand{\thetable}{tableno:\thetableno}
175    \renewcommand{\theHtable}{tableno:\thetableno}
176    \stepcounter{tableno}
177    \captionsetup{labelformat=empty}
178  }
179}{
180  \caption@ifcompatibility{}{
181    \captionsetup{labelformat=default}
182    \let\thetable\oldthetable
183    \let\theHtable\oldtheHtable
184    \addtocounter{table}{-1}
185  }
186}
187\makeatother
188
189
190%level -1: part, 0: chapter, 1: section, etc.
191\setcounter{tocdepth}{3}
192
193\begin{document}
194
195\maketitle
196\hypersetup{linkcolor=blue}
197\hypersetup{urlcolor=blue}
198\hypersetup{citecolor=blue}
199
200\tableofcontents
201\pagebreak
202
203
204\input{btstack_final}
205
206\end{document}