IrLAP_Context ctx;
irphy_reset();
irlap_init_context(&ctx);
IrLAP_Context ctx;
IrIAS_Node *ias_nodes[3];
int16_t dlsap_sel;
irphy_reset();
irlap_init_context(&ctx);
/* ias_nodes contains all the IrIAS LsapSel values we support */
ias_nodes[0]=&irobex_ias_node;
ias_nodes[1]=&ircomm_ias_node;
ias_nodes[2]=0;
for(;;) {
irphy_wait(-1);
if((dlsap_sel=irttp2_accept(&ctx, IRLMP_HINT1_OBEX | IRLMP_HINT1_COMM, ias_nodes))<0)
continue;
switch(dlsap_sel) {
case IRCOMM_LSAP_SEL_VAL:
handle_ircomm();
break;
case IROBEX_LSAP_SEL_VAL:
handle_irobex();
break;
}
}
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR(S) OR BLAULOGIC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.