Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of DigitCode by
fonction.cpp
- Committer:
- Ridaz
- Date:
- 2015-04-14
- Revision:
- 0:163dfb02ed36
File content as of revision 0:163dfb02ed36:
#include "fonction.h"
int bitToInt(int i)
{
switch (i) {
case 1:
return 0;
// break;
case 2:
return 1;
// break;
case 4:
return 2;
// break;
case 8:
return 3;
// break;
case 16:
return 4;
// break;
case 32:
return 5;
// break;
case 64:
return 6;
// break;
case 128:
return 7;
// break;
case 256:
return 8;
// break;
case 512:
return 9;
// break;
case 1024:
return -1;
// break;
case 2048:
return -2;
// break;
default:
return -3;
}
}
